[Matplotlib-users] zorder seems to cause problems when embed python in latex files

2008-10-12 Thread chris
LaTeX can accept embedded Python code with a python.sty file. This is handy to dynamically generate plots with Matplotlib for a LaTeX slide presentation. I successfully embedded lots of matplotlib plot code into my slides and then had problems with zorder. For some reason zorder seems to mess up

Re: [Matplotlib-users] contours on unstructured triangle meshes

2008-10-12 Thread Eric Firing
Jeff Whitaker wrote: > Ian Curington wrote: >> Does anyone have extensions or hints on how to create high quality >> vector contour plots on unstructured triangle meshes, with values at >> nodes? I can convert to structured with griddata, but I much prefer to >> get a direct contour from the ori

Re: [Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Jesper Larsen
Hi Eric and Goyo Thanks for your comments and thanks for your working example, Goyo. Eric Firing <[EMAIL PROTECTED]>: > If you are only using savefig, not plotting to the screen, then you might as > well use the agg backend, not the gtkagg. I have previously used the agg backend without any prob

Re: [Matplotlib-users] Alter graph/labels based on zoom level

2008-10-12 Thread John Hunter
On Sun, Oct 12, 2008 at 9:01 PM, bwgoudey <[EMAIL PROTECTED]> wrote: > > Hi, > At the moment, I have a graph which has an un labelled x-axis and all i'm > drawing is a filled green rectangle every so often. I would like make it so > that when I zoom in to my graph past a certain threshold, the rec

[Matplotlib-users] Alter graph/labels based on zoom level

2008-10-12 Thread bwgoudey
Hi, At the moment, I have a graph which has an un labelled x-axis and all i'm drawing is a filled green rectangle every so often. I would like make it so that when I zoom in to my graph past a certain threshold, the rectangles change so that the first half is a different colour to the second ha

Re: [Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Eric Firing
Goyo wrote: > El lun, 13-10-2008 a las 00:41 +0200, Goyo escribió: > >> But I don't know how to set the dpi value this way. I tried to use the >> OO API but no success. > > Well yes... > > import matplotlib > matplotlib.use('GTKAgg') > from matplotlib import pyplot > fig = pyplot.figure(dpi=100)

Re: [Matplotlib-users] Calling xlim makes x tick labels format get lost

2008-10-12 Thread Eric Firing
Goyo wrote: > Hi all, > > I'm plotting time series and using a custom format for x tick labels > because I want to see both date and time. But calling xlim makes the > default format return -- only dates or only times, it depends on the > displayed interval. > > I can get my preferred format back

Re: [Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Goyo
El lun, 13-10-2008 a las 00:41 +0200, Goyo escribió: > But I don't know how to set the dpi value this way. I tried to use the > OO API but no success. Well yes... import matplotlib matplotlib.use('GTKAgg') from matplotlib import pyplot fig = pyplot.figure(dpi=100) ax = fig.add_subplot('111') ax.

Re: [Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Eric Firing
Goyo wrote: > I can't make much sense of this. You don't plot anything and don't use > canvas. > > This code works: > > import matplotlib > matplotlib.use('GTKAgg') > from matplotlib import pyplot > pyplot.plot([0, 1, 2, 3], [0, 1, 2, 3]) > fig = pyplot.gcf() > fig.savefig('test.jpg') fig.savefi

Re: [Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Goyo
I can't make much sense of this. You don't plot anything and don't use canvas. This code works: import matplotlib matplotlib.use('GTKAgg') from matplotlib import pyplot pyplot.plot([0, 1, 2, 3], [0, 1, 2, 3]) fig = pyplot.gcf() fig.savefig('test.jpg') But I don't know how to set the dpi value th

[Matplotlib-users] Calling xlim makes x tick labels format get lost

2008-10-12 Thread Goyo
Hi all, I'm plotting time series and using a custom format for x tick labels because I want to see both date and time. But calling xlim makes the default format return -- only dates or only times, it depends on the displayed interval. I can get my preferred format back by calling set_major_format

Re: [Matplotlib-users] updating a basemap

2008-10-12 Thread Mathew Yeates
never mind. Got it working. One annoying thing, though, when the line reaches the edge of the figure, a line is drawn horizontally to the other side. This doesn't happen when I display all of the points at once. Mathew Mathew Yeates wrote: > something isn't working > In my main routine I have >

Re: [Matplotlib-users] updating a basemap

2008-10-12 Thread Jeff Whitaker
Mathew Yeates wrote: > something isn't working > In my main routine I have > xpt,ypt= m(lons[0:500],lats[0:500]) > outlines=m.plot(xpt,ypt,'r-') #m is my basemap, outlines is a list of > size 1. Huh? Mathew: It's one line, so the list has one Line2D object. > > then in my update routine I have >

[Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Jesper Larsen
Hi matplotlib-users, I decided to try to make some plots that I have previously made in png format using the Agg backend in jpeg format using the GTKAgg backend (which I guess is the one I should use for this). Unfortunately my script exits with an error. I have therefore created a simple test scr

Re: [Matplotlib-users] updating a basemap

2008-10-12 Thread Mathew Yeates
something isn't working In my main routine I have xpt,ypt= m(lons[0:500],lats[0:500]) outlines=m.plot(xpt,ypt,'r-') #m is my basemap, outlines is a list of size 1. Huh? then in my update routine I have counter=0 def update(): global counter xpt,ypt= m(lons[counter*500:(counter+1)*500],la

Re: [Matplotlib-users] updating a basemap

2008-10-12 Thread Jeff Whitaker
Mathew Yeates wrote: > Hi > > I see the example of updating a plot in > examples/animation/gtk_timeout.py where the 2 lines > > line.set_ydata(np.random.rand(10)) > fig.canvas.draw_idle() > > > > What is the equivalent when I want to update a Basemap with new > latitudes and longitudes

[Matplotlib-users] updating a basemap

2008-10-12 Thread Mathew Yeates
Hi I see the example of updating a plot in examples/animation/gtk_timeout.py where the 2 lines line.set_ydata(np.random.rand(10)) fig.canvas.draw_idle() What is the equivalent when I want to update a Basemap with new latitudes and longitudes and I have done m=Basemap(..) m.plot(

[Matplotlib-users] plot_date mystery

2008-10-12 Thread Friedrich, Robin K
I'm having an unusually hard time with plotting some data on a date axis. All I want to do is plot several data series over a specific 8 week period. It works fine when I plot all the data (that is not specifying a date range) but when I try to use the axis command to put in my limits it puts the

Re: [Matplotlib-users] contours on unstructured triangle meshes

2008-10-12 Thread Jeff Whitaker
Ian Curington wrote: > Does anyone have extensions or hints on how to create high quality > vector contour plots on unstructured triangle meshes, with values at > nodes? I can convert to structured with griddata, but I much prefer to > get a direct contour from the original triangles. Thanks! I