[Matplotlib-users] IPython -pylab/-Xthread improvements in SVN - testers?

2008-01-31 Thread Fernando Perez
Hi all, sorry for the quick cross-post, but I know that many mpl users rely on the ipython -pylab support for interactive work. This is a call for testing from current SVN of anyone who uses ipython with the GUI thread support, whether via -pylab or directly via one of the -Xthread options. For

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Wayne E. Harlan
Eric: I have never seen any software which dealt with non uniform DPI settings, although that is always a possibility. And all the displays I have ever worked on/with have been the same for both H and V. ( I am a display engineer with over 25 years experience in CRT displays and a bit in flat

Re: [Matplotlib-users] pylab.save() File Name Syntax

2008-01-31 Thread Stephen George
Hi Rich, bit confused what your asking. are you looking for the pylab API savefig http://matplotlib.sourceforge.net/matplotlib.pyplot.html#-savefig or you asking how to convert your variable+.png into a filename? is your variable a number?, string? for count in range(3): count = count +1

Re: [Matplotlib-users] pylab.save() File Name Syntax

2008-01-31 Thread Alan G Isaac
On Thu, 31 Jan 2008, Rich Shepard apparently wrote: >If I want to write > pylab.save(curVar.png) > where 'curVar' is a variable assigned programmatically, how do I correctly > write it? Use string concatenation: curVar+'.png' http://docs.python.org/tut/node5.html#SECTION005120

[Matplotlib-users] pylab.save() File Name Syntax

2008-01-31 Thread Rich Shepard
I want to save plots programmatically, using a variable + .png as the filename. I don't see an example of the proper syntax, and my trial-and-error approach hasn't yielded a solution, either. If I want to write pylab.save(curVar.png) where 'curVar' is a variable assigned programmat

Re: [Matplotlib-users] matplotlib, ipython and ubuntu

2008-01-31 Thread Tim Michelsen
Hello Fernando, >> : 'module' object has no attribute >> 'ArrayType' >> >> maybe some of the IPython power users can give me a hint why this >> happes. [1] > > Very strange. I can't reproduce it here (on gutsy, but running > ipython from my own tree). What's odd is this: > > In [1]: import Nume

Re: [Matplotlib-users] Locator and tcks question

2008-01-31 Thread Eric Firing
Cheng-Kong Wu wrote: > Dear all, > > I have the following data: > X = [0.0, 1.0, 3.0, 6.0, 10.0, 15.0] > Y = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0] > > I can plot the X-Y curve without problem. > > But is there a way for me to make the xticks spaced > evenly? That is, the distance between 0.0 and 1.

[Matplotlib-users] Locator and tcks question

2008-01-31 Thread Cheng-Kong Wu
Dear all, I have the following data: X = [0.0, 1.0, 3.0, 6.0, 10.0, 15.0] Y = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0] I can plot the X-Y curve without problem. But is there a way for me to make the xticks spaced evenly? That is, the distance between 0.0 and 1.0, 1.0 and 3.0, 3.0 and 6.0, ... along the x-

Re: [Matplotlib-users] Possible memory-leak while plotting in a loop

2008-01-31 Thread Aaron Botnick
Mike, In response to your questions, yes, I meant to say MPL version 0.91.2. I believe the objects were lists and dictionaries, and they appeared to be related to plotting parameters, such as those found in rcParams. http://www.laminarchaos.net/research/slicer_test.tar.gz I'm now including a li

Re: [Matplotlib-users] Possible memory-leak while plotting in a loop

2008-01-31 Thread Michael Droettboom
Also, if you're adventurous, try installing valgrind and running: valgrind --tool=massif python slicer.py valgrind --tool=memcheck --leak-check=yes --log-file=slicer_leak python slicer.py and send me the output -- (probably off list because they will be large files). Cheers, Mike Aaron Botni

Re: [Matplotlib-users] Possible memory-leak while plotting in a loop

2008-01-31 Thread Michael Droettboom
Aaron Botnick wrote: > I'm using MPL to plot a 6 panel figure of 2d data using pcolormesh. I > started this script last night, and found it consuming over 3GB of > memory when I got in this morning. Another one... ;) > After reading through old posts to > this list, I came across this suggest

Re: [Matplotlib-users] setting non-basic dashes

2008-01-31 Thread Alan G Isaac
On Thu, 31 Jan 2008, John Prince apparently wrote: > I think there is a way to set arbitrary > dash-dot lines Use numbers: http://matplotlib.sourceforge.net/matplotlib.lines.html set_dashes(self, seq) Set the dash sequence, sequence of dashes with on off ink in points. If seq is empty

[Matplotlib-users] Possible memory-leak while plotting in a loop

2008-01-31 Thread Aaron Botnick
Hi all, I'm using MPL to plot a 6 panel figure of 2d data using pcolormesh. I started this script last night, and found it consuming over 3GB of memory when I got in this morning. After reading through old posts to this list, I came across this suggestion: http://sourceforge.net/mailarchive/for

Re: [Matplotlib-users] setting non-basic dashes

2008-01-31 Thread John Prince
> I found this in the online documentation of the pylab.plot() function: > > The following line styles are supported: > > - : solid line > --: dashed line > -.: dash-dot line > : : dotted line > . : points > , : pixels > o : circle symbols >

Re: [Matplotlib-users] setting non-basic dashes

2008-01-31 Thread Jim Vickroy
John Prince wrote: First off, thanks for matplotlib. It really is amazing. I can't seem to figure out an acceptable sequence of dashes per the documentation: 'dashes: sequence of on/off ink in points' This is what I'm trying: mydashes = ['- ', '--', '- ', '--', '- '] lines = plot(*triplet

Re: [Matplotlib-users] Error importing matplotlib.font_manager

2008-01-31 Thread Tiago de Paula Peixoto
On 01/31/2008 02:58 PM, Michael Droettboom wrote: > More information: this problem reared its ugly head way back in 2005 > and the same font (orlando.ttf) was the culprit then! ;) > > http://sourceforge.net/mailarchive/message.php?msg_id=42E69B61.4060008%40caltech.edu > > Also, is it possible yo

[Matplotlib-users] setting non-basic dashes

2008-01-31 Thread John Prince
First off, thanks for matplotlib. It really is amazing. I can't seem to figure out an acceptable sequence of dashes per the documentation: 'dashes: sequence of on/off ink in points' This is what I'm trying: mydashes = ['- ', '--', '- ', '--', '- '] lines = plot(*triplets) for i in range(len(

Re: [Matplotlib-users] stix fonts don't work with ghostscript

2008-01-31 Thread Michael Droettboom
Bernhard Voigt wrote: > Hi Michael, > > attatched is my matplotlibrc file. > > The plot was from some data, but i principle it was crated like that: > import pylab as p > import numpy as n > > p.hist(-1 * n.log10(n.random.uniform(size=1)), 40) > p.xlabel('$\mathrm{log_{10}(E/GeV)}$') > p.yla

Re: [Matplotlib-users] Error when using TkAgg backend

2008-01-31 Thread Jim Vickroy
Michael Biester wrote: Hi, I use matplotlib frequenctly on Python 2.4.x. . Recently changed to Python 2.5.1 (upgraded to numpy 1.0.4, matplotlib 0.91.2, scipy 0.6). The Tkinter graphics does not work anymore. I tried the code snippet below and got a blank window and message box: python.exe

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Eric Firing
John Hunter wrote: > On Jan 31, 2008 12:54 AM, Eric Firing <[EMAIL PROTECTED]> wrote: > >> Screens vary. The screen on my laptop has about 130 dpi. Desktop flat >> panels will usually have a smaller value than that. For example, an old >> "15-inch" flat panel with 1024/768 pixels is actually abo

Re: [Matplotlib-users] Error importing matplotlib.font_manager

2008-01-31 Thread Michael Droettboom
More information: this problem reared its ugly head way back in 2005 and the same font (orlando.ttf) was the culprit then! ;) http://sourceforge.net/mailarchive/message.php?msg_id=42E69B61.4060008%40caltech.edu Also, is it possible you have PyCXX installed in a system-wide location, such as /us

Re: [Matplotlib-users] Error importing matplotlib.font_manager

2008-01-31 Thread Michael Droettboom
I'll also give a "blanket" answer to these sorts of gremlins: Remove the "build" directory in the source tree Remove site-packages/matplotlib (usually in /usr/lib/python2.5/site-packages) Rebuild everything Cheers, Mike Michael Droettboom wrote: > It also may be of interest which versi

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Alan G Isaac
> On Jan 31, 2008 9:09 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote: >> So, to take an example, suppose I set the figsize=(6,4.5) >> and dpi = 80. Then I will get a 480px by 360px figure. >> So if this displays on a 120 dpi monitor it will display >> as roughly 4" by 3". And if I print it unmodif

Re: [Matplotlib-users] Error importing matplotlib.font_manager

2008-01-31 Thread Michael Droettboom
It also may be of interest which version of freetype you have installed. Michael Droettboom wrote: > Another user reported this bug, which I still have been unable to > reproduce -- > > http://sourceforge.net/mailarchive/message.php?msg_id=4794E454.4070700%40bostream.nu > > Jorgen tracked it do

Re: [Matplotlib-users] Error importing matplotlib.font_manager

2008-01-31 Thread Michael Droettboom
Another user reported this bug, which I still have been unable to reproduce -- http://sourceforge.net/mailarchive/message.php?msg_id=4794E454.4070700%40bostream.nu Jorgen tracked it down to a specific font on his system that he was able to delete and then things worked. Unfortunately, when I t

[Matplotlib-users] Error importing matplotlib.font_manager

2008-01-31 Thread Tiago de Paula Peixoto
Hi there. I'm encountering the following error when importing matplotlib.font_manager: $ python Python 2.5.1 (r251:54863, Jan 7 2008, 22:53:42) [GCC 4.2.2 (Gentoo 4.2.2 p1.0)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib.font_manager pyt

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread John Hunter
On Jan 31, 2008 9:09 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > So, to take an example, suppose I set the figsize=(6,4.5) > and dpi = 80. Then I will get a 480px by 360px figure. > So if this displays on a 120 dpi monitor it will display > as roughly 4" by 3". And if I print it unmodified to

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Alan G Isaac
On Wed, 30 Jan 2008, "Wayne E. Harlan" apparently wrote: > The figure size determines the eventual size of the figure > where it will be displayed. You should set that with > "figsize=(x,y)" before you actually plot. Then, and very > importantly, you should set the DPI for the medium where >

Re: [Matplotlib-users] stix fonts don't work with ghostscript

2008-01-31 Thread Michael Droettboom
Bernhard Voigt wrote: > I've been trying to use the STIXGeneral font that comes with > matplotlib (my version is 0.91.1). It's rendered ok on the screen, > however, when saving the fig as an eps file my postscript processor > (ghostscript) can't read the font information included in the eps file >

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Alan G Isaac
On Thu, 31 Jan 2008, John Hunter apparently wrote: > And it is not unusual to have a different DPI in the > horizontal and vertical directions. In order to support > true physical sizes on the screen, we would need to > support different dpis in the two directions. Does that mean that one sho

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread John Hunter
On Jan 31, 2008 12:54 AM, Eric Firing <[EMAIL PROTECTED]> wrote: > Screens vary. The screen on my laptop has about 130 dpi. Desktop flat > panels will usually have a smaller value than that. For example, an old > "15-inch" flat panel with 1024/768 pixels is actually about 12 inches > wide, so dp

[Matplotlib-users] more than two y-axes

2008-01-31 Thread Thomas Tanner
Hi, I'd like to have figure with 3 (or 4) plots having different scales but sharing the same x-axis. Basically I want an extension of the twinx command (see, e.g, two_scales.py demo). I'm using 0.91.2svn on MacOSX10.5.1 from http://trichech.us/?page_id=5 I've tried the following hack (creating ver

[Matplotlib-users] stix fonts don't work with ghostscript

2008-01-31 Thread Bernhard Voigt
I've been trying to use the STIXGeneral font that comes with matplotlib (my version is 0.91.1). It's rendered ok on the screen, however, when saving the fig as an eps file my postscript processor (ghostscript) can't read the font information included in the eps file (ps.fonttype 42 in config file).