# Question:how to use listplot on matrix?

## Question:how to use listplot on matrix?

Maple 2022

again, I wish Maple help can be better. A simple example of how to use listplot on matrix is all what is needed.

I have a matrix, 3 rows and 5 columns. I need to use listplot to generate 3 listplots on same graph. I can do this one row at a time. But when calling listplot(m) where m is the matrix, it gives error

Error, (in plots:-pointplot) incorrect number of coordinates in points data

Clicking on the above link, as usual sends me to page that says There is no help page available for this error

Help says

The listplot command also accepts a list or Matrix containing points data. great. But how?? I click on the link next to the above line, it sends me to page about pointplot. There is says that pointplot also accepts a matrix of size n by 2. Does this mean listplot matrix must also be two columns? It does not say this on the listplot help page.

For a workaround, I now generate plot of each row on its own, then use display to put them all on same graph. But the problem with this is that all have same color. I was hoping that if Maple did it all at once, it will automatically pick different color for each line as is the case with Mathematica (example below)

Is there a better way to do this? For reference, I'd like to generate similar plot like this

You see, the colors are automatically selected. With manual plotting of each row myself, I have to select the color myself and to make sure they are different and so on. It will be better if the system did all of this.

 > restart;
 > m:=Matrix([[1,2,5,6,9],[3,4,5,13,14],[1,3,4,10,11]])

 > plots:-listplot(m); #why this fail?

Error, (in plots:-pointplot) incorrect number of coordinates in points data

 > plots:-listplot(m[1,..])

 > #for a workaround, I can do this. But now all lines have same color which is not good. map(n->plots:-listplot(m[n,..]),[\$1..3]): plots:-display(%)

 >