From: Marston <she...@gm...> - 2012-03-31 17:26:09
|
Hi, I'm trying to create a plot, with subplots where each row of x plots have a common colorbar beneath it. Only the the top row will have titles. I've tried creating a function to do this but I only achieve partial success. Here is an image created in another program that I want to duplicate: http://old.nabble.com/file/p33544950/fig.jpeg I made several functions to do this. Here's one of them: def Plot(self,title,plist): for k in np.sort(self.vdic.keys()): plt.subplot(5,13,self.window) cs = plt.contourf(22,22,np.squeeze(self.vdic[k]),plist['levels'], cmap=cm.get_cmap('jet',len(plist['levels'])-1)) plt.axis('off') if title: plt.title(k,fontsize=tsize) window += 1 cbar = plt.colorbar(cax=plist['cax'],orientation='h') I've given up in getting the text on the left because every attempt using text fails. Now if this is a horrible way and you have a better idea, please feel free to share. I'm new at matplotlib and this is a great way to see how things can be done better and in different ways. -- View this message in context: http://old.nabble.com/Subplot-array-and-colorbar-tp33544950p33544950.html Sent from the matplotlib - users mailing list archive at Nabble.com. |