Re: [Matplotlib-users] Ticks direction

2010-11-02 Thread Eric Firing
On 11/02/2010 03:18 PM, Jae-Joon Lee wrote: > A quick (and not safe) way w/ mpl v1.0 is, > > ax = plt.subplot(111) > ax.plot(np.arange(3)) > > ax.set_xticks([0, 0.5, 1., 1.5, 2.]) > > mytick = ax.xaxis.majorTicks[2] > mytick._apply_params(tickdir="out") > > I don't think th

[Matplotlib-users] How should I plot clustered data?

2010-11-02 Thread David Frey
I am trying to use matplotlib (for the first time) to graph the address space usage of an application against time. The data is written to a log file by trace statements throughout the source code of the application. The trace statements contain the current address space usage as well as a tim

Re: [Matplotlib-users] Shadowed Text?

2010-11-02 Thread Nikolaus Rath
Hi, Fantastic, path_effect is exactly what I'm looking for. Thanks! -Niko On 11/02/2010 10:16 PM, Jae-Joon Lee wrote: > You may use annotate with which you can specify offsets. > > http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=annotate#matplotlib.pyplot.annotate > > Or, you m

Re: [Matplotlib-users] Auto-wrapping text within a plot... Is there a simpler solution?

2010-11-02 Thread Joe Kington
For whatever it's worth, after a lot of wrangling, I think I solved most of my problems (though perhaps not in the most efficient way). In case anyone else is looking for similar functionality, here's a callback function that will autowrap text objects to the inside of the axis they're plotted in,

Re: [Matplotlib-users] Shadowed Text?

2010-11-02 Thread Jae-Joon Lee
You may use annotate with which you can specify offsets. http://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=annotate#matplotlib.pyplot.annotate Or, you may consider to use the path_effect (available w/ v1.0). http://matplotlib.sourceforge.net/examples/pylab_examples/patheffect_demo.

[Matplotlib-users] Shadowed Text?

2010-11-02 Thread Nikolaus Rath
Hello, I am placing a text object in a place where the background is sometimes dark and sometimes light, so the text is hard to see. Adding a background to the text object itself looks a bit ugly, so I am wondering if there is a way to add a shadow to the text itself. What's the best way to do th

Re: [Matplotlib-users] Ticks direction

2010-11-02 Thread Jae-Joon Lee
A quick (and not safe) way w/ mpl v1.0 is, ax = plt.subplot(111) ax.plot(np.arange(3)) ax.set_xticks([0, 0.5, 1., 1.5, 2.]) mytick = ax.xaxis.majorTicks[2] mytick._apply_params(tickdir="out") I don't think there is a way to do this only using public apis. I myself actually p

Re: [Matplotlib-users] reprojecting a Gaussian Grid to a regular grid [SOLVED]

2010-11-02 Thread John
I guess sometimes its best to dig into ipython. I apparently misunderstood interp, but it seems it doesn't need to be used only with grids created from a Basemap instance. I created the following function which accomplishes my goals (I know this shouldn't all be in one function, I'll look into maki

Re: [Matplotlib-users] show(), the state of the art

2010-11-02 Thread Eric Firing
On 11/02/2010 04:39 AM, Alan G Isaac wrote: On 11/2/2010 10:06 AM, Benjamin Root wrote: I have personally seen significant progress in this area, but there are a few backends that aren't quite right (MacOSX backend, I believe?). I believe multiple uses of ``show`` fail and are expected to fa

[Matplotlib-users] reprojecting a Gaussian Grid to a regular grid

2010-11-02 Thread John
Hello, I have a set of data on a Gaussian grid. I have a latitude array, a longitude array, and a data array: In [121]: vlats.shape Out[121]: (880, 1760) In [122]: vlons.shape Out[122]: (880, 1760) In [123]: vtypes.shape Out[123]: (880, 1760) The longitude seems to go from -360 to 0.6, the latitud

[Matplotlib-users] Fwd: help creating a netcdf file with an irregular grid projection (stereographic)

2010-11-02 Thread John
I have a file now, that I created from a NCEP grib file. I'm trying to get the land sea mask and the veg types into 0.5x0.5 lat/lon regular grids. However, they are still in Gaussian Grids, but at least I have it assembled into netcdf files! I'll follow up on a post about the conversion. but I woul

[Matplotlib-users] FW: edgecolor="black" not drawing properly

2010-11-02 Thread david.briant
Hi The option to set the edge of a mpl canvas isn't working properly - it's out by one pixel on the top and right hand sides. Python 2.6.6, wx, mpl 1.0. Could this be added to the bug list to be fixed please? Thx David import wx from wx.lib.scrolledpanel import ScrolledPanel import matplotlib

Re: [Matplotlib-users] Setting tick labels for matshow

2010-11-02 Thread Stan West
> From: Nikolaus Rath [mailto:nikol...@rath.org] > Sent: Saturday, October 30, 2010 16:17 > > but if I try to do the same think with the Y axis, everything looks > messed up (e.g. the matrix is no longer square): The matrix remains square for me using a build from Subversion. What's your matplo

Re: [Matplotlib-users] Newbie: How to change style of tick labels inloglog plot

2010-11-02 Thread Stan West
From: Gino Serpa [mailto:gino.se...@gmail.com] Sent: Sunday, October 31, 2010 13:52 I am trying to change the format of the tick labels in a loglog plot from exponential to decimal. Right now the labels are 10^2 10 1 10^-1 10^-2 and I would like them to be 100 10 1 0.1 0.01 I tried finding

Re: [Matplotlib-users] Bug in set_yscale?

2010-11-02 Thread Pål Gunnar Ellingsen
Hi Thank you. I installed the latest from svn and it now works. Regards Pål On 2 November 2010 15:21, Benjamin Root wrote: > On Tue, Nov 2, 2010 at 8:20 AM, Pål Gunnar Ellingsen wrote: > >> Hi >> >> I'm trying to use the linthershy option for symlog in >> matplotlib.axes.Axes.set_yscale() >

Re: [Matplotlib-users] show(), the state of the art

2010-11-02 Thread Alan G Isaac
On 11/2/2010 10:06 AM, Benjamin Root wrote: > I have personally seen significant progress in this area, but there are a few > backends that aren't quite right (MacOSX backend, I believe?). I believe multiple uses of ``show`` fail and are expected to fail for the foreseeable future when using IDL

Re: [Matplotlib-users] Bug in set_yscale?

2010-11-02 Thread Benjamin Root
On Tue, Nov 2, 2010 at 8:20 AM, Pål Gunnar Ellingsen wrote: > Hi > > I'm trying to use the linthershy option for symlog in > matplotlib.axes.Axes.set_yscale() > for > values smaller than 1, but the plot then sho

Re: [Matplotlib-users] NCEP Grib Definitions

2010-11-02 Thread Benjamin Root
On Tue, Nov 2, 2010 at 9:00 AM, John wrote: > Thanks Ben! > > I guess where I am with this now is that I have found, as you say, the > VGTYP in the > operational products (the *sflux* grib files), but I don't find it on > any of the 0.5 x 0.5 degree files. Which means, that as you say, I'll > hav

Re: [Matplotlib-users] show(), the state of the art

2010-11-02 Thread Benjamin Root
On Tue, Nov 2, 2010 at 8:31 AM, Daπid wrote: > On Tue, Nov 2, 2010 at 12:49 PM, David Kremer > wrote: > > Personally I used show() yesterday, and it blocks the execution until > > the figure's window is closed. It is of perfect convenience I think, > > as a default behavior. > > Yes, this is the

Re: [Matplotlib-users] NCEP Grib Definitions

2010-11-02 Thread John
Thanks Ben! I guess where I am with this now is that I have found, as you say, the VGTYP in the operational products (the *sflux* grib files), but I don't find it on any of the 0.5 x 0.5 degree files. Which means, that as you say, I'll have to figure out how to reproject the data from the Gaussian

Re: [Matplotlib-users] NCEP Grib Definitions

2010-11-02 Thread Benjamin Root
On Tue, Nov 2, 2010 at 5:19 AM, John wrote: > Maybe I should also follow up on this and indicate that one variable I > really want is the Veg Type defiinitions from the files. It exists in > the file from joewheatley's example, (VGTYP_P0_L1_GGA0) but it is on a > Gaussian lat/lon grid. I've downl

Re: [Matplotlib-users] show(), the state of the art

2010-11-02 Thread Daπid
On Tue, Nov 2, 2010 at 12:49 PM, David Kremer wrote: > Personally I used show() yesterday, and it blocks the execution until > the figure's window is closed. It is of perfect convenience I think, > as a default behavior. Yes, this is the optimal behavior, but it is not fully implemented, as seen

[Matplotlib-users] Bug in set_yscale?

2010-11-02 Thread Pål Gunnar Ellingsen
Hi I'm trying to use the linthershy option for symlog in matplotlib.axes.Axes.set_yscale() for values smaller than 1, but the plot then shows large values (vertical lines) for the points which should have been in

Re: [Matplotlib-users] show(), the state of the art

2010-11-02 Thread David Kremer
2010/11/2 Michael Droettboom : > On 11/02/2010 07:49 AM, David Kremer wrote: >> Personally I used show() yesterday, and it blocks the execution until >> the figure's window is closed. It is of perfect convenience I think, >> as a default behavior. >> >> However, I would like to add an option to sho

Re: [Matplotlib-users] show(), the state of the art

2010-11-02 Thread Michael Droettboom
On 11/02/2010 07:49 AM, David Kremer wrote: > Personally I used show() yesterday, and it blocks the execution until > the figure's window is closed. It is of perfect convenience I think, > as a default behavior. > > However, I would like to add an option to show() like eg : > > >> show( save_im

Re: [Matplotlib-users] show(), the state of the art

2010-11-02 Thread David Kremer
Personally I used show() yesterday, and it blocks the execution until the figure's window is closed. It is of perfect convenience I think, as a default behavior. However, I would like to add an option to show() like eg : > show( save_image = True , format = 'eps' ) As it permits to mix the two b

[Matplotlib-users] show(), the state of the art

2010-11-02 Thread Daπid
Hello. It is stated that show() should be the last function in a script, as long as it will stop the execution of the program. Nevertheless, I have seen that the current behavior is just a pause in the flow, and it will be restored when the window is closed. The documentation says: "Many users a

Re: [Matplotlib-users] NCEP Grib Definitions

2010-11-02 Thread John
Maybe I should also follow up on this and indicate that one variable I really want is the Veg Type defiinitions from the files. It exists in the file from joewheatley's example, (VGTYP_P0_L1_GGA0) but it is on a Gaussian lat/lon grid. I've downloaded some of the gfs files from the 0.5 x 0.5 degree

[Matplotlib-users] NCEP Grib Definitions

2010-11-02 Thread John
Folks, I'm trying to find documentation online that provides guidance on what all the variables are that are in the NCEP model output grib files. There are many NCEP models, so to be clear, I'm referring to the GFS 0.5x0.5 degree product. I was looking at this nice blog: http://joewheatley.net/nc