On Friday, February 17, 2012, Ray Osborn wrote:
> I am embedding a matplotlib canvas in a Pyside GUI and wanted to attach a
> slider to adjust the color scale of a 2D plot made using NonUnitformImage.
> I am connecting the slider value to im.set_clim([vmin,vmax]). I have got my
> axis sliders to work, but the intensity slider only adjusts the colorbar
> without touching the image itself. Is there some trick to making this work
> with NonUniformImage?
>
> My plotting routine has the following code:
>
> ax = plt.gca()
> im = NonUniformImage(ax, extent=extent, origin=None, **opts)
> im.set_data(x,y,z)
> ax.images.append(im)
> self.imgplot = im
> plt.colorbar(im)
>
> while the Pyside slot has:
>
> zhi = self.zmin + (self.ztab.maxslider.value() * range / 100)
> im = self.imgplot
> im.set_clim([zlo,zhi])
>
> The slider dynamically adjusts the colorbar beautifully, but leaves the
> color plot untouched. Any suggestions welcome.
>
> Thanks in advance,
> Ray
Without a more complete example, it is hard to say. Can you make a small
stand-alone example that we can try out?
Ben Root
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users