Re: [Matplotlib-users] Turning off minor grids on log scaled plot

2010-04-19 Thread Matthias Michler
On Sunday 18 April 2010 00:52:57 Gökhan Sever wrote: Hello, Let say we have a figure created by: plt.plot(range(100)) On WX backend plt.grid(1) or key G responds finely for turning on/off the grid lines. However when I log-scale both axes then plt.grid(1 or 0) or G doesn't respond on

Re: [Matplotlib-users] install from svn on Linux not working for me

2010-04-19 Thread LUK ShunTim
On 04/19/2010 01:52 PM, C M wrote: My goal is to just get the lastest svn version of matplotlib, or, if not that, just the 0.99 version, up and working on my Linux (Intrepid Ibex) computer. I checked it matplotlib out from svn fine, and then, as per the webpage, did: cd matplotlib python

Re: [Matplotlib-users] install from svn on Linux not working for me

2010-04-19 Thread Darren Dale
On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim lukshun...@gmail.com wrote: On 04/19/2010 01:52 PM, C M wrote: My goal is to just get the lastest svn version of matplotlib, or, if not that, just the 0.99 version, up and working on my Linux (Intrepid Ibex) computer.  I checked it matplotlib out

Re: [Matplotlib-users] overflow...

2010-04-19 Thread Samuel Teixeira Santos
anyone could give me a hint about? 2010/4/16 Samuel Teixeira Santos arcano...@gmail.com Hi all... my code is that: http://dpaste.com/184551/ the problem is that code is using on an web app. When I request the graph after press submit button they generate the graph perfect I do that

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
It looks like the end of the traceback -- where the actual exception is named -- is missing. Can you repost it in its entirety? Mike william ratcliff wrote: Hi! I am using matplotlib 0.99.0 under windows xp. I tried the following: ax.text(.96,.80,r'$P \perp

Re: [Matplotlib-users] matplotlib sphinxext and savefig

2010-04-19 Thread Michael Droettboom
It's not currently possible, but could be added by defining another directive option and passing that to the savefig call within the plot directive. If you're not able to do this yourself, would you mind filing a bug and linking to it here so it doesn't get forgotten? Mike Thomas Robitaille

Re: [Matplotlib-users] Embedding an MPL Canvas/Figure in a PyGTK Container

2010-04-19 Thread Michael Droettboom
The problem is really that the window is too small, the text is too large, and/or the axes is too large within the figure. Try one or more of the following: Replace the values for win.set_default_size to something larger, eg. win.set_default_size(800,600) Replace the fig.add_subplot call

Re: [Matplotlib-users] overflow...

2010-04-19 Thread Michael Droettboom
I'm not sure I understand the question. Can you provide a standalone script that illustrates the problem, or at least a picture? Mike Samuel Teixeira Santos wrote: anyone could give me a hint about? 2010/4/16 Samuel Teixeira Santos arcano...@gmail.com mailto:arcano...@gmail.com Hi

Re: [Matplotlib-users] Bold Latex Tick-Labels

2010-04-19 Thread Friedrich Romstedt
http://matplotlib.sourceforge.net/api/ticker_api.html#matplotlib.ticker.FuncFormatter 2010/4/10 konstellationen konstellatio...@gmail.com: For future reference, the solution proposed by Gökhan and Diakronik is to replace the Latex tick-labels with strings: import matplotlib.pyplt as plt

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
I think the actual error was: TypeError: cannot return std::string from Unicode object It was the error returned when I walked through with a debugger... On Mon, Apr 19, 2010 at 8:51 AM, Michael Droettboom md...@stsci.edu wrote: It looks like the end of the traceback -- where the actual

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
I'm not able to reproduce that here, with either SVN or 0.99.1.2. Do you have any font-related or mathtext-related settings in your matplotlibrc? Mike william ratcliff wrote: I think the actual error was: TypeError: cannot return std::string from Unicode object It was the error returned

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
One might see that error if the path to the font being used contains non-ascii characters (the basename variable in the last frame of the stack in the stacktrace). Is that possible? We may need to implement the same workaround we use for image files for loading fonts (which is to open the

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
Assuming that the matplotlibrc file being read is in mpl-data, here is the relevant section: ### FONT # # font properties used by text.Text. See # http://matplotlib.sourceforge.net/api/font_manager_api.html for more # information on font properties. The 6 font properties used for font #

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
Does forcibly casting the path to a string resolve the problem? i.e. applying this patch: Index: mathtext.py === --- mathtext.py (revision 8216) +++ mathtext.py (working copy) @@ -597,7 +597,7 @@ cached_font =

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
On the plus side, there is no longer an error when I apply the patch. On the downside, it generates a rather strange symbol instead of a perpendicular symbolLet me try to quickly upgrade to 0.99.1. I did that and I seem to get the same error... On Mon, Apr 19, 2010 at 10:49 AM, Michael

[Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread C M
-- Forwarded message -- From: C M cmpyt...@gmail.com Date: Mon, Apr 19, 2010 at 1:02 PM Subject: Re: [Matplotlib-users] install from svn on Linux not working for me To: Darren Dale dsdal...@gmail.com On Mon, Apr 19, 2010 at 8:02 AM, Darren Dale dsdal...@gmail.com wrote: On Mon,

[Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread C M
-- Forwarded message -- From: C M cmpyt...@gmail.com Date: Mon, Apr 19, 2010 at 12:58 PM Subject: Re: [Matplotlib-users] install from svn on Linux not working for me To: LUK ShunTim lukshun...@gmail.com On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim lukshun...@gmail.com wrote: On

Re: [Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread Mauro Cavalcanti
As I posted before, I ran across precisely these same errors when upgrading my Ubuntu box and the Python interpreter. You will need to install other dependencies as the installation log shows (gtk-2.0+, pygtk), including its development versions. And yes, distributing a packaged Python

Re: [Matplotlib-users] savefig Memory Leak

2010-04-19 Thread K . -Michael Aye
On 2010-04-16 19:18:56 +0200, Keegan Callin said: Hello, I have written a small script that, I think, demonstrates a memory leak in savefig. A search of the mailing list shows a thread started by Ralf Gommers ralf.gomm...@googlemail.com about 2009-07-01 that seems to cover a very

Re: [Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread Michael Droettboom
On Debian/Ubuntu-like systems with apt-get, you can get all of the development headers required for matplotlib in one fell swoop with: sudo apt-get build-dep python-matplotlib Mike Mauro Cavalcanti wrote: As I posted before, I ran across precisely these same errors when upgrading my Ubuntu

Re: [Matplotlib-users] colorbar+log+latex

2010-04-19 Thread Jae-Joon Lee
I'm not sure if the default formatter needs to be changed. However, you may try import matplotlib.ticker as ticker formatter=ticker.LogFormatterMathtext() colorbar(format=formatter) which will render colorbar ticklabels with mathtext mode. Regards, -JJ On Fri, Apr 16, 2010 at 3:56 AM, Yves

Re: [Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread C M
On Mon, Apr 19, 2010 at 1:31 PM, Mauro Cavalcanti mauro...@gmail.com wrote: As I posted before, I ran across precisely these same errors when upgrading my Ubuntu box and the Python interpreter. You will need to install other dependencies as the installation log shows (gtk-2.0+, pygtk),

Re: [Matplotlib-users] savefig Memory Leak

2010-04-19 Thread Keegan Callin
Hello Michael, I have not tried using plt.figure() and plt.close(fig) but you are right; I should investigate it as well for completeness. I had, actually, purposefully avoided doing this because I read that the pyplot API is stateful. It keeps references to figures in the same way that

Re: [Matplotlib-users] controlling padding between axis and ticklabels in polar plots

2010-04-19 Thread Jae-Joon Lee
There seems no obvious way to change the padding. You may use *set_rgrids* method which takes rpad parameter but you need to specify the tick locations also. Here is a simple function taken from set_rgrids method, that only change the padding. def update_rpads(ax, rpad): angle =

Re: [Matplotlib-users] Is there an easy way to plot a log-frequency spectrogram?

2010-04-19 Thread David Ho
Just as an illustration, I'm looking for a nice way to plot something like this: http://labrosa.ee.columbia.edu/matlab/sgram/ I don't necessarily need a weighting matrix to convert the Pxx array, which is what Dan Ellis' code does; I just need to visualize the spectrogram on a logarithmic axis.

Re: [Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread Mauro Cavalcanti
2010/4/19 C M cmpyt...@gmail.com: And yes, distributing a packaged Python application which uses Matplotlib (either for Linux or Windows) is *not* an easy and simple matter. But with patience, it is possible. On Windows I've found it is close to  easy once you know to include the matplotlib

Re: [Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread Michael Droettboom
C M wrote: On Mon, Apr 19, 2010 at 1:31 PM, Mauro Cavalcanti mauro...@gmail.com wrote: As I posted before, I ran across precisely these same errors when upgrading my Ubuntu box and the Python interpreter. You will need to install other dependencies as the installation log shows (gtk-2.0+,

Re: [Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread Darren Dale
On Mon, Apr 19, 2010 at 1:51 PM, C M cmpyt...@gmail.com wrote: On Mon, Apr 19, 2010 at 1:31 PM, Mauro Cavalcanti mauro...@gmail.com wrote: As I posted before, I ran across precisely these same errors when upgrading my Ubuntu box and the Python interpreter. You will need to install other

Re: [Matplotlib-users] Turning off minor grids on log scaled plot

2010-04-19 Thread Gökhan Sever
On Mon, Apr 19, 2010 at 1:31 AM, Matthias Michler matthiasmich...@gmx.netwrote: On Sunday 18 April 2010 00:52:57 Gökhan Sever wrote: Hello, Let say we have a figure created by: plt.plot(range(100)) On WX backend plt.grid(1) or key G responds finely for turning on/off the grid

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
The puzzling thing is this: u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF' It's using a custom font in mathtext. Are you setting the rcParams mathtext.fontset or mathtext.default? That may the culprit, and if not, it's a bug that it's trying to use that font. Mike william ratcliff wrote: On the plus

Re: [Matplotlib-users] Is there an easy way to plot a log-frequency spectrogram?

2010-04-19 Thread Eric Firing
David Ho wrote: Just as an illustration, I'm looking for a nice way to plot something like this: http://labrosa.ee.columbia.edu/matlab/sgram/ I don't necessarily need a weighting matrix to convert the Pxx array, which is what Dan Ellis' code does; I just need to visualize the

Re: [Matplotlib-users] Bold Latex Tick-Labels

2010-04-19 Thread Friedrich Romstedt
2010/4/19 Friedrich Romstedt friedrichromst...@gmail.com: http://matplotlib.sourceforge.net/api/ticker_api.html#matplotlib.ticker.FuncFormatter For exponential ticks, I would propose (but it's untested): def exp_fmt(loc):        exponent = numpy.round(numpy.log10(loc))        return

Re: [Matplotlib-users] Bold Latex Tick-Labels

2010-04-19 Thread Michael Droettboom
Friedrich Romstedt wrote: 2010/4/19 Friedrich Romstedt friedrichromst...@gmail.com: What is the advantage of using matplotlib.ticker.ScalarFormatter(useMathText = True) then, when it's typeset in outside-math font anyway? It's the only way to get superscripts (well, Unicode has

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread Michael Droettboom
Hmm... I'm a bit stumped. Can you print out the values of these from your script, i.e. put the following at the top: from matplotlib import rcParams print rcParams['mathtext.fontset'] print rcParams['mathtext.default'] Can you try deleting your fontList.cache file? Mike william

Re: [Matplotlib-users] Is there an easy way to plot a log-frequency spectrogram?

2010-04-19 Thread Friedrich Romstedt
2010/4/19 Eric Firing efir...@hawaii.edu: David Ho wrote: Just as an illustration, I'm looking for a nice way to plot something like this: http://labrosa.ee.columbia.edu/matlab/sgram/ I don't necessarily need a weighting matrix to convert the Pxx array, which is what Dan Ellis' code does; I

Re: [Matplotlib-users] Bold Latex Tick-Labels

2010-04-19 Thread Friedrich Romstedt
2010/4/19 Michael Droettboom md...@stsci.edu: Friedrich Romstedt wrote:   What is the advantage of using matplotlib.ticker.ScalarFormatter(useMathText = True) then, when it's typeset in outside-math font anyway? It's the only way to get superscripts (well, Unicode has superscript

Re: [Matplotlib-users] Fwd: install from svn on Linux not working for me

2010-04-19 Thread C M
Michael and Darren (and others), I've used svn before to download pure Python code, but never to get anything that needed to be built. I'm fairly out to sea here, so thanks for the patience. When building from source, you also need the header files (*.h files) of all of matplotlib's

[Matplotlib-users] multiple canvases, one Navigation Toolbar

2010-04-19 Thread Mathew Yeates
Hi I want to have a single Navigation Toolbar that lets me do things like .. Zoom to rect in one figure and see this change in all figures. Anybody think this can be done? Any thoughts? Mathew -- Download

Re: [Matplotlib-users] multiple canvases, one Navigation Toolbar

2010-04-19 Thread Ryan May
On Mon, Apr 19, 2010 at 4:55 PM, Mathew Yeates mat.yea...@gmail.com wrote: Hi I want to have a single Navigation Toolbar that lets me do things like  .. Zoom to rect in one figure and see this change in all figures. Anybody think this can be done? Any thoughts? You can have the plots

Re: [Matplotlib-users] multiple canvases, one Navigation Toolbar

2010-04-19 Thread Mathew Yeates
Will this work for multiple figures? On 4/19/10, Ryan May rma...@gmail.com wrote: On Mon, Apr 19, 2010 at 4:55 PM, Mathew Yeates mat.yea...@gmail.com wrote: Hi I want to have a single Navigation Toolbar that lets me do things like  .. Zoom to rect in one figure and see this change in all

[Matplotlib-users] Problem with Basemap and Python 2.6 under Windows XP

2010-04-19 Thread Mauro Cavalcanti
Dear Jeff and ALL, I have recently installed Python 2.6.5 (the official version downloaded from python.org) on a Windows XP machine (running Win XP Professional Edition with Service Pack 2), after removing the previous version of the interpreter (Python 2.5) and all associated libraries

Re: [Matplotlib-users] Is there an easy way to plot a log-frequency spectrogram?

2010-04-19 Thread Eric Firing
Friedrich Romstedt wrote: 2010/4/19 Eric Firing efir...@hawaii.edu: David Ho wrote: Just as an illustration, I'm looking for a nice way to plot something like this: http://labrosa.ee.columbia.edu/matlab/sgram/ I don't necessarily need a weighting matrix to convert the Pxx array, which is

Re: [Matplotlib-users] Problem with Basemap and Python 2.6 under Windows XP

2010-04-19 Thread Christoph Gohlke
I can not reproduce this with 32-bit Python 2.6.5, numpy 1.3.0, matplotlib 0.99.1 and basemap 0.99.4 on Windows 7/C2Q. However, the basemap 0.99.4 binary does not work with numpy 1.4.x. Depending on how you installed Python you might also need to install the Microsoft Visual C++ 2008

Re: [Matplotlib-users] Embedding an MPL Canvas/Figure in a PyGTK Container

2010-04-19 Thread Vamsi Vytla
Thanks for your reply Mike. Looks like fig.add_axes(..) works the best for me for now. If my situation gets worse I will try and look into calls that allocate window area for the figure/canvas in a container. Thanks again! On Mon, Apr 19, 2010 at 6:03 AM, Michael Droettboom md...@stsci.edu