Actually, if the data is shaped as $ m \times n \times 2 $, functions like ListLinePlot
just do the job. But now I want to add colors to the curves according to each 3rd data. But it has stuck me. Any ideas?
A simpler version of the question should be this: Suppose I have an $ n \times 3 $ shaped data (below is not code but just what shows the spirit, and generation of test data is not difficult to implement by, say, RandomReal
or RandomInteger
):
data = {{x1, y1, z1}, {x2, y2, z2}, ..., {xn, yn, zn}};
Using Graphics3D[Line[data]]
or ListPointPlot3D[data]
can visualize it. But sometimes one has to work in just 2D, then how to encode the information carried by zi
on the 2D curve sampled out by {xi, yi}
?
ListLinePlot
can handle $m \times n \times 2$ data strucutre. $\endgroup$ – Natas Jun 30 '20 at 10:37ListLinePlot[RandomReal[1, {3, 10, 2}]]
answers your 2nd point. For the 1st one, please see the 4th example of Basic Examples on this page, except that there it isPlot
that is in use for the case that the function expression of the curve is known. $\endgroup$ – Αλέξανδρος Ζεγγ Jun 30 '20 at 11:06