Re: [Matplotlib-users] How to change coordinate system origin

2007-12-04 Thread Jaonary Rabarisoa
In fact, that's what I wanted to do : put the origine of my axis on le upper
left corner of my axis
with the values of y increase from top to bottom. And the tip you gave
(set_ylim) do it kindly.

Thank you again for your help.

Jaonary

On Dec 4, 2007 4:22 AM, John Hunter [EMAIL PROTECTED] wrote:

 On Dec 3, 2007 7:50 AM, Jaonary Rabarisoa [EMAIL PROTECTED] wrote:
  Hi all,
 
  I'm relatively new to matplotlib and what I'll ask to you seems to be
 simple
  but I just can't figure out how to do this. I'd like to change the
 origin of
  my coordinate system  to the upper left of my axis when I plot my
 figures.
  In matlab I use axis('ij') but in matplotlib I couldn't find something
  similar. How will I do this ?

 I am not 100% sure what you are asking and I don't have a matlab
 install handy to test.  If you want to plot a decreasing scale on the
 y-axis, that is easy, just invert the min and max args to the ylim

 ax.set_ylim(ymax, ymin)

 If you want to do something more sophisticated, please describe in
 detail and then I may have to tell you it is not currently supported
 :-(

 JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Date formatting and axes confusion

2007-12-04 Thread C M
Using latest matplotlib (0.91.1) and have two about date formatting.
The following two questions are put here in attempt to get a plot of a month
with days 1-31 neatly fit onto the x axis.

1.  Using DateFormatter class to format dates and am confused as
to how to set the axis properties like font size and font family of the
xtick labels.  The following type of thing (leaving out the most of the
code) does not work...

daysFmt = DateFormatter('%d')
ax.xaxis.set_major_locator(days)
ax.xaxis.set_major_formatter(daysFmt)

ax.xaxis.set_minor_locator(days2)
ax.autoscale_view()
ax.set_xticklabels(xdates,family='serif', fontsize=8)

...because when I put that last line I do get the font size changed
but I lose the date formatting via DateFormatter.  However if I put
only the .set_major_formatter(daysFmt) line, I get the right date
formatting...but how do I change the font?

2.  I want the plot to display, for example, the month of Jan,
with *only* days 1 - 31 shown on the x axis.   But if I use the
DateFormatter  (leaving out the  .set_xticklabels line), for the date
range given (days 1-31) it includes a couple of days on either side
of the plot (the 31st from the previous month and a day or two into
the following month).  How can I get it to display only 1-31?  And if I
do, will the  points plotted on day 1 and day 31 be halfway cut off
by th edges of the plot? (and is there any fix for that?)

Any help is appreciated.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] colorbar in subplots

2007-12-04 Thread Lars Friedrich

Hello,

I would like to have multiple image plots in a figure. Each plot should 
have its own colorbar. I tried the following:


**
a = N.array(((1,2,3), (4,5,6)))

P.figure(0)
P.subplot(1,2,1)
P.imshow(a)
P.colorbar()

P.subplot(1,2,2)
P.imshow(a)
P.colorbar()


The two images display and have their own colorbar, each. However, the 
placement is not optimal. (see attached 'colorbar1.png') But when I try 
to use the Configure subplot parameters feature in the interactive 
figure window, only the image plots are affected and the colorbars stay 
as they are. When I hit the reset button in the configure subplots 
dialogue, the figure looks different from the way it looked, when it was 
generated (see attached 'colorbar2.png'). Do I have to do all the 
placement on my own by using axes.set_position or is there a more 
comfortable way using the subplot syntax?


Thanks
Lars
inline: colorbar1.pnginline: colorbar2.png-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] wxAgg

2007-12-04 Thread Lars Friedrich
Hello,

in my matplotlibrc, I use 'backend : WXAgg'. This works fine, since I 
use a wxPython shell as an interactive shell with pylab. However, 
'WXAgg' is not in the list of possible backends given in matplotlibrc. 
Is it save (also in the future) to use WXAgg, or should I try to switch 
to one of the other backends?

Thanks,
Lars

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread José Gómez-Dans
John,

On Tuesday 04 December 2007 03:25:15 John Hunter wrote:
 On Dec 3, 2007 9:08 AM, José Gómez-Dans [EMAIL PROTECTED] wrote:
  I have compiled v.0.90.1 on RHEL 5. By default, the GTKAgg backend is
  being used (TkAgg cannot be set, as TkInter is not installed on the
  system, I think. It throws a NO Module named Tkinter error).
 This is not happening for me.  Does it happen every time you run mpl
 or just the first time after you install.  Run some test script, eg

Thanks for your reply. I think it might well be a fonts problem. Here's the 
test script, plus a comment where the big delay happens:
% cat test.py 
from pylab import *
plot([1,2,3])
show()
cherry% python test.py -dGTKAgg --verbose-debug
matplotlib data path /usr/lib/python2.4/site-packages/matplotlib/mpl-data
$HOME=/home/ucfajlg
CONFIGDIR=/home/ucfajlg/.matplotlib
loaded rc 
file /usr/lib/python2.4/site-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 0.90.1
verbose.level debug
interactive is False
units is True
platform is linux2
loaded modules: 
['pylab', '_bisect', '__future__', 'copy_reg', 'sre_compile', 'distutils', 
'itertools', '_sre', 'japanese.aliases', 'site', '__builtin__', 'datetime', 
'distutils.re', 'matplotlib.re', 'matplotlib.tempfile', 'encodings', 
'pytz.datetime', 'shutil', 'distutils.string', 'distutils.os', 'dateutil', 
'matplotlib.datetime', 'posixpath', '_random', 'tempfile', 'errno', 
'matplotlib.warnings', 'binascii', 'encodings.codecs', 'sre_constants', 're', 
'matplotlib.md5', 'os.path', 'pytz.sys', '_codecs', 'distutils.sysconfig', 
'encodings.exceptions', 'pytz.sets', 'math', 'fcntl', 'stat', 'zipimport', 
'string', 'warnings', 'encodings.types', 'UserDict', 'encodings.utf_8', 
'matplotlib', 'japanese', 'sys', 'japanese.aliases.encodings', 'pytz.tzinfo', 
'pytz', '__main__', 'matplotlib.__future__', 'codecs', 'matplotlib.sys', 
'matplotlib.pytz', 'types', 'md5', 'matplotlib.dateutil', 'matplotlib.os', 
'thread', 'sre', 'bisect', 'matplotlib.distutils', 'signal', 
'distutils.errors', 'random', 'linecache', 'matplotlib.shutil', 'posix', 
'encodings.aliases', 'sets', 'exceptions', 'sre_parse', 'pytz.bisect', 
'distutils.sys', 'os', 'strop']
numerix numpy 1.0.4
font search path 
['/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf', 
'/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/afm']
trying 
fontname 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf
trying 
fontname 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/VeraSeBd.ttf
trying 
fontname 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/cmr10.ttf
trying 
fontname 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/cmex10.ttf
trying 
fontname /usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
loaded ttfcache file /home/ucfajlg/.matplotlib/ttffont.cache
backend GTKAgg version 2.10.1
[... BIG DELAY]
findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal.  
Returning 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf


So, it's not finding any of the fonts above, and coming up with Verta.ttf. 
Could this be the problem? And if it is, what can I do to solve it?

Thanks!
Jose
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread José Gómez-Dans
John,

On Tuesday 04 December 2007 14:07:36 you wrote:
 Two more tests.  WIll you set the debug level to
 --verbose-debug-annoying and add a savefig command to your script, eg
 savefig('myfig') with no extension (the backend will provide a default
 extension with the -d flags below).  Try running the script in three
 modes

PS and Agg work fast enough, and produce meaningful PS and PNG output files 
(as well as popping up a window with the plot). GTKAgg is the one taking a 
long time to pop up, AND results in an empty PNG file. I am attaching the 
debug output of the GTKAgg mode. (Delay occurs @ #[... DELAY] line.

% cat test.py
from pylab import *
plot([1,2,3])
show()
savefig(myfig)
% python test.py -dGTKAgg --verbose-debug-annoying
matplotlib data path /usr/lib/python2.4/site-packages/matplotlib/mpl-data
$HOME=/home/ucfajlg
CONFIGDIR=/home/ucfajlg/.matplotlib
loaded rc 
file /usr/lib/python2.4/site-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 0.90.1
verbose.level debug-annoying
interactive is False
units is True
platform is linux2
loaded modules: 
['pylab', '_bisect', '__future__', 'copy_reg', 'sre_compile', 'distutils', 
'itertools', '_sre', 'japanese.aliases', 'site', '__builtin__', '
datetime', 'distutils.re', 'matplotlib.re', 'matplotlib.tempfile', 'encodings', 
'pytz.datetime', 'shutil', 'distutils.string', 'distutils.os', 'dateutil', '
matplotlib.datetime', 'posixpath', '_random', 'tempfile', 'errno', 
'matplotlib.warnings', 'binascii', 'encodings.codecs', 'sre_constants', 're', 
'matplotlib
.md5', 'os.path', 'pytz.sys', '_codecs', 'distutils.sysconfig', 
'encodings.exceptions', 'pytz.sets', 'math', 'fcntl', 'stat', 'zipimport', 
'string', 'warnin
gs', 'encodings.types', 'UserDict', 'encodings.utf_8', 'matplotlib', 
'japanese', 'sys', 'japanese.aliases.encodings', 'pytz.tzinfo', 'pytz', 
'__main__', 'ma
tplotlib.__future__', 'codecs', 'matplotlib.sys', 'matplotlib.pytz', 'types', 
'md5', 'matplotlib.dateutil', 'matplotlib.os', 'thread', 'sre', 'bisect', 'mat
plotlib.distutils', 'signal', 'distutils.errors', 'random', 'linecache', 
'matplotlib.shutil', 'posix', 'encodings.aliases', 'sets', 'exceptions', 
'sre_parse
', 'pytz.bisect', 'distutils.sys', 'os', 'strop']
numerix numpy 1.0.4
font search path 
['/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf', 
'/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/afm']
trying 
fontname 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf
trying 
fontname 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/VeraSeBd.ttf
trying 
fontname 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/cmr10.ttf
trying 
fontname 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/cmex10.ttf
trying 
fontname /usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
loaded ttfcache file /home/ucfajlg/.matplotlib/ttffont.cache
backend GTKAgg version 2.10.1
# [ DELAY ]
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=640.0, height=480.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
RendererAgg._get_agg_font
findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roma
n, Times, Palatino, Charter, serif
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times
, Palatino, Charter, serif, normal, normal.  
Returning 
/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font

Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread John Hunter
On Dec 4, 2007 8:23 AM, José Gómez-Dans [EMAIL PROTECTED] wrote:

 PS and Agg work fast enough, and produce meaningful PS and PNG output files
 (as well as popping up a window with the plot)

Wait a minute, if you are getting a plot window when you pass -dPS or
-dAgg, something very odd is happening and likely points to what is
causing your real problem.  It means some other GUI toolkit is getting
activated and the slowness you are seeing is resulting from a conflict
between mainloops, most likely.  If this is indeed the case, please
run with either -dAgg or -sPS and post the full debug annoying output.
 Also, post the exact script you are running

JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] wxAgg

2007-12-04 Thread John Hunter
On Dec 4, 2007 3:30 AM, Lars Friedrich [EMAIL PROTECTED] wrote:
 Hello,

 in my matplotlibrc, I use 'backend : WXAgg'. This works fine, since I
 use a wxPython shell as an interactive shell with pylab. However,
 'WXAgg' is not in the list of possible backends given in matplotlibrc.
 Is it save (also in the future) to use WXAgg, or should I try to switch
 to one of the other backends?

Yes, it is fully supported and safe to use.  I think it is just an
oversight that it is not listed in the choices in rc, so we'll fix
that.

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread John Hunter
On Dec 4, 2007 4:50 AM, José Gómez-Dans [EMAIL PROTECTED] wrote:

 Thanks for your reply. I think it might well be a fonts problem. Here's the
 test script, plus a comment where the big delay happens:
 % cat test.py
 from pylab import *
 plot([1,2,3])
 show()

Two more tests.  WIll you set the debug level to
--verbose-debug-annoying and add a savefig command to your script, eg
savefig('myfig') with no extension (the backend will provide a default
extension with the -d flags below).  Try running the script in three
modes

 -dPS, -dAgg and -dGTKAgg

and let us know if the lag is in all three and if not in which one(s).
 Then repost the debug output and insert a comment where the lag is
occurring.

Thanks,
JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problems with binary install of matplotlib-0.9.1 python2.4 on windows

2007-12-04 Thread Charlie Moad
I have posted fresh win32 eggs and exe's on SF.  I explicitly removed
the inclusion of msvcp from distutils in numpy.  Please give them a
try and let me know if you have any more problems.  Note: I just
posted the files so it might take a while for them to propagate.

- Charlie

On Dec 3, 2007 9:47 PM, Charlie Moad [EMAIL PROTECTED] wrote:
 I'll remove the exe's from SF.  It's been a while since a release, and
 I guess I was a little rusty. ;)

 - Charlie


 On Dec 3, 2007 7:02 PM, John Hunter [EMAIL PROTECTED] wrote:
 
  On Dec 3, 2007 5:53 PM, John Hunter [EMAIL PROTECTED] wrote:
   On Dec 3, 2007 5:49 PM, John Hunter [EMAIL PROTECTED] wrote:
  
Charlie, I don't know how you handled this last time, but is there
something in setuptools you have to disable for this build?
  
   Well, here's a clue: matplotlib/__init__.py does not exist in this instal
 
  When I copy all the dirs from the 2.5 egg you built into
  site-packages, I get a matplotlib with rcParams and the rest of the
  __init__.py stuff.  Unfortunately, when I try to import pylab, I get
  the dreaded old msvcp71.dll error.  If I recall correctly, we used to
  hack distutils to remove the line that linked with that lib.
 
  JDH
 


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] pls unsubscribe me

2007-12-04 Thread Adam Mercer
On 04/12/2007, pranal shah [EMAIL PROTECTED] wrote:
 matplot lib users...
 pls unsubscribe me

Visit the list page thats append to every mail to this list.

 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Cheers

Adam

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread John Hunter
On Dec 4, 2007 9:19 AM, José Gómez-Dans [EMAIL PROTECTED] wrote:
 On Tuesday 04 December 2007 15:13:21 you wrote:
  OK, the delay comes before draw which is an important piece of
  information.  What happens if you run these two scripts.  Do you get
  the delay?
 
  # script 1 (no plot)
  from pylab import *

 No delay. Debug output stops at line  backend GTKAgg version 2.10.1, but
 returns to prompt. I'd say this works as expected.

  # script2 (no show)
  from pylab import *
  plot([1,2,3])

What about these scripts

# just make a figure
from pylab import *
figure()

# just make a subplot
from pylab import *
subplot(111)

I'm trying to narrow down where the problem is occurring and am still
stumped as to the explanation...

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread José Gómez-Dans
On Tuesday 04 December 2007 15:31:04 John Hunter wrote:
 What about these scripts

 # just make a figure
 from pylab import *
 figure()

Takes a long time.

 # just make a subplot
 from pylab import *
 subplot(111)

Takes a long time.

 I'm trying to narrow down where the problem is occurring and am still
 stumped as to the explanation...

I've used MPL in a few system, and it is only on this particular one that it 
has this delay! Incidentally, do you want the debug output from these two 
scripts? They essentially the same as the ones I sent before (up to backend 
GTKAgg version 2.10.1, where the output stops, and after a while, we're back 
at the command line).

Thanks,
J


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread José Gómez-Dans
On Tuesday 04 December 2007 15:54:17 you wrote:
 OK, it is in the gtk figure creation code.  Get the matplotlib
 examples directory and try running examples/embedding_in_gtk.py which
 does not use pylab but instead does all the gtk stuff manually.  See
 if you can reproduce the error.  If so, slowly remove or comment out
 parts of the code until you get the minimal script which reproduces
 the slowness and then send it my way with commentary.  It looks like
 you may have something wrong with your gtk installation but it is hard
 to say.

Interestingly enough, the embedding_in_gtk.py script works perfectly (takes 
less than a second to run), so I am not able to reproduce the slowness!

Thanks!


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread John Hunter
On Dec 4, 2007 10:00 AM, José Gómez-Dans [EMAIL PROTECTED] wrote:

 Interestingly enough, the embedding_in_gtk.py script works perfectly (takes
 less than a second to run), so I am not able to reproduce the slowness!

Hmm, the plot thickens.  How about embedding_in_gtk2.py -- this add the toolbar

JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread John Hunter
On Dec 4, 2007 9:39 AM, José Gómez-Dans [EMAIL PROTECTED] wrote:
 On Tuesday 04 December 2007 15:31:04 John Hunter wrote:
  What about these scripts
 
  # just make a figure
  from pylab import *
  figure()

 Takes a long time.

OK, it is in the gtk figure creation code.  Get the matplotlib
examples directory and try running examples/embedding_in_gtk.py which
does not use pylab but instead does all the gtk stuff manually.  See
if you can reproduce the error.  If so, slowly remove or comment out
parts of the code until you get the minimal script which reproduces
the slowness and then send it my way with commentary.  It looks like
you may have something wrong with your gtk installation but it is hard
to say.

JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-04 Thread José Gómez-Dans
On Tuesday 04 December 2007 16:05:33 John Hunter wrote:
 On Dec 4, 2007 10:00 AM, José Gómez-Dans [EMAIL PROTECTED] wrote:
  Interestingly enough, the embedding_in_gtk.py script works perfectly
  (takes less than a second to run), so I am not able to reproduce the
  slowness!

 Hmm, the plot thickens.  How about embedding_in_gtk2.py -- this add the
 toolbar

This does indeed slow things down. The minimal script that reproduces this 
behaviour is the following (the delay appears round about the definition of 
toolbar):

import gtk
from matplotlib.axes import Subplot
from matplotlib.figure import Figure
from numpy import arange, sin, pi
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtk import NavigationToolbar2GTK \
as NavigationToolbar
win = gtk.Window()
win.connect(destroy, lambda x: gtk.main_quit())
win.set_default_size(400,300)
win.set_title(Embedding in GTK)
fig = Figure(figsize=(5,4), dpi=100)
canvas = FigureCanvas(fig)
toolbar = NavigationToolbar(canvas, win)
# ^ Delay appears here
win.add(toolbar)
win.show_all()
gtk.main()

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] [OT] Confusion with mailing lists

2007-12-04 Thread Robert Dailey
Hey guys,

I realize this isn't the place to post this but I can't figure out a better
place. I just had a really quick question.

Sometimes I notice that mail I receive from this mailing list was never
directly (through To: or CC:) sent to the mailing list. For example, say
there's two people communicating:

[EMAIL PROTECTED]
[EMAIL PROTECTED]

Usually when foo1 sends a mail to foo2, foo2 will receive a mail like this:

To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
CC: matplotlib-users@lists.sourceforge.net

However, in one case I found that the mail was never sent to
matplotlib-users. However, somehow the list.sourceforge.net mailing server
intercepted it and sent it to the other person via a 'bounce' email address.
How does this happen? What are the different ways one could send an email to
a mailing list?

Thanks, and again apologies for the off topic post.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] savefig memory useage

2007-12-04 Thread Jordan Atlas
Hi all,

I've noticed that when I save my figures using savefig the memory is 
not immediately released.  For example, in pseudocode,

times = get_times()
for var_id in var_list:
Plotting.figure()
var_values = get_values(var_id)
pylab.plot(times, values)
Plotting.savefig(var+'.png', dpi=150)
Plotting.close()

This pseudo code loops over a list of variables, gets their values, and 
saves a plot for each one.  The variable list has hundreds of items.  If 
I run the code like this, the memory usage grows very quickly until 
python crashes.  If I comment out the savefig line, or shorten the list 
of variables, the code completes without error.

Can anyone suggest how I might write this differently so that I can 
process the long list of variables and save the figures?  Is there any 
way to force the program to release memory once the figures are saved?

I'm using matplotlib 0.90.1 and python 2.4 on windows XP.

Thank you,

--Jordan Atlas


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [OT] Confusion with mailing lists

2007-12-04 Thread massimo sandal

Robert Dailey ha scritto:


What are the different ways one could send an email to a mailing list?


On a related note, I *hate* that hitting reply uses the mail address 
of the parent poster, instead than that of the mailing list. The scipy 
and the gentoo mailing list (two other examples I know) behave more 
properly. Is this a sourceforge quirk?


m.

--
Massimo Sandal
University of Bologna
Department of Biochemistry G.Moruzzi

snail mail:
Via Irnerio 48, 40126 Bologna, Italy

email:
[EMAIL PROTECTED]

tel: +39-051-2094388
fax: +39-051-2094387
begin:vcard
fn:Massimo Sandal
n:Sandal;Massimo
org:University of Bologna;Department of Biochemistry
adr:;;Via Irnerio 48;Bologna;;40126;Italy
email;internet:[EMAIL PROTECTED]
tel;work:+39-051-2094388
tel;fax:+39-051-2094387
x-mozilla-html:FALSE
version:2.1
end:vcard

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] savefig memory useage

2007-12-04 Thread Michael Droettboom
You can try running the garbage collector after each savefig.  (import 
gc and then call gc.collect()).  If you are using a GUI backend, you 
may want to try using the raw Agg backend instead -- there are fewer 
moving parts that way.

There have been a number of memory leaks that have been fixed since 
0.90.1.  You may want to try 0.91 or a SVN checkout to see if that fixes 
your problem.

There is additional information about memory leaks in the FAQ.  I don't 
know if any are relevant to your particular situation:

http://matplotlib.sourceforge.net/faq.html#LEAKS

If none of the above helps, please send a complete but short script that 
reproduces the error (basing it on memleak_gui.py or memleak_hawaii.py 
is even more helpful), and one of the developers can look into it.

Cheers,
Mike

Jordan Atlas wrote:
 Hi all,
 
 I've noticed that when I save my figures using savefig the memory is 
 not immediately released.  For example, in pseudocode,
 
 times = get_times()
 for var_id in var_list:
 Plotting.figure()
 var_values = get_values(var_id)
 pylab.plot(times, values)
 Plotting.savefig(var+'.png', dpi=150)
 Plotting.close()
 
 This pseudo code loops over a list of variables, gets their values, and 
 saves a plot for each one.  The variable list has hundreds of items.  If 
 I run the code like this, the memory usage grows very quickly until 
 python crashes.  If I comment out the savefig line, or shorten the list 
 of variables, the code completes without error.
 
 Can anyone suggest how I might write this differently so that I can 
 process the long list of variables and save the figures?  Is there any 
 way to force the program to release memory once the figures are saved?
 
 I'm using matplotlib 0.90.1 and python 2.4 on windows XP.
 
 Thank you,
 
 --Jordan Atlas
 
 
 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [OT] Confusion with mailing lists

2007-12-04 Thread Michael Droettboom
This is apparently a configuration option of mailman that has been 
purposefully set for the matplotlib mailing lists.  I don't have strong 
opinions about this, but you may be interested in this thread:

http://sourceforge.net/mailarchive/message.php?msg_id=903323ff0708220749r82f9650i7338e63a56d6094d%40mail.gmail.com

Cheers,
Mike

massimo sandal wrote:
 Robert Dailey ha scritto:
 
 What are the different ways one could send an email to a mailing list?
 
 On a related note, I *hate* that hitting reply uses the mail address 
 of the parent poster, instead than that of the mailing list. The scipy 
 and the gentoo mailing list (two other examples I know) behave more 
 properly. Is this a sourceforge quirk?
 
 m.
 
 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 
 
 
 
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] savefig memory useage

2007-12-04 Thread Jordan Atlas

Mike,

Updating to 0.91.1 fixed it.  Python's memory usage was climbing in 
excess of 1 GB when running this script before (eventually crashing) -- 
now it hovers nicely around 60MB and completes with no problems.  Excellent!

Thanks,

--Jordan

Michael Droettboom wrote:

 You can try running the garbage collector after each savefig.  
 (import gc and then call gc.collect()).  If you are using a GUI 
 backend, you may want to try using the raw Agg backend instead -- 
 there are fewer moving parts that way.

 There have been a number of memory leaks that have been fixed since 
 0.90.1.  You may want to try 0.91 or a SVN checkout to see if that 
 fixes your problem.

 There is additional information about memory leaks in the FAQ.  I 
 don't know if any are relevant to your particular situation:

 http://matplotlib.sourceforge.net/faq.html#LEAKS

 If none of the above helps, please send a complete but short script 
 that reproduces the error (basing it on memleak_gui.py or 
 memleak_hawaii.py is even more helpful), and one of the developers can 
 look into it.

 Cheers,
 Mike

 Jordan Atlas wrote:

 Hi all,

 I've noticed that when I save my figures using savefig the memory 
 is not immediately released.  For example, in pseudocode,

 times = get_times()
 for var_id in var_list:
 Plotting.figure()
 var_values = get_values(var_id)
 pylab.plot(times, values)
 Plotting.savefig(var+'.png', dpi=150)
 Plotting.close()

 This pseudo code loops over a list of variables, gets their values, 
 and saves a plot for each one.  The variable list has hundreds of 
 items.  If I run the code like this, the memory usage grows very 
 quickly until python crashes.  If I comment out the savefig line, or 
 shorten the list of variables, the code completes without error.

 Can anyone suggest how I might write this differently so that I can 
 process the long list of variables and save the figures?  Is there 
 any way to force the program to release memory once the figures are 
 saved?

 I'm using matplotlib 0.90.1 and python 2.4 on windows XP.

 Thank you,

 --Jordan Atlas


 - 

 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users





-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Nested Subplots?

2007-12-04 Thread Tom Johnson
Is it possible to have nested subplots?

I would like to have 2 rowswith the top row having two columns and
the bottom row having one column.

For the bottom plot, I'd like to be able to choose between the following:
  1) The size of the bottom plot expands to fill the entire horizontal space.
  2) The size of the bottom plot is unchanged (same as the other two
plots) and is simply centered in the bottom row.

x  x
  x

Thanks.

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problems with binary install of matplotlib-0.9.1 python2.4 on windows

2007-12-04 Thread Jörgen Stenarson
Charlie Moad skrev:
 I have posted fresh win32 eggs and exe's on SF.  I explicitly removed
 the inclusion of msvcp from distutils in numpy.  Please give them a
 try and let me know if you have any more problems.  Note: I just
 posted the files so it might take a while for them to propagate.
 
 - Charlie
 

Works fine for me now.

/Jörgen

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib ignores CocoAff backend preference

2007-12-04 Thread Chris Fonnesbeck
Of course, I meant CocoaAgg, not -Aff.

cf

On Dec 4, 2007 1:49 PM, Chris Fonnesbeck [EMAIL PROTECTED] wrote:
 I have the CocoaAgg backend specified in matplotlibrc in ~/.matplotlib/ as:

 backend  : CocoaAgg

 However, when I plot, matplotlib uses the TkAgg backend in spite of this.

 --
 Christopher J. Fonnesbeck
 + Fish  Wildlife Research Institute (FWC)
 + 727.235.5570




-- 
Christopher J. Fonnesbeck
+ Fish  Wildlife Research Institute (FWC)
+ 727.235.5570

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Bug in mathtext

2007-12-04 Thread Jörgen Stenarson

Hi,

I get a complete crash dumping me in the console when there are unknown 
latex commands in a mathtext expression, this when doing interactive 
stuff in ipython -pylab.


examples:
title($|S_{11}|$)
title($\vbar S_{11} \vbar$)

I would also like to see an alias between | and \vert like there is in 
regular latex.


I have attached a crash report from ipython for the first case

I'm using 0.91.1, python 2.4, on win xp

/Jörgen



***

IPython post-mortem report

IPython version: 0.8.3.svn.r2876 

SVN revision   : 2876M 

Platform info  : os.name - nt, sys.platform - win32

***

Current user configuration structure:

{'Version': 0,
 '__allownew': False,
 'alias': [],
 'args': [],
 'autocall': 1,
 'autoedit_syntax': 0,
 'autoindent': 1,
 'automagic': 1,
 'banner': 0,
 'c': '',
 'cache_size': 1000,
 'classic': 0,
 'color_info': 1,
 'colors': 'Linux',
 'confirm_exit': 1,
 'debug': 0,
 'deep_reload': 0,
 'editor': 'C:\\Program\\TextPad 4\\TextPad.exe',
 'embedded': False,
 'execfile': [],
 'execute': [],
 'gthread': 0,
 'help': 0,
 'import_all': [],
 'import_mod': [],
 'import_some': [[]],
 'include': [],
 'interact': 1,
 'ipythondir': 'c:\\documents and settings\\jorgenst\\_ipython',
 'log': 0,
 'logfile': '',
 'logplay': '',
 'magic_docstrings': 0,
 'messages': 1,
 'multi_line_specials': 1,
 'nosep': 0,
 'object_info_string_level': 0,
 'opts': Struct({'pylab': 1, '__allownew': True}),
 'pdb': 0,
 'pprint': 1,
 'profile': '',
 'prompt_in1': 'In [\\#]: ',
 'prompt_in2': '   .\\D.: ',
 'prompt_out': 'Out[\\#]: ',
 'prompts_pad_left': 1,
 'pylab': 1,
 'pylab_import_all': 1,
 'q4thread': 0,
 'qthread': 0,
 'quick': 0,
 'quiet': 0,
 'rcfile': 'ipythonrc.ini',
 'readline': 1,
 'readline_merge_completions': 1,
 'readline_omit__names': 0,
 'readline_parse_and_bind': [],
 'readline_remove_delims': '-/~',
 'screen_length': -2,
 'separate_in': '\n',
 'separate_out': '\n',
 'separate_out2': '',
 'system_header': 'IPython system call: ',
 'system_verbose': 0,
 'term_title': 1,
 'tk': 0,
 'upgrade': 0,
 'wildcards_case_sensitive': 1,
 'wthread': 0,
 'wxversion': '0',
 'xmode': 'Context'}

***

Crash traceback:

---
ValueError Python 2.4.3: C:\Python24\python.exe
   Tue Dec 04 19:57:25 2007
A problem occured executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.

c:\python24\scripts\ipython.py 
 12 IPython.Shell.IPShell().mainloop(sys_exit=1)
 13 
 14 [or simply IPython.Shell.IPShell().mainloop(1) ]
 15 
 16 and IPython will be your working environment when you start python. The 
final
 17 sys.exit() call will make python exit transparently when IPython 
finishes, so
 18 you don't have an extra prompt to get out of.
 19 
 20 This is probably useful to developers who manage multiple Python 
versions and
 21 don't want to have correspondingly multiple IPython versions. Note that 
in
 22 this mode, there is no way to pass IPython any command-line options, as 
those
 23 are trapped first by Python itself.
 24 
 25 
 26 import IPython
--- 27 IPython.Shell.start().mainloop()
IPython.Shell.start.mainloop = undefined
 28 
 29 
 30 
 31 
 32 
 33 
 34 
 35 
 36 
 37 
 38 
 39 
 40 
 41 
 42 

c:\python\external\ipython\IPython\Shell.pyc in 
mainloop(self=IPython.Shell.IPShellMatplotlib instance, sys_exit=0, 
banner=None)
 62 
#-
 63 # This class is trivial now, but I want to have it in to publish a clean
 64 # interface. Later when the internals are reorganized, code that uses 
this
 65 # shouldn't have to change.
 66 
 67 class IPShell:
 68 Create an IPython instance.
 69 
 70 def __init__(self,argv=None,user_ns=None,user_global_ns=None,
 71  debug=1,shell_class=InteractiveShell):
 72 self.IP = make_IPython(argv,user_ns=user_ns,
 73user_global_ns=user_global_ns,
 74debug=debug,shell_class=shell_class)
 75 
 76 def mainloop(self,sys_exit=0,banner=None):
--- 77 self.IP.mainloop(banner)
global For = undefined
global more = undefined
global details = undefined
global see = undefined
global the = undefined
global __call__ = undefined
global method = undefined
global below. = undefined
 78 if sys_exit:
 79 sys.exit()
 80 
 81 

Re: [Matplotlib-users] Bug in mathtext

2007-12-04 Thread Michael Droettboom
Jörgen Stenarson wrote:
 Hi,
 
 I get a complete crash dumping me in the console when there are unknown 
 latex commands in a mathtext expression, this when doing interactive 
 stuff in ipython -pylab.

That is on purpose.  If you give mathtext something that is a syntax 
error, it throws an exception, showing where the syntax error occurred. 
  The only time mathtext gives warnings (as opposed to errors) is when a 
the expression is syntactically correct but the symbols can not be found 
in the currently configured font.  This is to make sure that plots are 
portable between matplotlib installations ... but the intention is not 
to fail silently on invalid expressions.

 examples:
 title($|S_{11}|$)
 title($\vbar S_{11} \vbar$)
 
 I would also like to see an alias between | and \vert like there is in 
 regular latex.

That was an oversight -- and is a good idea.  This has been added in r4586.

Thanks for finding this,
Mike

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug in mathtext

2007-12-04 Thread Fernando Perez
Hey Jorgen,

On Dec 4, 2007 12:10 PM, Jörgen Stenarson [EMAIL PROTECTED] wrote:
 Hi,

 I get a complete crash dumping me in the console when there are unknown
 latex commands in a mathtext expression, this when doing interactive
 stuff in ipython -pylab.

 examples:
 title($|S_{11}|$)

that's odd, it's OK for mpl to throw the exception, what shouldn't be
happening is for ipython to fully crash out.  I can't reproduce it
with SVN mpl on my box, I tried both tkagg and gtkagg as backends and
in both cases I see the exception traceback (as Michael intended by
raising the error) but I simply get back the next ipython prompt, as
usual.  I don't understand how this particular exception could crash
out ipython, since it's being raised inside regular user code...

Really, really strange...

f

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug in mathtext

2007-12-04 Thread Michael Droettboom
Fernando Perez wrote:
 Hey Jorgen,
 
 On Dec 4, 2007 12:10 PM, Jörgen Stenarson [EMAIL PROTECTED] wrote:
 Hi,

 I get a complete crash dumping me in the console when there are unknown
 latex commands in a mathtext expression, this when doing interactive
 stuff in ipython -pylab.

 examples:
 title($|S_{11}|$)
 
 that's odd, it's OK for mpl to throw the exception, what shouldn't be
 happening is for ipython to fully crash out.  I can't reproduce it
 with SVN mpl on my box, I tried both tkagg and gtkagg as backends and
 in both cases I see the exception traceback (as Michael intended by
 raising the error) but I simply get back the next ipython prompt, as
 usual.  I don't understand how this particular exception could crash
 out ipython, since it's being raised inside regular user code...

You're right -- I misread the original report.  It doesn't crash ipython 
for me either.  I just get another ipython prompt.

Cheers,
Mike

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] eggs or pythonmac packages on OS X?

2007-12-04 Thread Christopher Barker
Stephen Uhlhorn wrote:
 I'm running MacPython 2.5 on Mac OS 10.5.1 and would like to update
 matplotlib to 0.91.1. Im using mpl 0.90.1 from the pythonmac site now.
 Is it better for me to wait till a pythonmac package is availabel or
 are the eggs on SF good to use.

I'm pretty sure the goal is that the eggs on SF are good to go. Please 
report it if they don't work for you.

The goal behind the pythonmac packages was that they be as easy as 
possible to install. We started all that before eggs existed (or became 
common, anyway). We may just start putting eggs on pythonmac, though 
since nothing useful happens when you double-click on them, some newbies 
have gotten confused.

 If I use the eggs, what's the best way to safely uninstall the
 pythonmac package? Just delete the relevant site-packages durectory?

That will work, though I don't think you need to uninstall it at all, 
unless you want to save a bit of disk space.

--running off to test this myself
-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [OT] Confusion with mailing lists

2007-12-04 Thread rex
massimo sandal [EMAIL PROTECTED] [2007-12-04 09:18]:
On a related note, I *hate* that hitting reply uses the mail address 
of the parent poster, instead than that of the mailing list. The scipy 
and the gentoo mailing list (two other examples I know) behave more 
properly. Is this a sourceforge quirk?

The list follows RFC 2822. The Reply-To header is intended to be
created by the originator of the message. List software that
overwrites the Reply-To header destroys the function it's intended
for.

There's an excellent essay on this at:

http://woozle.org/~neale/papers/reply-to-still-harmful

Mailman implements RFC 2369, which is intended to address this
issue. If you want replies to go to the list, I suggest that you
use a mail client that follows RFC 2369. If you choose to use old
software that doesn't recognize the List-Post header, please don't
complain about software that follows RFC standards.

-rex



-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Nested Subplots?

2007-12-04 Thread Shannon Jaeger
It sure is!

For the top too you need
   subplot(2,2,1)  and  subplot(2,2,2)

For the bottom plot
   subplot(2,1,2)

They key to remember is the numrows x numcols defines the grid
and the plot number defines where the plot goes in the grid. This
is a tricky bit to wrap your head around initially but once you
get it, its a very powerful way of specifies plots with just 3
bits of info.

Shannon

Shannon Jaeger
Physics  Asronomy Dept.
University of Calgary


On Tue, December 4, 2007 11:19 am, Tom Johnson said:
 Is it possible to have nested subplots?

 I would like to have 2 rowswith the top row having two columns and
 the bottom row having one column.

 For the bottom plot, I'd like to be able to choose between the following:
   1) The size of the bottom plot expands to fill the entire horizontal
 space.
   2) The size of the bottom plot is unchanged (same as the other two
 plots) and is simply centered in the bottom row.

 x  x
   x

 Thanks.

 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users






-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug in mathtext

2007-12-04 Thread Jörgen Stenarson
Michael Droettboom skrev:
 Fernando Perez wrote:
 Hey Jorgen,

 On Dec 4, 2007 12:10 PM, Jörgen Stenarson [EMAIL PROTECTED] wrote:
 Hi,

 I get a complete crash dumping me in the console when there are unknown
 latex commands in a mathtext expression, this when doing interactive
 stuff in ipython -pylab.

 examples:
 title($|S_{11}|$)
 that's odd, it's OK for mpl to throw the exception, what shouldn't be
 happening is for ipython to fully crash out.  I can't reproduce it
 with SVN mpl on my box, I tried both tkagg and gtkagg as backends and
 in both cases I see the exception traceback (as Michael intended by
 raising the error) but I simply get back the next ipython prompt, as
 usual.  I don't understand how this particular exception could crash
 out ipython, since it's being raised inside regular user code...
 
 You're right -- I misread the original report.  It doesn't crash ipython 
 for me either.  I just get another ipython prompt.
 
 Cheers,
 Mike
 

Thanks Mike. I hope we can figure out what is causing the crashes but I 
guess we can take this over on the ipython-list. Fernando have you tried 
it on a windows machine? I'm using tkagg. Do you have any ideas on what 
I could start testing to isolate the problem?

/Jörgen

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] eggs or pythonmac packages on OS X?

2007-12-04 Thread Russell E. Owen
In article 
[EMAIL PROTECTED],
 Stephen Uhlhorn 
 [EMAIL PROTECTED] wrote:

 I'm running MacPython 2.5 on Mac OS 10.5.1 and would like to update
 matplotlib to 0.91.1. Im using mpl 0.90.1 from the pythonmac site now.
 Is it better for me to wait till a pythonmac package is availabel or
 are the eggs on SF good to use. I would favor the SF eggs because of
 ease of upgrading unless there are some OS X conflicts I'm unaware of.

If you use Tcl/Tk and use a current version (instead of the ancient 
version that is built in) then use the packages at pythonmac. I just 
built 0.91.1 today and it should show up there soon. Meanwhile you can 
get it from here:
http://www.astro.washington.edu/rowen/pythoninstallers/

I hope that someday the official Mac egg version will work with 3rd 
party Tcl/Tk but no version I've tried has -- including 0.91.1.

 If I use the eggs, what's the best way to safely uninstall the
 pythonmac package? Just delete the relevant site-packages durectory?

That's what I do, but I'm not sure it's the best way. I delete all 
folders whose names start with matplotlib (usually a folder named 
matplotlib and another named matplotlib-xxx-py2.5.egg-info)

-- Russell


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] RuntimeError after clearing and plotting for many times

2007-12-04 Thread Yongtao Cui
 import pylab
 def test(n):
 for i in range(n):
  f=pylab.figure(1)
  f.clf()
  a=f.add_axes([0.2, 0.2, 0.6, 0.6])
  a.plot([1,2,3,4,5], 'ro')


I tracked down the svn tree. The above script works ok in revision
3737 and before, but crashes from revision 3738 and after.

Yongtao

On Dec 2, 2007 4:15 PM, Yongtao Cui [EMAIL PROTECTED] wrote:
 Below is the minimum code with the right indent

 import pylab
 def test(n):
 for i in range(n):
  f=pylab.figure(1)
  f.clf()
  a=f.add_axes([0.2, 0.2, 0.6, 0.6])
  a.plot([1,2,3,4,5], 'ro')


 On Dec 2, 2007 4:07 PM, Yongtao Cui [EMAIL PROTECTED] wrote:
  Hi,
 
  I got the following error when clearing and plotting on the same
  figure for many times. I found the following minimum code to reproduce
  this error. I am using matplotlib-0.91.1 and wxpython2.8 on windows
  xp. In the matplotlibrc file, I changed the backend to WXAgg and
  interactive to True.
 
  import pylab
  def test(n):
 for i in range(n):
 f=pylab.figure(1)
 f.clf()
 a=f.add_axes([0.2, 0.2, 0.6, 0.6])
 a.plot([1,2,3,4,5], 'ro')
 
 
  The error only happens for a large n. For example, test(10) works
  fine, but test(50) will cause the error. Also runing test(10) for a
  few times will also cause the error.
 
  Could anyone give me some help?
 
  Thanks.
 
  The following is the error message:
 
  Traceback (most recent call last):
   File input, line 1, in module
   File input, line 3, in test
   File C:\Python25\Lib\site-packages\matplotlib\pyplot.py, line 191, in 
  figure
   File C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py,
  line 1227, in draw_if_interactive
   File C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py,
  line 61, in draw
   File C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py,
  line 380, in draw
   File C:\Python25\Lib\site-packages\matplotlib\figure.py, line 612, in 
  draw
   File C:\Python25\Lib\site-packages\matplotlib\axes.py, line 1344, in draw
   File C:\Python25\Lib\site-packages\matplotlib\axis.py, line 596, in draw
   File C:\Python25\Lib\site-packages\matplotlib\axis.py, line 170, in draw
   File C:\Python25\Lib\site-packages\matplotlib\text.py, line 775, in draw
   File C:\Python25\Lib\site-packages\matplotlib\text.py, line 317, in draw
   File C:\Python25\Lib\site-packages\matplotlib\text.py, line 195,
  in _get_layout
   File C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py,
  line 234, in get_text_width_height_descent
   File C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py,
  line 301, in _get_agg_font
  RuntimeError: Could not open facefile
  C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf;
  Cannot_Open_Resource
 


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] RuntimeError after clearing and plotting for many times

2007-12-04 Thread Yongtao Cui
I don't know why those spaces always don't show up on the mailing list
webpage. They looked fine on my gmail page.

The 'test' function only has one 'for' loop. The four lines below the
'for' line are all in the loop.



On Dec 4, 2007 8:52 PM, Yongtao Cui [EMAIL PROTECTED] wrote:
  import pylab
  def test(n):
  for i in range(n):
   f=pylab.figure(1)
   f.clf()
   a=f.add_axes([0.2, 0.2, 0.6, 0.6])
   a.plot([1,2,3,4,5], 'ro')
 

 I tracked down the svn tree. The above script works ok in revision
 3737 and before, but crashes from revision 3738 and after.

 Yongtao


 On Dec 2, 2007 4:15 PM, Yongtao Cui [EMAIL PROTECTED] wrote:
  Below is the minimum code with the right indent
 
  import pylab
  def test(n):
  for i in range(n):
   f=pylab.figure(1)
   f.clf()
   a=f.add_axes([0.2, 0.2, 0.6, 0.6])
   a.plot([1,2,3,4,5], 'ro')
 
 
  On Dec 2, 2007 4:07 PM, Yongtao Cui [EMAIL PROTECTED] wrote:
   Hi,
  
   I got the following error when clearing and plotting on the same
   figure for many times. I found the following minimum code to reproduce
   this error. I am using matplotlib-0.91.1 and wxpython2.8 on windows
   xp. In the matplotlibrc file, I changed the backend to WXAgg and
   interactive to True.
  
   import pylab
   def test(n):
  for i in range(n):
  f=pylab.figure(1)
  f.clf()
  a=f.add_axes([0.2, 0.2, 0.6, 0.6])
  a.plot([1,2,3,4,5], 'ro')
  
  
   The error only happens for a large n. For example, test(10) works
   fine, but test(50) will cause the error. Also runing test(10) for a
   few times will also cause the error.
  
   Could anyone give me some help?
  
   Thanks.
  
   The following is the error message:
  
   Traceback (most recent call last):
File input, line 1, in module
File input, line 3, in test
File C:\Python25\Lib\site-packages\matplotlib\pyplot.py, line 191, in 
   figure
File C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py,
   line 1227, in draw_if_interactive
File 
   C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py,
   line 61, in draw
File C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py,
   line 380, in draw
File C:\Python25\Lib\site-packages\matplotlib\figure.py, line 612, in 
   draw
File C:\Python25\Lib\site-packages\matplotlib\axes.py, line 1344, in 
   draw
File C:\Python25\Lib\site-packages\matplotlib\axis.py, line 596, in 
   draw
File C:\Python25\Lib\site-packages\matplotlib\axis.py, line 170, in 
   draw
File C:\Python25\Lib\site-packages\matplotlib\text.py, line 775, in 
   draw
File C:\Python25\Lib\site-packages\matplotlib\text.py, line 317, in 
   draw
File C:\Python25\Lib\site-packages\matplotlib\text.py, line 195,
   in _get_layout
File C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py,
   line 234, in get_text_width_height_descent
File C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py,
   line 301, in _get_agg_font
   RuntimeError: Could not open facefile
   C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf;
   Cannot_Open_Resource
  
 


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problems with binary install of matplotlib-0.9.1 python2.4 on windows

2007-12-04 Thread John Hunter
On Dec 4, 2007 8:14 AM, Charlie Moad [EMAIL PROTECTED] wrote:
 I have posted fresh win32 eggs and exe's on SF.  I explicitly removed
 the inclusion of msvcp from distutils in numpy.  Please give them a
 try and let me know if you have any more problems.  Note: I just
 posted the files so it might take a while for them to propagate.

I don't think we've purged the mscvp71 dependency -- I just installed
the 91.1 exe on my system and got the same error on pylab import.  I
can fix it by dropping the dll into c:\windows\system32 (and I updated
the install notes to this effect) but this is a pretty onerous
requirement for the naive user, so if we can figure out how to remove
the dll dependency or ship the dll, that would be ideal.

JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Bug in errorbar/docstring?

2007-12-04 Thread Ryan May
Hi,

I think there's a bug in errorbar in trying to use asymmetric
y-errorbars.  According to the docstring:

xerr and yerr may be any of:

a rank-0, Nx1 Numpy array  - symmetric errorbars +/- value

an N-element list or tuple - symmetric errorbars +/- value

a rank-1, Nx2 Numpy array  - asymmetric errorbars -column1/+column2

However, code below that tries to use the last of these options fails,
as shown in the example below.

from matplotlib import pyplot as P
import numpy as N
x = N.linspace(-3, 3, 100)
y = x**2
P.errorbar(x,  y,  yerr=N.c_[0.1*y,  0.2*y])
P.show()

This fails with:

Traceback (most recent call last):
  File errorbar_test.py, line 7, in module
P.errorbar(x,  y,  yerr=N.c_[0.1*y,  0.2*y])
  File /usr/lib64/python2.5/site-packages/matplotlib/pyplot.py, line
1591, in errorbar
ret =  gca().errorbar(*args, **kwargs)
  File /usr/lib64/python2.5/site-packages/matplotlib/axes.py, line
3766, in errorbar
barcols.append( self.vlines(x, lower, upper, **lines_kw) )
  File /usr/lib64/python2.5/site-packages/matplotlib/axes.py, line
2528, in vlines
for thisx, (thisymin, thisymax) in zip(x,Y)]
ValueError: too many values to unpack

If I change yerr instead to (0.1*y, 0.2*y), which isn't listed as an
option, I get my desired behavior.  Looking at the code, it seems to
come down to lines 3757-3764 in axes.py:

   if iterable(yerr) and len(yerr)==2 and iterable(yerr[0]) and
iterable(yerr[1]):
# using list comps rather than arrays to preserve units
lower  = [thisy-thiserr for (thisy, thiserr) in
cbook.safezip(y,yerr[0])]
upper  = [thisy+thiserr for (thisy, thiserr) in
cbook.safezip(y,yerr[1])]
else:
# using list comps rather than arrays to preserve units
lower  = [thisy-thiserr for (thisy, thiserr) in
cbook.safezip(y,yerr)]
upper  = [thisy+thiserr for (thisy, thiserr) in
cbook.safezip(y,yerr)]

This code would actually seem to preclude the use of an Nx2 array, so
something probably needs to be changed to bring the docstring and the
code into agreement.

Thanks,

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users