Re: [Matplotlib-users] Basemap interp nearest neighbor

2011-03-07 Thread Jeff Whitaker
On 3/7/11 2:25 PM, Juan A. Saenz wrote: > Jeff, thanks for your reply. > > One situation where one might require masked nearest neighbor > interpolation is when, on a given fixed grid, interpolating velocities > on cell corners (B-grid) to faces (C-grid). Cells will be defined as > either land o

Re: [Matplotlib-users] change default format of ticks on vertical axis

2011-03-07 Thread Eric Firing
On 03/07/2011 11:51 AM, Mark Bakker wrote: > Hello List, > > My values on the vertical axis are large, but the range is small: > > plot([3004,3005,3006]) > > By default this plots 0,1,2 as tickmarks along the vertical axis, and > then at the top of the vertical axis is prints "+3.005e3". > > I pref

Re: [Matplotlib-users] change default format of ticks on vertical axis

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 3:51 PM, Mark Bakker wrote: > Hello List, > > My values on the vertical axis are large, but the range is small: > > plot([3004,3005,3006]) > > By default this plots 0,1,2 as tickmarks along the vertical axis, and then > at the top of the vertical axis is prints "+3.005e3".

[Matplotlib-users] change default format of ticks on vertical axis

2011-03-07 Thread Mark Bakker
Hello List, My values on the vertical axis are large, but the range is small: plot([3004,3005,3006]) By default this plots 0,1,2 as tickmarks along the vertical axis, and then at the top of the vertical axis is prints "+3.005e3". I prefer to simply get 3004,3005,3006 at the tickmarks. Any (eas

[Matplotlib-users] demo_curvelinear_grid.py and lines over 100 points?

2011-03-07 Thread Hatch, Sara J (343D)
Matlplotlib folks, I copied the demo_curvelinear_grid.py example and noticed when using the curvelinear_test2 and plotting a line that had more than 100 points that the resulting line doesn't plot as expected. For example: Replacing ax2.plot(intp(np.array([0, 30]), 50), int

Re: [Matplotlib-users] Text box adaptable

2011-03-07 Thread Goyo
2011/3/7 Andrea Crotti : > [...] > t = matplotlib.text.Text(0, 0, "very long string") > t.get_bbox_patch() > > to get the size and then do the rest. > > but this still returns None, probably because at this point there's > probably something still missing, right? > > And when I get the resulting si

Re: [Matplotlib-users] Can someone explain mplot3d surface plots ?

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 2:09 PM, M.Rule wrote: > I want to plot as if rendering a 3D object. Usually this would involve > specifying vertices and facets. Its not obvious to me how to send this to > functions like plot_wireframe. I have looked at the documentation and the > tutorials, and am still

[Matplotlib-users] Can someone explain mplot3d surface plots ?

2011-03-07 Thread M.Rule
I want to plot as if rendering a 3D object. Usually this would involve specifying vertices and facets. Its not obvious to me how to send this to functions like plot_wireframe. I have looked at the documentation and the tutorials, and am still not getting it. Maybe start with something very simple

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 12:42 PM, Brendan Barnwell wrote: > On 2011-03-07 08:59, Benjamin Root wrote: > > On Mon, Mar 7, 2011 at 10:33 AM, Yuri D'Elia wrote: > >> I was reading this at the time: > >> > >> http://matplotlib.sourceforge.net/faq/usage_faq.html > >> > >> I inferred pyplot was just

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Brendan Barnwell
On 2011-03-07 08:59, Benjamin Root wrote: > On Mon, Mar 7, 2011 at 10:33 AM, Yuri D'Elia wrote: >> I was reading this at the time: >> >> http://matplotlib.sourceforge.net/faq/usage_faq.html >> >> I inferred pyplot was just a matlab-like interface on top of matplotlib, >> and figured using dire

Re: [Matplotlib-users] Legend outside the plot

2011-03-07 Thread Jae-Joon Lee
On Mon, Mar 7, 2011 at 8:22 PM, Yuri D'Elia wrote: > With matplotlib, I have to do the following: > > legend(bbox_to_anchor=(1, 1 + ?), loc=2) > > but how do I calculate the vertical location? Maybe you want to try something like leg = legend([l1], ["Test"], borderaxespad=0, bbox_to

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Jae-Joon Lee
On Tue, Mar 8, 2011 at 2:20 AM, Benjamin Root wrote: > And this appears to be a bug.  Looks like the call signature for the legend > object's get_window_extent() doesn't match the call signature for all other > artists. > Yes. It is a bug. Meanwhile, you may use bbox_extra_artists=[leg.legendPa

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 11:09 AM, Yuri D'Elia wrote: > On Tue, 8 Mar 2011 02:03:54 +0900 > Jae-Joon Lee wrote: > > > On Mon, Mar 7, 2011 at 7:36 PM, Yuri D'Elia wrote: > > In fact, supporting the "bbox_inches" is a real hack. > > As I mentioned in my previous email, matplotlib artists can have >

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Yuri D'Elia
On Tue, 8 Mar 2011 02:03:54 +0900 Jae-Joon Lee wrote: > On Mon, Mar 7, 2011 at 7:36 PM, Yuri D'Elia wrote: > In fact, supporting the "bbox_inches" is a real hack. > As I mentioned in my previous email, matplotlib artists can have > spline paths. And artists can also be clipped by an arbitrary sp

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Jae-Joon Lee
On Mon, Mar 7, 2011 at 7:36 PM, Yuri D'Elia wrote: > I consider bbox_extra_artists some kind of a hack (IMHO, all artists should > be considered with a 'tight' box), but coming from gnuplot/asymptote maybe my > point of view is biased. > What would be the point of a 'tight' box that excludes par

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 10:33 AM, Yuri D'Elia wrote: > On Mon, 7 Mar 2011 09:25:23 -0600 > Benjamin Root wrote: > > > The problem is that you are creating your figure wrong. Try this: > > > > import matplotlib as mpl > > mpl.use("Agg") > > import matplotlib.pyplot as plt > > > > fig = plt.figure

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Yuri D'Elia
On Mon, 7 Mar 2011 09:25:23 -0600 Benjamin Root wrote: > The problem is that you are creating your figure wrong. Try this: > > import matplotlib as mpl > mpl.use("Agg") > import matplotlib.pyplot as plt > > fig = plt.figure(figsize=(20, 20)) > ax = fig.add_subplot(111) > ax.set_title("Subtitle

Re: [Matplotlib-users] Many basic questions i cant find solution

2011-03-07 Thread Muffles
Thankyou for the reply, ill test that in a minute, and let you know the result. Benjamin Root-2 wrote: > > On Mon, Mar 7, 2011 at 10:01 AM, Muffles wrote: > > Can you include a screenshot of what you see? > > Here it is: http://old.nabble.com/file/p31089197/hov.png Thank you -- View th

Re: [Matplotlib-users] Many basic questions i cant find solution

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 10:01 AM, Muffles wrote: > > Hello, i am not a user of matplotlib, i just have to do something in it. > I managed to get the plot i wanted, but i have been going around for hours > trying to do some fine tuning and cant get around it. The matplotlib seems > way too extense

Re: [Matplotlib-users] Legend outside the plot

2011-03-07 Thread Yuri D'Elia
On Mon, 7 Mar 2011 09:08:29 -0600 Benjamin Root wrote: > Matplotlib is designed to give you maximum control over the figure elements > while still maintaining sensible defaults. This is helpful in some cases, > and not so helpful in others. In your case of placing a legend outside an > axes, ca

Re: [Matplotlib-users] Can't set scatter plot point color

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 1:29 AM, Eric Firing wrote: > On 03/06/2011 09:14 PM, Thomas Lecocq wrote: > > Dear, > > > > Please also note that '+' and 'x' are "lines", hence if you want them > > coloured, you'll need to set edgecolor="g" rather than just color='g' ... > > Exactly, but in the scatter c

[Matplotlib-users] Many basic questions i cant find solution

2011-03-07 Thread Muffles
Hello, i am not a user of matplotlib, i just have to do something in it. I managed to get the plot i wanted, but i have been going around for hours trying to do some fine tuning and cant get around it. The matplotlib seems way too extense for me to find the solutions without studying it avidly, an

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 4:36 AM, Yuri D'Elia wrote: > On Fri, 4 Mar 2011 14:57:34 -0600 > Benjamin Root wrote: > > > Which version of matplotlib are you using? This example works for me > using > > the latest matplotlib from source. Also, why the awkward usage and > > Yes, with matplotlib 1.0 b

Re: [Matplotlib-users] Legend outside the plot

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 5:22 AM, Yuri D'Elia wrote: > Hi everyone. I'm a newbye to matplotlib, so excuse my naive questions. I > have a large experience with gnuplot and asymptote, and I only recently > started to experiment with matplotlib. > > Some background: I'm trying to use matplotlib mostly

Re: [Matplotlib-users] Basemap interp nearest neighbor

2011-03-07 Thread Jeff Whitaker
On 3/7/11 7:38 AM, Aman Thakral wrote: On a similar note, are there any alternatives available to nearest neighbor? For example, kriging? I remember seeing a geostats library in python (hpgl i think), but I found the API rather impractical and difficult to use. Thanks, Aman Aman: The bas

Re: [Matplotlib-users] Text box adaptable

2011-03-07 Thread Benjamin Root
On Mon, Mar 7, 2011 at 5:05 AM, Andrea Crotti wrote: > Here I am again with the text boxing and scaling. > I'm having some troubles to understand the whole picture, since it seems > that there are so many actors involved. > > So suppose I have some text and I want to see how big it is, I thought >

Re: [Matplotlib-users] Basemap interp nearest neighbor

2011-03-07 Thread Aman Thakral
On a similar note, are there any alternatives available to nearest neighbor? For example, kriging? I remember seeing a geostats library in python (hpgl i think), but I found the API rather impractical and difficult to use. Thanks, Aman On Mon, Mar 7, 2011 at 8:23 AM, Jeff Whitaker wrote: > On

Re: [Matplotlib-users] Basemap interp nearest neighbor

2011-03-07 Thread Jeff Whitaker
On 3/7/11 5:50 AM, Jeff Whitaker wrote: > On 3/6/11 8:58 PM, Juan A. Saenz wrote: >> Hi, >> >> I use Basemap and netCDF4-python on a regular basis, and find them >> very useful tools. Thank you for developing them! >> >> I noticed that when using basemap.interp for nearest neighbor >> (order=0) the

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Yuri D'Elia
On Mon, 7 Mar 2011 11:36:45 +0100 Yuri D'Elia wrote: > On Fri, 4 Mar 2011 14:57:34 -0600 > Benjamin Root wrote: > > > Which version of matplotlib are you using? This example works for me using > > the latest matplotlib from source. Also, why the awkward usage and > > Yes, with matplotlib 1.0

Re: [Matplotlib-users] Basemap interp nearest neighbor

2011-03-07 Thread Jeff Whitaker
On 3/6/11 8:58 PM, Juan A. Saenz wrote: > Hi, > > I use Basemap and netCDF4-python on a regular basis, and find them > very useful tools. Thank you for developing them! > > I noticed that when using basemap.interp for nearest neighbor > (order=0) the interpolation is not masked, and nearest neigh

Re: [Matplotlib-users] [Numpy-discussion] Anybody going to PyCon?

2011-03-07 Thread Miguel de Val-Borro
Hi Gökhan, I will present a poster about astronomical data reduction and visualization on Sunday. I will arrive to Atlanta on Wednesday morning to attend a couple of tutorials before the conference and look forward to participating in sprints or other activities. Regards, Miguel On Mon, Mar 07,

[Matplotlib-users] Legend outside the plot

2011-03-07 Thread Yuri D'Elia
Hi everyone. I'm a newbye to matplotlib, so excuse my naive questions. I have a large experience with gnuplot and asymptote, and I only recently started to experiment with matplotlib. Some background: I'm trying to use matplotlib mostly for complex plots with a lot of data. Gnuplot is usually f

Re: [Matplotlib-users] Text box adaptable

2011-03-07 Thread Andrea Crotti
Here I am again with the text boxing and scaling. I'm having some troubles to understand the whole picture, since it seems that there are so many actors involved. So suppose I have some text and I want to see how big it is, I thought I could t = matplotlib.text.Text(0, 0, "very long string") t.ge

Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-07 Thread Yuri D'Elia
On Fri, 4 Mar 2011 14:57:34 -0600 Benjamin Root wrote: > Which version of matplotlib are you using? This example works for me using > the latest matplotlib from source. Also, why the awkward usage and Yes, with matplotlib 1.0 bbox_extra_artists now works. I consider bbox_extra_artists some ki

[Matplotlib-users] Anybody going to PyCon?

2011-03-07 Thread Gökhan Sever
Hello, I am going to the PyCon this week. I am presenting a poster about an atmospheric sciences related project -- the most active development from my coding site over at http://code.google.com/p/ccnworks/ Is there anybody in the community participating there as well? Any plans for sprinting or