Re: [Matplotlib-users] legend

2010-10-26 Thread Jae-Joon Lee
One option is to use proxy artists. http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist Regards, -JJ 2010/10/26 Marek GiebuĊ‚towski : > Dear All, > I use hist in pylab.I have different sets of data in different colours > in one chart. In legend all rectangulars are unfo

Re: [Matplotlib-users] GridSpec Index Order

2010-10-26 Thread Jae-Joon Lee
Try this. def get_indx(irow, icol): return irow*4+icol ax = plt.subplot(gs[get_indx(0,3):get_indx(3,3)]) With 1d slicing, the axes will occupy the rectangle defined by the start and stop location. For example, gs[i:j] will occupy the rectangular area between gs[i] and gs[j-1]. Let me kno

Re: [Matplotlib-users] How to Reduce White Space Around Figure?

2010-10-26 Thread Jae-Joon Lee
the "bbox_inches" option does not work well for your case since the axes frame (although not visible) occupy much larger area than your plot elements. Make axis limits more tighter, then try to use bbox_inches option (with this, you don't need to fiddle with subplot params). Here is my try. ax.se

Re: [Matplotlib-users] color xy plot

2010-10-26 Thread John [H2O]
Bringing up an old thread, but just curious if this can be done with the plot command as well, as in: plt.plot(X,Y[1:3,:].T,c=['blue','red']) Thanks, john sordnay wrote: > > > John Hunter-4 wrote: >> >> On Fri, Jun 20, 2008 at 6:14 PM, sordnay wrote: >>> >>> Hi all, >>> I'm trying to plot i

Re: [Matplotlib-users] reverse axis on colorbar, and showing under- and over-colors

2010-10-26 Thread Eric Firing
On 10/26/2010 04:50 AM, Maarten Sneep wrote: > Hi, > > I did solve my own question. For posterity, and perhaps for a more > elegant solution, I post my solution here. > > On Tue, 2010-10-26 at 10:56 +0200, Maarten Sneep wrote: > >> I have an image with cloud pressures, 1000 at the surface, 200 at t

Re: [Matplotlib-users] Problem in animation cookbook example

2010-10-26 Thread Benjamin Root
On Tue, Oct 26, 2010 at 12:45 AM, Drew Frank wrote: > I believe I've found a problem with the following cookbook example: > http://www.scipy.org/Cookbook/Matplotlib/Animations?action=show#head-3d51654b8306b1585664e7fe060a60fc76e5aa08. > Specifically, the example calls canvas.copy_from_bbox() be

Re: [Matplotlib-users] reverse axis on colorbar, and showing under- and over-colors

2010-10-26 Thread Maarten Sneep
Hi, I did solve my own question. For posterity, and perhaps for a more elegant solution, I post my solution here. On Tue, 2010-10-26 at 10:56 +0200, Maarten Sneep wrote: > I have an image with cloud pressures, 1000 at the surface, 200 at the > top of the atmosphere. I'd like to reverse the axis,

Re: [Matplotlib-users] How to Reduce White Space Around Figure?

2010-10-26 Thread Lorenzo Isella
Thanks. This indeed improves the situation (and your suggestions about a for loop is appreciated). I am surprised at the fact that I have been able to generate such a plot via scripting only (well, with a lot of help from the list) by browsing the online examples and with my limited knowledge of

[Matplotlib-users] reverse axis on colorbar, and showing under- and over-colors

2010-10-26 Thread Maarten Sneep
Hi, My searching for reverse in the documentation and gallery came up empty, so I'll try it here: I have an image with cloud pressures, 1000 at the surface, 200 at the top of the atmosphere. I'd like to reverse the axis, i.e. 1000 at the bottom of the scale, 200 at the top. How should I approach

[Matplotlib-users] legend

2010-10-26 Thread Marek GiebuĊ‚towski
Dear All, I use hist in pylab.I have different sets of data in different colours in one chart. In legend all rectangulars are unfortunately blue. In plot() it is ok but not in hist(). How to receive correct colours in histogram legend? x is nested list x[1][2][3] is an ordinary list. for p in rang