Robert Cimrman wrote: > Eric Firing wrote: >> Robert and any other spy users: >> >> I have committed to svn a new axes method, spy3, that combines a >> modification of the functionality of both spy and spy2. I hope you >> can check it out. If it looks OK, then I would like to simply replace >> spy and spy2 with this combined version. In that case the pylab >> interface, which now gives access to spy and spy2, would have a single >> spy function which would access the new version. My suspicion is that >> spy is used almost entirely in interactive mode, and probably not by >> very many people, so that this changeover can be made quickly with >> little disruption to present users. >> >> Attached is a script illustrating the difference in the way spy3 >> displays a matrix (it matches the way it is printed: first index is >> row number, second is column number, row number increases down) versus >> what spy and spy2 do (first index is X, second index is Y). >> >> Also attached is the diff for spy3. >> >> Users may want to comment in particular on the default for the >> "aspect" kwarg. Presently it is set to "equal" so that the shape of >> the plot is the shape of the array with square cells. This differs >> from spy and spy2. The rationale is that it gives the best picture of >> what the array looks like, including its shape. > > Thumbs up :), just add the sparse-full matrix switch to the imshow > branch too, if possible. But I am happy with it as it is.
Robert, The sparse-full difference only works with the plot mode; for an image there is no alternative to providing a value for every pixel, so I don't know of any way to optimize it for the case of sparse storage. A polygon collection could be used to achieve the same result in this case. I'm not sure it is a good idea, though, because there would be an advantage of not converting to a regular array only in the case where the array is so large that such a conversion would use a big chunk of memory, and in that case the polygons probably would be less than single-pixel size anyway, so one would be better off using the present symbol-plotting mode. Anyway, I'm glad it works for you. Thanks for checking. Eric ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users