I've got a list of three dimensional points, ordered by time. Is there a way to plot the points so that I can get a visual representation that also includes information on where in the list the point occurred? My initial thought is to find a way to color the points by the order in which they were plotted.
ListPlot3D
drapes a sheet over the points, with no regard to the order which they were plotted.
ListPointPlot
just shows the points, but gives no indication as to the order in which they were plotted. It's here that I am thinking of coloring the points according to the order in which they appear in the list.
ListLinePlot
doesn't seem to have a 3D cousin, unlike a lot of the other plotting functions.
Epilog. Cell[BoxData["Epilog"], "Input", CellTags -> "Epilog_templates"] is an option for graphics functions that gives a list of graphics primitives to be rendered after the main part of the graphics is rendered.
The usual way to set the line color in matplotlib is to specify it in the plot command. This can either be done by a string after the data, e.g. "r-" for a red line, or by explicitely stating the color argument. See also the plot command's documentation.
You could also do something like
lst = RandomReal[{0, 3}, {20, 3}];
Graphics3D[{Thickness[0.005],
Line[lst,
VertexColors ->
Table[ColorData["BlueGreenYellow"][i], {i,
Rescale[Range[Length[lst]]]}]]}]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With