Mathematica: Plot a vector NOT against the component number

  • #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
 
  • #2
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
 

Suggested for: Mathematica: Plot a vector NOT against the component number

Replies
0
Views
537
Replies
1
Views
793
Replies
1
Views
436
Replies
1
Views
768
Replies
2
Views
2K
Replies
2
Views
659
Replies
2
Views
958
Replies
1
Views
604
Replies
1
Views
881
Back
Top