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 wrote: > The probl

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 redistrib

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 : >> 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

[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 (includi

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

2010-04-19 Thread Ryan May
On Mon, Apr 19, 2010 at 5:29 PM, Mathew Yeates wrote: > Will this work for multiple figures? > Yes, with the caveat that the data ranges are synced, so if you're doing something like set_aspect('equal', 'datalims'), all the plots must have the same aspect ratio as well. Ryan -- Ryan May Gradua

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 wrote: > On Mon, Apr 19, 2010 at 4:55 PM, Mathew Yeates 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

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 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 share axes, look here

[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 Intel® Par

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 dependen

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

2010-04-19 Thread Friedrich Romstedt
2010/4/19 Michael Droettboom : > 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 > numerals,

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 : > 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

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 ratclif

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
>From my mpl-data directory, here's what's in the mathtext section of my matplotlibrc file: # The following settings allow you to select the fonts in math mode. # They map from a TeX font name to a fontconfig font pattern. # These settings are only used if mathtext.fontset is 'custom'. # Note that

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

2010-04-19 Thread Michael Droettboom
Friedrich Romstedt wrote: > 2010/4/19 Friedrich Romstedt : > > 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 numerals, but t

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

2010-04-19 Thread Friedrich Romstedt
2010/4/19 Friedrich Romstedt : > 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 '$10^%d$' % exponent

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 > spec

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] 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 wrote: > 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.

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 wrote: > On Mon, Apr 19, 2010 at 1:31 PM, Mauro Cavalcanti 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

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 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] Fwd: install from svn on Linux not working for me

2010-04-19 Thread Mauro Cavalcanti
2010/4/19 C M : >> 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 data files

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. I

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 = ax._r_label1_

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 MatL

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 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), including its developm

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

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 Ubunt

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 about > 2009-07-01 that seems to > cover a very similar issue. I have appe

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 application

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

2010-04-19 Thread C M
-- Forwarded message -- From: C M 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 On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim wrote: > On 04/19/2010 01:52 PM, C M wrote: >> My goal is to just get

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

2010-04-19 Thread C M
-- Forwarded message -- From: C M 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 On Mon, Apr 19, 2010 at 8:02 AM, Darren Dale wrote: > On Mon, Apr 19, 2010 at 4:30 AM, LUK ShunTim wrote: >> On 04/

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 Droet

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 = self._fonts.

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 # matchin

Re: [Matplotlib-users] Question about mathtext

2010-04-19 Thread william ratcliff
Mike, The basename is: u'C:\\WINDOWS\\Fonts\\HTOWERTI.TTF' Let me try to find where my matplotlibrc file is located... Thanks, William On Mon, Apr 19, 2010 at 10:22 AM, Michael Droettboom wrote: > One might see that error if the path to the font being used contains > non-ascii characters (the

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 f

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 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 wrote: > It looks like the end of the traceback -- where the actual exception is > named

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 : > > 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 >>tick_locs = range(start

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 > > > Hi all... > >

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 wit

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 w

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 > Q$',fontsize=18,horizonta

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

2010-04-19 Thread Mauro Cavalcanti
That's it. I had precisely these same problems when upgrading from Python 2.5 to 2.6 (which in turn happened when I upgraded from Ubuntu Intrepid to Jaunty, which BTW is *much better* than Intrepid). All issues were instantly solved by installing the Python development packages. Best wishes, 2010

Re: [Matplotlib-users] overflow...

2010-04-19 Thread Samuel Teixeira Santos
anyone could give me a hint about? 2010/4/16 Samuel Teixeira Santos > 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 for 6, 7 ti

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 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 from svn fine, a

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 >>