Message Boards Message Boards

Plotting an ordered sequence in 2D

Posted 10 years ago
Hi everyone.
I have an ordered set of points S=(x1,x2,x3,...,xn) and I would like to assign to it a sequence of subsequent natural numbers N=(1,2,3,...,n) for enumeration purposes and then to have a 2D plot of a function which goes from N to S.
With other words, I am searching for the possibility to plot the initial vector (x1,x2,..) in 2D space with (1,2,3..) on the x-axis and the corresponding values of the vector on the y-axis. Which syntax should I use for that?
Many thanks!
POSTED BY: d m
Posted 10 years ago
You can use-
values = Thread[{N,S}]
and then plot the values using:
ListPlot[values]
POSTED BY: Girish Arabale
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract