>>>>> "David" == David Huard <[EMAIL PROTECTED]> writes:
David> Hi, unles I'm doing something stupid, setp is buggy.
David> I'm creating a bunch of images using imshow and I want the
David> colormap to be consistent among images. So once they're all
David> drawn, I want to uniformize the color scale. But
>>>> setp(ax.images, clim= [0,1])
David> does not work because it sets vmin to [0,1] and doesn't
David> affect vmax.
David> On the other hand,
>>>> ax.images[0].set_clim([0,1])
The latter should not work. The set_clim function in
cm.ScalarMappable has the signature
def set_clim(self, vmin=None, vmax=None):
Ie, it does not accept the sequence argument, though
ax.images[0].set_clim(*[0,1])
should work.
The setp behavior is more of a bug with set_clim than it is with setp.
For properties to work with setp, we need to have all setters work
with a single argument, and so in this we would want to support a
single non-keyword argument which is a length two sequence mean
"[vmin, vmax]"
I just committed changes to support this so if you have svn access
give it a test drive.
JDH
-------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel