[Matplotlib-users] [Basemap] savefig bbox_inches=tight

2011-10-27 Thread Yoshi Rokuko
if one saves a Basemap plot with savefig option bbox_inches='tight' geographical coordinates are cut: bmap = Basemap(...) bmap.drawparallels([those,numbers,are,gone], labels=[1,0,0,0]) bmap.drawmeridians([those,numbers,are,gone], labels=[0,0,0,1]) plt.contourf

Re: [Matplotlib-users] [Basemap] savefig bbox_inches=tight

2011-10-27 Thread Jeff Whitaker
On 10/27/11 1:41 AM, Yoshi Rokuko wrote: > if one saves a Basemap plot with savefig option > bbox_inches='tight' geographical coordinates > are cut: > > bmap = Basemap(...) > bmap.drawparallels([those,numbers,are,gone], > labels=[1,0,0,0]) > bmap.drawmeridians([those,numbers,are

Re: [Matplotlib-users] [Basemap] savefig bbox_inches=tight

2011-10-27 Thread Yoshi Rokuko
+--- Jeff Whitaker ---+ > You can use the pad_inches keyword to adjust the amount of space left > around the map. > <...> > plt.savefig('bboxtight.png', bbox_inches='tight',pad_inches=0.45) yes that works fine (0.5 inches in my case). thank you.

[Matplotlib-users] Legend and proxy artists

2011-10-27 Thread Adam Mercer
Hi I have recently updated to Matplotlib-1.1.0 and now one of my scripts displays the following warning: UserWarning: Legend does not support [[]] Use proxy artist instead. http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist The link it refers to doesn't seem to be much

[Matplotlib-users] matplotlib.axes.Axes.arrow not producing nice arrows

2011-10-27 Thread mogliii
Hi, I am trying to place some arrows using http://matplotlib.sourceforge.net/api/axes_api.html?highlight=arrow#matplotlib.axes.Axes.arrow And unfortunately the arrows are not nice (see attached screenshot). How can the line end be changed to "round" as, for example, with plot. Or anyone can give

Re: [Matplotlib-users] matplotlib.axes.Axes.arrow not producing nice arrows

2011-10-27 Thread Daniel Hyams
I think that the code that generated the screenshot needs to be posted; otherwise no one knows what is being attempted On Thu, Oct 27, 2011 at 10:50 AM, mogliii wrote: > Hi, > > I am trying to place some arrows using > http://matplotlib.sourceforge.net/api/axes_api.html?highlight=arrow#matplo

Re: [Matplotlib-users] matplotlib.axes.Axes.arrow not producing nice arrows

2011-10-27 Thread mogliii
This is the code http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/arrow_demo.py Its this example from the gallery page http://matplotlib.sourceforge.net/examples/pylab_examples/arrow_demo.html Basically I see the same artifacts in my own plots, using the following command: ax1.arrow(

Re: [Matplotlib-users] matplotlib.axes.Axes.arrow not producing nice arrows

2011-10-27 Thread Michael Droettboom
It looks like the polygons that make up the arrows were not being closed correctly, so the PDF renderer was not joining the ends of the stroke. Can you confirm that this branch resolves your issue? https://github.com/matplotlib/matplotlib/pull/559 Mike On 10/27/2011 11:36 AM, mogliii wrote:

Re: [Matplotlib-users] Legend and proxy artists

2011-10-27 Thread Sterling Smith
Adam, Your example is not complete. I don't understand the value variable that you are iterating over, or how it affects the different plots you are making. I would guess that the problem is that you have a list of tuples of handles for value_plot, instead of a list of handles. Note that each

Re: [Matplotlib-users] matplotlib.axes.Axes.arrow not producing nice arrows

2011-10-27 Thread mogliii
Thanks, that fixed it. Both for the example (see attachment) and for my own document. So this branch resolved the issue. Moglliii On 27/10/2011 17:53, Michael Droettboom wrote: It looks like the polygons that make up the arrows were not be

Re: [Matplotlib-users] Legend and proxy artists

2011-10-27 Thread Adam Mercer
On Thu, Oct 27, 2011 at 12:05, Sterling Smith wrote: > Your example is not complete.  I don't understand the value variable that you > are iterating over, or how it affects the different plots you are making. value is simply a list of different datasets to plot, read in using: value = [] for v

Re: [Matplotlib-users] Legend and proxy artists

2011-10-27 Thread Sterling Smith
Adam, I'm sorry that I wasn't clear before. Here is a working example: from pylab import figure, arange fig = figure(1) fig.clear() ax = fig.add_subplot(111) x = arange(0,1,.25) y1 = x y2 = x**2 y3 = x**3 l1 = ax.plot(x,y1,'bo-') l2 = ax.plot(x,y2,'go-') l3 = [] for xi,x1 in enumerate(x): l3.a

Re: [Matplotlib-users] Legend and proxy artists

2011-10-27 Thread Adam Mercer
On Fri, Oct 28, 2011 at 00:56, Sterling Smith wrote: > Here is a working example: > > from pylab import figure, arange > fig = figure(1) > fig.clear() > ax = fig.add_subplot(111) > x = arange(0,1,.25) > y1 = x > y2 = x**2 > y3 = x**3 > l1 = ax.plot(x,y1,'bo-') > l2 = ax.plot(x,y2,'go-') > l3 = []