Hello! see below for sample code. (1) I find that the second subplot is shifted to the right. This seems to happen generally with colorbar. How do I fix it?
(2) is there a way to clear/remove selected parts of the figure? I am using ipython for interactive figure drawing I find clf() will erase everything, cla() will empty the square plot, but I can't see how to clear the first subfigure or the colorbar. This would be useful as any changes to the colorbar create a new one. (uncomment the second cbar line to see this) (3) is it possible to modify the orientation of cbar once drawn? cbar.orientation ='horizontal' plt.draw() plt.show() leaves it unchanged. Thank you for your help! ================ Here is my code: ================== #!/usr/bin/env python import matplotlib.pyplot as plt import numpy as np from time import sleep x = np.arange(0, 10, 0.2) y = np.sin(x) fig = plt.figure() ax1 = fig.add_subplot(211) cax1 = ax1.plot(x, y) ax2 = fig.add_subplot(212) A = np.random.random_integers(0, 10, 100).reshape(10, 10) cax2 = ax2.imshow(A, interpolation="nearest",vmin=-1,vmax=11 ) cbar = fig.colorbar(cax2) #cbar = fig.colorbar(cax2, ticks=[0, 5, 10]) plt.savefig('colorbartest.pdf') ====================================================== -- ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users