Mathematica: Plot a vector NOT against the component number

  • Mathematica
  • Thread starter faradayslaw
  • Start date
  • #1
Hi,

I wish to listplot a list object against a scale that is NOT the component number of the vector, but is actually a well defined function of the component number, and I am lost how to do this?

changing "Ticks" didn't help, or I did it wrong, so I am wondering if anyone knows how to do this.

Thanks
 

Answers and Replies

  • #2
1,069
29
Construct your substitute for the "component number" and transpose to put it in position

Example:

mylist = {1, 2, 7, 4};
myf[n_] = n^2;
myscale = Map[myf, Range[Length[mylist]]];
myresult = Transpose[{myscale, mylist}];
ListPlot[myresult, PlotJoined -> True, AxesOrigin -> 0]
 
  • #3
worked well, thanks
 

Related Threads on Mathematica: Plot a vector NOT against the component number

Replies
1
Views
7K
Replies
2
Views
11K
Replies
1
Views
4K
Replies
3
Views
1K
Replies
1
Views
17K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
9
Views
15K
  • Last Post
Replies
1
Views
2K
Replies
1
Views
744
  • Last Post
Replies
1
Views
2K
Top