Thomas Robitaille wrote: > Hi, > > Is there an easy way to force a colorbar to not take up space from the Axes > it is being plotted next to? In the following example, what I would like is > for the top Axes to remain the same size as the bottom one, and for the > colorbar to place itself on the right of the top one. Is this easy to do? > > --- > > import matplotlib.pyplot as mpl > > fig = mpl.figure(figsize=(5,10)) > > ax1 = fig.add_axes([0.2,0.5,0.6,0.3]) > s = ax1.scatter([0.5,0.6],[0.6,0.5],c=[0.5,0.6]) > > ax2 = fig.add_axes([0.2,0.1,0.6,0.3]) >
axcbar = fig.add_axes([0.85, 0.5, 0.07, 0.3]) fig.colorbar(s, cax=axcbar) Eric > > fig.canvas.draw() > > --- > > Thanks, > > Tom > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users