Re: [Matplotlib-users] Pylab breaks locales with GTK

2009-01-05 Thread Michael Droettboom
It's a bug with PyGTK in that merely importing it sets the locale. But more seriously, it's also a bug in Numpy, in that its string formatting is dependent on locale (unlike standard floats in Python). See this Numpy bug: http://projects.scipy.org/scipy/numpy/ticket/902 * *and this mailing

Re: [Matplotlib-users] Switching between different font settings

2009-01-05 Thread Jouni K . Seppänen
Johan Ekh ekh.jo...@gmail.com writes: So far I've tried reading a file with settings specific to the current document and using rcParams.update(params) to dynamically change the settings. This seems to me to be a good way of switching between settings. This way I can get the right font for

Re: [Matplotlib-users] print_figure with animated objects

2009-01-05 Thread John Hunter
On Mon, Jan 5, 2009 at 9:30 AM, zndlf-...@yahoo.es wrote: but doing so does not save the lines. The only workaround I've found is to set animated=false for all the objects, print the figure and then set animated=true again. Yes, that is the way to do it -- we could add some logic to savefig

Re: [Matplotlib-users] problems returning to main program after ploting a figure

2009-01-05 Thread flo_wer
It looks like you are trying to use pyplot is an embedded GUI and you might be better off trying to embed mpl in the GUI following the examples at... You were right about that. Thanks for the refererences. it helped a lot. The code is a bit longer now and contains parts from the examples that

Re: [Matplotlib-users] getting text size _before_ plotting

2009-01-05 Thread Jeff Whitaker
Michael Hearne wrote: All: I'm trying to make a map (using Basemap), and plot names of cities on that map. I'd like to avoid collisions of city names (where the bounding boxes of the text objects would overlap), but I'm having trouble figuring out how I can do this without actually

[Matplotlib-users] Colormap range and data values

2009-01-05 Thread antonv
Hi all, I have an issue with the colormap for my plots. The data I'm plotting ranges between 0 and 24 but I am trying to have the colormap display values from 0 to 30. What happens is that the colormap reads the min and max values in my data and uses those disregarding the vmin and vmax set.

[Matplotlib-users] problems returning to main program after ploting a figure

2009-01-05 Thread flo_wer
Hi, I am using matplotlib to create a figure in a pythonCard script that looks like this def on_button_mouseClick(self, event): import matplotlib.pyplot as plt plt.figure(1) for point in list: plt.plot([x],[y],'bo') plt.title('Water

Re: [Matplotlib-users] [matplotlib-devel] What would you like to see in a book about Matplotlib?

2009-01-05 Thread Andrew Straw
Hi Sandro, It's great news that a book may come out on MPL. Speaking as an aspiring university professor in neuroscience, I would like to see something that could be used as a resource for undergraduate students just learning Python and MPL. Due to this perspective, I think such a book would

[Matplotlib-users] Pylab breaks locales with GTK

2009-01-05 Thread Lionel Roubeyrie
Hi all, Trying to write to text files some plotted datas, we have a strange behavour on masked arrays after importing pylab, with the dot decimal separator replaced by a comma (but not all) : ## Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49) [GCC 4.3.2] on linux2

[Matplotlib-users] print_figure with animated objects

2009-01-05 Thread zndlf-web
Hello: I would like to know how to print_figure or savefig with animated elements. The only thing I get is the axis but no animated objects. The idea is that I've written a program embedding matplotlib in wx and then I create plots and animations in a similar way as in the example

Re: [Matplotlib-users] What would you like to see in a book about Matplotlib?

2009-01-05 Thread Russell E. Owen
In article 8b2d7b4d0901050152p4c7487a8m21fb7fb823297...@mail.gmail.com, Sandro Tosi mo...@debian.org wrote: Hello and Happy 2009! I received the interesting proposal to author a book on Matplotlib, the powerful 2D plotting library for Python. While preparing the arguments list, I'd like

[Matplotlib-users] typecode() in mlab.cohere_pairs

2009-01-05 Thread Sven Schreiber
Hi, I'm stumbling (=getting an error) over the fact that cohere_pairs in the mlab module makes use of an unknown typecode() function. I'm guessing that typecode(X) comes from the pre-numpy era, and maybe it should be X.dtype or X.dtype.char or whatever. Is this a known bug, is it a bug at all,

Re: [Matplotlib-users] How to get Text dimensions

2009-01-05 Thread Matthias Michler
On Monday 22 December 2008 14:24:06 Franta wrote: Hi, when I have a Text instance, how can I get the dimensions of it? Hello, I think with dimensions you mean the width height and/or the corresponding corners of the box surrounding the text (its bounding box). I attached an example, which

[Matplotlib-users] getting text size _before_ plotting

2009-01-05 Thread Michael Hearne
All: I'm trying to make a map (using Basemap), and plot names of cities on that map. I'd like to avoid collisions of city names (where the bounding boxes of the text objects would overlap), but I'm having trouble figuring out how I can do this without actually drawing the text on the figure.

Re: [Matplotlib-users] Pylab breaks locales with GTK

2009-01-05 Thread Lionel Roubeyrie
Thanks for your responses, Looking comments in the tickets, putting import locale locale.setlocale(locale.LC_NUMERIC, 'C') after the pylab import resolves the problem (but not the bug...). Have a happy new year Le lundi 05 janvier 2009 à 15:37 +0100, Lionel Roubeyrie a écrit : Hi all, Trying

[Matplotlib-users] ploting a logarithmic regression to scattered data ?

2009-01-05 Thread Oz Nahum
Hi, I can't find a way to do a logarithmic regression in matplotlib, This can be done relatively easily in spread sheets like gnumeric and excel. Has anyone got a clue how to do it ? Thanks, Oz. -- Imagine there's no countries It isn't hard to do Nothing

Re: [Matplotlib-users] Pylab breaks locales with GTK

2009-01-05 Thread David Cournapeau
Hi Ryan, Ryan May wrote: Lionel Roubeyrie wrote: Hi all, Trying to write to text files some plotted datas, we have a strange behavour on masked arrays after importing pylab, with the dot decimal separator replaced by a comma (but not all) : ## Python 2.5.2

Re: [Matplotlib-users] Pylab breaks locales with GTK

2009-01-05 Thread Ryan May
Lionel Roubeyrie wrote: Hi all, Trying to write to text files some plotted datas, we have a strange behavour on masked arrays after importing pylab, with the dot decimal separator replaced by a comma (but not all) : ## Python 2.5.2 (r252:60911, Oct 5 2008,

Re: [Matplotlib-users] Pylab breaks locales with GTK

2009-01-05 Thread Michael Droettboom
This seems to be a bug (or at least inconsistent behavior) in numpy when the locale is set (which happens when gtk is imported -- replace 'import pylab' with 'import gtk' and you'll see the same behavior). We actually use a workaround for this in other parts of matplotlib, which is: for i

Re: [Matplotlib-users] What would you like to see in a book about Matplotlib?

2009-01-05 Thread João Luís Silva
Sandro Tosi wrote: Hello and Happy 2009! Hi, I received the interesting proposal to author a book on Matplotlib, the powerful 2D plotting library for Python. While preparing the arguments list, I'd like to hear even your opinion, because different points-of-view will lead to a better

Re: [Matplotlib-users] Removing buttons from the toolbar in MPL backends

2009-01-05 Thread John Hunter
On Mon, Jan 5, 2009 at 1:56 PM, Mauro Cavalcanti mauro...@gmail.com wrote: Dear ALL, Is there any way to exclude (ie., make invlsible) one or more of the standard buttons which appear on the toolbar (either the Classic or the Toolbar2) of the MPL backends? Thanks in advance for any

Re: [Matplotlib-users] What would you like to see in a book about Matplotlib?

2009-01-05 Thread Sandro Tosi
Hello João, thanks for replying On Mon, Jan 5, 2009 at 13:40, João Luís Silva jsi...@fc.up.pt wrote: Sandro Tosi wrote: - what are the (basic) things that, when you were beginning to use matplotlib, you wanted to see grouped up but couldn't find? I don't know if you consider it basic or not,

Re: [Matplotlib-users] [matplotlib-devel] What would you like to see in a book about Matplotlib?

2009-01-05 Thread Sandro Tosi
Hello Andrew, thanks for taking the time to reply. First of all, let me clarify that I received a proposal (and not the opposite) so some decision were already made about the book format. On Mon, Jan 5, 2009 at 20:00, Andrew Straw straw...@astraw.com wrote: Hi Sandro, It's great news that a

Re: [Matplotlib-users] [matplotlib-devel] What would you like to see in a book about Matplotlib?

2009-01-05 Thread Christopher Barker
Sandro Tosi wrote: The idea of the book is to start with simple plots, describing the methods we call and how they work, to go into more details along the book. I suggest that you focus on the OO interface, rather than the pylab interface from the beginning. This will ease the transition from

Re: [Matplotlib-users] [matplotlib-devel] What would you like to see in a book about Matplotlib?

2009-01-05 Thread Sandro Tosi
On Tue, Jan 6, 2009 at 00:20, Christopher Barker chris.bar...@noaa.gov wrote: Sandro Tosi wrote: The idea of the book is to start with simple plots, describing the methods we call and how they work, to go into more details along the book. I suggest that you focus on the OO interface, rather

Re: [Matplotlib-users] [matplotlib-devel] What would you like to see in a book about Matplotlib?

2009-01-05 Thread Christopher Barker
Sandro Tosi wrote: So you suggest to start from matplotlib.pyplot and not from pylab? actually, I think matpoltlib.pyplot still has all of pylab in it, just not all of numpy also. So yes, do that, but what I meant was to focus on using the OO interface, rather than the state machine interface:

Re: [Matplotlib-users] [matplotlib-devel] What would you like to see in a book about Matplotlib?

2009-01-05 Thread Sandro Tosi
On Tue, Jan 6, 2009 at 01:48, Christopher Barker chris.bar...@noaa.gov wrote: Sandro Tosi wrote: So you suggest to start from matplotlib.pyplot and not from pylab? actually, I think matpoltlib.pyplot still has all of pylab in it, just not all of numpy also. yes, pylab glues pyplot and numpy