From: Eric F. <ef...@ha...> - 2006-07-12 18:02:25
|
Alan G Isaac wrote: > On Wed, 12 Jul 2006, Stefan van der Walt apparently wrote:=20 >=20 >>It would be useful to have plot accept a 2-D array as well. Would= =20 >>patches for this be considered, or is there some reason why this ca= n't=20 >>work? At the moment, doing=20 >>P.plot(z) where z is Nx2=20 >=20 >=20 > If 2-D is allowed, > I hope N=D7K is allowed, > not just N=D72. I have thought about this, but haven't gotten around to doing it. To= do=20 the whole job, we could handle a single NxK argument, and we could al= so=20 handle pairs: Nx1, NxK NxK, Nx1 NxK, NxK I think it is clear what the behavior should be with any of the pairs= ;=20 essentially they should be broadcast to the NxK, NxK case, resulting = in=20 K lines. In the single-argument NxK case, I think matlab plots subsequent colu= mns=20 against the first column. Is this what you would like? The alternat= ive=20 would be to plot each column against the row index, which is what= =20 happens in the Nx1 case, but I suspect the matlab-compatibility argum= ent=20 wins out here. Also, this maintains consistency with the original= =20 request for Nx2, which I assume was for plotting the second column= =20 against the first. I certainly would not want to have NxK behavior= =20 change as K goes from 2 to values larger than 2. Eric |