Ray Osborn:
OK - it turns out I can reproduce it in a simple ipython session using
ipython --pylab=qt.
I set up an image plot as follows:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.image import NonUniformImage
x=y=np.linspace(0,2*np.pi,101)
X,Y=np.meshgrid(x,y)
z=sin(X)*sin(Y)
ax=plt.gca()
extent = (x[0],x[-1],y[0],y[-1])
im = NonUniformImage(ax, extent=extent, origin=None)
im.set_data(x,y,z)
ax.images.append(im)
ax.set_xlim(x[0],x[-1])
ax.set_ylim(y[0],y[-1])
plt.colorbar(im)
plt.gcf().canvas.draw()
After that, I try to change the color scale using:
im.set_clim(0,0.5)
plt.gcf().canvas.draw()
The colorbar changes scale, but the plot is untouched. Is that the
expected behavior?
Thanks,
Ray
Try, perhaps, after set_clim, to reinstall the data:
im.set_data(x,y,z)
plt.gcf().canvas.draw()
=
Jerzy Karczmarczuk
------------------------------------------------------------------------------
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