Mark Bakker wrote: > Eric - > > To be honest, I think the native array storage order matters a lot. > When you have a large dataset, transposing the matrix is not a cheap > command.
No, in this context it is very cheap relative to the rest of the plotting. > > But I also understand the logic of plotting column against column. > However, a 1D vector in Python is by default a row, while in Matlab it > is a column. > What are you going to do if a 1D row is given as first argument and a > matrix as second??? No problem. It is easy to treat a 1D array as either a column or a row, depending on whether one has chosen option 3 or option 4. This could even be controlled by an rc option and/or a kwarg, but I think this is a bad idea. Better to just pick 3 or 4 and stick with it, using transpose when needed. Keep things simple and explicit. > > I don't like the Matlab model when one matrix is passed. It should > really plot the first column along > the x-axis and all the other columns along y. Like your 2nd option > below, but with NxM array. > It would then be very nice to have an optional argument to the function > to plot all rows against the first row. That would be very easy to > implement and keep everybody happy. To make sure I understand you: you are suggesting a kwarg that tells the plot command to plot subsequent rows (or it could be columns) against the first? Something like plot(Z, xvec='row') plot(Z, xvec='column') plot(Z, xvec=None) #default: present behavior But why is this better than the following? plot(Z[0,:], Z[1:,:]) The latter would accomplish the same, be completely consistent with option 4, be completely explicit and unambiguous, require no more typing than using a kwarg, require no extra logic in the plot code, and require no extra documentation for the plot command. Eric > > As you said, there will be many more opinions, > > Mark > > > > To summarize, the options seem to be: > > 1) Leave plot argument parsing alone. > 2) Accept an Nx2 array in place of a pair of arguments containing x > and y. > > 3) Implement the Matlab model. > 4) Implement the Matlab model, but taking rows instead of columns in an > X or Y array that is 2-D. > > I am open to arguments, but my preference is the Matlab model. I don't > think that the difference in native array storage order matters much. > It is more important to have the API at the plot method and function > level match the way people think. > > Eric > > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users