[Matplotlib-users] contour question

2008-03-11 Thread humufr
Hello,

I'm using a svn version of matplotlib and the API changed for contour. I want 
to have the coordinate of the contour. Before Eric Firing (I think) gave a 
solution to do it:

val = contour(xRange,yRange,delchi2,[1])
t = asarray(val.collections[0].get_verts())

but now get_verts doesn't exist anymore.

I tried to do:

cs = contour(a)
path = cs.collections[0].get_paths()

but I don't know how to use it. Basically I think that I have the contour 
coordinate but I don't know how to recuperate them. I need it to export them 
in a data file so it's the reason I want to recuperate them.

Thank you for any help

N.

ps: It's a little bit difficult to access to the help for a method now some, 
perhaps most, of them are missing a docstring. So it's difficult to 
understand what it is the meaning of each of them.

example:

col.get_paths?
Type:   instancemethod
Base Class: 
String Form:>
Namespace:  Interactive
File:   /usr/lib/python2.5/site-packages/matplotlib/collections.py
Definition: col.get_paths(self)
Docstring:






-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] colorbar problem

2008-03-11 Thread humufr
Le Sunday 09 March 2008 14:32:05 Eric Firing, vous avez écrit :
> [EMAIL PROTECTED] wrote:
> > Hello,
> >
> > I have some stupid questions about how to use colorbar.
> >
> > 1) I would like to be able to put the colorbar where I went: top, bottom,
> > left, right. For what I see I can do only a vertical left and horizontal
> > bottom ones (with a simple use of the function).
> > I know that it's possible to do a colorbar only but it's difficult to
> > place them a little bit automatically and that bring my second question.
>
> This looks like a feature request: instead of specifying "horizontal" or
> "vertical", be able to specify "top", "bottom", "left", or "right".
> This is fairly easy in principle, but there are some wrinkles such that
> I am not sure it would be satisfactory in practice--some custom
> adjustments might usually be needed depending on whether the main axes
> have a title (in the case of "top") or an xlabel (in the case of
> "left").  You may be better off simply figuring out what main and
> colorbar axes positions work best for your particular case and then
> making those axes explicitly.

I agree it's more feature request. I'll look on how to implement your 
suggestion. 

> > 2) I would like that the colorbar with exactly the same size than the
> > image I plot with pcolor. It's working when I'm not using the
> > aspect='equal' in the subplot but not with this option. Naturally I want
> > to not change the aspect of my image and so it's a big problem for me.
> > The only solution I found is to manipulate the colorbar with the shrink
> > valu but it's a little bit painfull especially the value change for each
> > pcolor image (they doesn't have always the same size).
>
> This is a common request, and a reasonable one, but unfortunately it is
> not straightforward to implement automatically given mpl's internal
> structure.  Again, however, you get the desired result quite easily by
> creating your own axes explicitly.

This is what I was afraid... So I have a stupid question but how to do this, 
create the axes at the same place than the pcolor image?

I can see how I can recuperate the axes coordinates but I don't know how to 
use them:

im = pylab.pcolor(a)
ax = im.get_axes()
cs = pylab.colorbar()

but after I'm a little bit lost...

> > 3) I would like to give a label to the colorbar (ie if the colorbar is at
> > the bottom a label under the colorbar etc). To tell people what means the
> > colors but I didn't find anyway to do it. xlabel work for the pcolor
> > object (as expected) and there are no colorbar.xlabel function.
>
> Use the set_label() method.
> ...
> cbar = fig1.colorbar(im,orientation='horizontal')
> cbar.set_label('label')
> ...

Great thanks it's working perfectly.

> Eric

Thank you for your help,

N.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] colorbar problem

2008-03-09 Thread humufr
Hello,

I have some stupid questions about how to use colorbar.

1) I would like to be able to put the colorbar where I went: top, bottom, 
left, right. For what I see I can do only a vertical left and horizontal 
bottom ones (with a simple use of the function).
I know that it's possible to do a colorbar only but it's difficult to place 
them a little bit automatically and that bring my second question.

2) I would like that the colorbar with exactly the same size than the image I 
plot with pcolor. It's working when I'm not using the aspect='equal' in the 
subplot but not with this option. Naturally I want to not change the aspect 
of my image and so it's a big problem for me. The only solution I found is to 
manipulate the colorbar with the shrink valu but it's a little bit painfull 
especially the value change for each pcolor image (they doesn't have always 
the same size).

3) I would like to give a label to the colorbar (ie if the colorbar is at the 
bottom a label under the colorbar etc). To tell people what means the colors 
but I didn't find anyway to do it. xlabel work for the pcolor object (as 
expected) and there are no colorbar.xlabel function.

Thank you for any help.

N.

ps: i join a simple script to show my problem

#!/usr/bin/env python

import pylab
import numpy

a = numpy.arange(100).reshape((10,10))

fig1 = pylab.figure()

ax = fig1.add_subplot(141)
im = ax.pcolor(a)
fig1.colorbar(im,orientation='horizontal') 
pylab.xlabel('label')

ax = fig1.add_subplot(142)
im = ax.pcolor(a)
fig1.colorbar(im,orientation='vertical')
pylab.xlabel('label')

ax = fig1.add_subplot(143,aspect='equal')
im = ax.pcolor(a)
fig1.colorbar(im,orientation='vertical')
pylab.xlabel('label')

ax = fig1.add_subplot(144,aspect='equal')
im = ax.pcolor(a)
fig1.colorbar(im,orientation='horizontal')
pylab.xlabel('label')


pylab.show()


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug or problem in my configuration

2007-10-29 Thread humufr
Le Monday 29 October 2007 10:57:52 Darren Dale, vous avez écrit :
> On Monday 29 October 2007 10:45:22 am Michael Droettboom wrote:
> > Darren Dale wrote:
> > > On Monday 29 October 2007 10:09:21 am Michael Droettboom wrote:
> > >> Michael Droettboom wrote:
> > >>> Darren Dale wrote:
> >  I think the problem is related to autohinting. When I compile
> >  freetype, the patented bytecode and subpixel hinting support is
> >  disabled, I am using freetype's autohinting instead. I recompiled
> >  freetype with the support for the patented hinting instead of
> >  autohinting, and reran the test on cmmi.ttf. The result is
> >  cmmi10_p.txt.
> > >>>
> > >>> That seems like a likely explanation...  Exactly, which #defines did
> > >>> you change to make it work again?  The vanilla freetype tarball works
> > >>> for me...
> > >>
> > >> I seem to have the reversed behavior.  On my machine, if I have the
> > >> patented bytecodes disabled (which is the default when you download
> > >> the vanilla freetype tarball from freetype.sf.net), everything works. 
> > >> When I define (uncomment) TT_CONFIG_OPTION_BYTECODE_INTERPRETER in
> > >> ftoption.h, things break.  (And great news, I'm finally able to
> > >> reproduce this problem.)  Is that not what you see?
> > >
> > > Crap. I looked right over the "!" in  "if ! use bindist". So you are
> > > correct, the problem occurs when support for patented hinting is
> > > enabled and autohinting is disabled. Did I get it right this time? (I'm
> > > running on very little sleep. Sorry for the confusion.)
> >
> > No worries.  Grad to see we're at least seeing the same thing (this has
> > been a very elusive bug...)
> >
> > I submitted a fix for this in matplotlib SVN r4047.  Freetype takes a
> > FT_LOAD_FORCE_AUTOHINT flag to force it to bypass the patented bytecode
> > hinter at runtime (even if it was compiled in).  This appears to fix the
> > problem, and doesn't force people to recompile their freetype -- they
> > should now get identical results regardless.
>
> Works here, thank you very much for your hard work!
>
> Darren

Oups I just come back and I was unable to do test but fortunatly Dave seem to 
have been able to manage it, thank you. The fix is working here too, thank 
you very much. Great work! 

Nicolas


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [SOLVED] bug or problem in my configuration

2007-10-26 Thread humufr
I tried to change the value and the highest one I can use is 2 so it's not a 
big improvement for what I understand.

You can contact me if you need other test naturally

N.

Le Friday 26 October 2007 12:24:34 Michael Droettboom, vous avez écrit :
> It's great to have narrowed this down!  Unfortunately, with that #define
> removed, you will get lower quality fonts (the hinting will be more
> extreme, which causes the glyphs to often look too thin, or
> inconsistent.)  See this thread for more information --
>
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg01480
>.html
>
> I'd hate to turn off this improvement because it doesn't work in some
> environments.
>
> I wonder if you wouldn't mind performing one more experiment...  There
> is another define at the top of ft2font.cpp, "HORIZ_HINTING" that
> controls the amount of hinting subsampling.  Currently it is set to 8,
> but I wonder if a lower value would work.  Ideally, we want to set this
> as high as we can get away with.
>
> #define VERTICAL_HINTING
> #ifdef VERTICAL_HINTING
> #define HORIZ_HINTING 8
> #else
> #define HORIZ_HINTING 1
> #endif
>
> Would you mind trying other values and seeing if any work?  If not, I'll
> probably take this question to the freetype mailing list now that we've
> narrowed the cause down to only a three line difference in the code.
>
> Cheers,
> Mike
>
> [EMAIL PROTECTED] wrote:
> > Le Friday 26 October 2007 11:22:06, vous avez écrit :
> >> Thanks for this information.  It looks like the font outline data is
> >> somehow getting corrupted before freetype renders it.  Again, however, I
> >> can't reproduce it on my machine (I've attached a copy of what it looks
> >> like for me), so I'm still pretty stumped.  My suspicion is that it's a
> >> 64-bit vs. 32-bit problem since both people known to have trouble are on
> >> 64-bit platforms, and I am not.  I have tried recompiling with gcc-4.2.2
> >> and I still wasn't able to reproduce.
> >
> > I can imagine that it's difficult for you to debug something you cannot
> > reproduce. Just a remark I don't have 64-bits but a 32 so the problem is
> > not comming because of the plateforme.
> >
> >> One thing you could *try*, to rule out any recent changes to the glyph
> >> rendering, is to comment out this line near the top of src/ft2font.cpp:
> >>
> >> #define VERTICAL_HINTING
> >>
> >> as follows
> >>
> >> //#define VERTICAL_HINTING
> >
> > Yes it's doing the trick., I don't have anymore the problem. Thank you
> > very much. I have now the same result than you with the test I produce
> > before.
> >
> >> Additional information:  Are there any warnings produced when compiling
> >> ft2font.cpp?  Can you send me your matplotlibrc file?
> >
> > just the classic one:
> >
> > cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
> > Ada/C/ObjC but not for C++
> >
> > Thank you very much.
> >
> > N.
> >
> >> Cheers,
> >> Mike
> >>
> >> [EMAIL PROTECTED] wrote:
> >>> Yep that can be a good idea. I don't know anything on how mathtext is
> >>> working but I'm not completely sure that the problem is with freetype
> >>> because sometime that can work. In reality every character I tested
> >>> worked but you have to put in a certain order. To understand a little
> >>> bit more what I try to say (very badly) see the script join and the
> >>> figure.
> >>>
> >>> I hope that can help a little bit to try to find the reason of this
> >>> behaviour.
> >>>
> >>> N
> >>>
> >>> Le Thursday 25 October 2007 15:41:40 Michael Droettboom, vous avez 
écrit :
>  Darren Dale wrote:
> > Hi Mike,
> >
> > On Tuesday 23 October 2007 09:05:56 am Michael Droettboom wrote:
> >> Unfortunately, I can't reproduce this on my machine even with the
> >> latest stable version of freetype-2.5.3 (which is the same version
> >> in Ubuntu Gutsy).
> >
> > I think you mean freetype-2.3.5. I also have that version installed,
> > although the mpl setup script is reporting 9.16.3.
> 
>  Yes.  freetype-2.3.5.  There are arcane historical reasons I don't
>  fully comprehend why the pkgconfig version doesn't match the release
>  version (and why freetype2 is called freetype6 on Debian and
>  derivatives)... but my numbers do match yours.
> 
> >> The Ubuntu/Debian package of freetype has a lot of patches
> >> applied, and I don't know if they are causing this (but from the
> >> looks of them, I doubt it).
> >>
> >> Can you set debug.verbose to "annoying" and send me the output of
> >> your matplotlib run?  I want to rule out any font-loading problems.
> >
> > It's attached. I'm running 64bit gentoo, everything compiled with
> > gcc-4.2.2, in case its relevent.
> 
>  Always good to have more details, but I'm sort of at a loss on this
>  one, especially since I can't reproduce it.
> 
>  Maybe we need to take a poll on this list of who is working and who
>  isn't to see what the source of the breaka

Re: [Matplotlib-users] [SOLVED] bug or problem in my configuration

2007-10-26 Thread humufr
Le Friday 26 October 2007 11:22:06, vous avez écrit :
> Thanks for this information.  It looks like the font outline data is
> somehow getting corrupted before freetype renders it.  Again, however, I
> can't reproduce it on my machine (I've attached a copy of what it looks
> like for me), so I'm still pretty stumped.  My suspicion is that it's a
> 64-bit vs. 32-bit problem since both people known to have trouble are on
> 64-bit platforms, and I am not.  I have tried recompiling with gcc-4.2.2
> and I still wasn't able to reproduce.

I can imagine that it's difficult for you to debug something you cannot 
reproduce. Just a remark I don't have 64-bits but a 32 so the problem is not 
comming because of the plateforme.

> One thing you could *try*, to rule out any recent changes to the glyph
> rendering, is to comment out this line near the top of src/ft2font.cpp:
>
> #define VERTICAL_HINTING
>
> as follows
>
> //#define VERTICAL_HINTING

Yes it's doing the trick., I don't have anymore the problem. Thank you very 
much. I have now the same result than you with the test I produce before.

> Additional information:  Are there any warnings produced when compiling
> ft2font.cpp?  Can you send me your matplotlibrc file?

just the classic one:

cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++

Thank you very much.

N.

> Cheers,
> Mike
>
> [EMAIL PROTECTED] wrote:
> > Yep that can be a good idea. I don't know anything on how mathtext is
> > working but I'm not completely sure that the problem is with freetype
> > because sometime that can work. In reality every character I tested
> > worked but you have to put in a certain order. To understand a little bit
> > more what I try to say (very badly) see the script join and the figure.
> >
> > I hope that can help a little bit to try to find the reason of this
> > behaviour.
> >
> > N
> >
> > Le Thursday 25 October 2007 15:41:40 Michael Droettboom, vous avez écrit :
> >> Darren Dale wrote:
> >>> Hi Mike,
> >>>
> >>> On Tuesday 23 October 2007 09:05:56 am Michael Droettboom wrote:
>  Unfortunately, I can't reproduce this on my machine even with the
>  latest stable version of freetype-2.5.3 (which is the same version in
>  Ubuntu Gutsy).
> >>>
> >>> I think you mean freetype-2.3.5. I also have that version installed,
> >>> although the mpl setup script is reporting 9.16.3.
> >>
> >> Yes.  freetype-2.3.5.  There are arcane historical reasons I don't fully
> >> comprehend why the pkgconfig version doesn't match the release version
> >> (and why freetype2 is called freetype6 on Debian and derivatives)...
> >> but my numbers do match yours.
> >>
>  The Ubuntu/Debian package of freetype has a lot of patches
>  applied, and I don't know if they are causing this (but from the looks
>  of them, I doubt it).
> 
>  Can you set debug.verbose to "annoying" and send me the output of your
>  matplotlib run?  I want to rule out any font-loading problems.
> >>>
> >>> It's attached. I'm running 64bit gentoo, everything compiled with
> >>> gcc-4.2.2, in case its relevent.
> >>
> >> Always good to have more details, but I'm sort of at a loss on this one,
> >> especially since I can't reproduce it.
> >>
> >> Maybe we need to take a poll on this list of who is working and who
> >> isn't to see what the source of the breakage may be...
> >>
> >> Cheers,
> >> Mike
> >>
> >> 


### MATPLOTLIBRC FORMAT

# This is a sample matplotlib configuration file.  It should be placed
# in HOME/.matplotlib/matplotlibrc (unix/linux like systems) and
# C:\Documents and Settings\yourname\.matplotlib (win32 systems)
#
# By default, the installer will overwrite the existing file in the
# install path, so if you want to preserve your's, please move it to
# your HOME dir and set the environment variable if necessary.
#
# This file is best viewed in a editor which supports python mode
# syntax highlighting
#
# Blank lines, or lines starting with a comment symbol, are ignored,
# as are trailing comments.  Other lines must have the format
#
#   key : val   # optional comment
#
# Colors: for the color values below, you can either use
#  - a matplotlib color string, such as r, k, or b
#  - an rgb tuple, such as (1.0, 0.5, 0.0)
#  - a hex string, such as ff00ff  (no '#' symbol)
#  - a scalar grayscale intensity such as 0.75
#  - a legal html color name, eg red, blue, darkslategray

 CONFIGURATION BEGINS HERE
# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg
# Agg Cairo GD GDK Paint PS PDF SVG Template
backend  : GtkAgg #Qt4Agg #WXAgg
numerix  : numpy  # numpy, Numeric or numarray
#numerix : numarray
#interactive  : False  # see 
http://matplotlib.sourceforge.net/interactive.html
#toolbar  : toolbar2   # None | classic | toolbar2
#timezone : UTC# a pytz timezone string, eg US/Central or 
Europe/Paris

# Where 

Re: [Matplotlib-users] bug or problem in my configuration

2007-10-25 Thread humufr
Yep that can be a good idea. I don't know anything on how mathtext is working 
but I'm not completely sure that the problem is with freetype because 
sometime that can work. In reality every character I tested worked but you 
have to put in a certain order. To understand a little bit more what I try to 
say (very badly) see the script join and the figure. 
 
I hope that can help a little bit to try to find the reason of this behaviour.

N

Le Thursday 25 October 2007 15:41:40 Michael Droettboom, vous avez écrit :
> Darren Dale wrote:
> > Hi Mike,
> >
> > On Tuesday 23 October 2007 09:05:56 am Michael Droettboom wrote:
> >> Unfortunately, I can't reproduce this on my machine even with the latest
> >> stable version of freetype-2.5.3 (which is the same version in Ubuntu
> >> Gutsy).
> >
> > I think you mean freetype-2.3.5. I also have that version installed,
> > although the mpl setup script is reporting 9.16.3.
>
> Yes.  freetype-2.3.5.  There are arcane historical reasons I don't fully
> comprehend why the pkgconfig version doesn't match the release version
> (and why freetype2 is called freetype6 on Debian and derivatives)...
> but my numbers do match yours.
>
> >> The Ubuntu/Debian package of freetype has a lot of patches
> >> applied, and I don't know if they are causing this (but from the looks
> >> of them, I doubt it).
> >>
> >> Can you set debug.verbose to "annoying" and send me the output of your
> >> matplotlib run?  I want to rule out any font-loading problems.
> >
> > It's attached. I'm running 64bit gentoo, everything compiled with
> > gcc-4.2.2, in case its relevent.
>
> Always good to have more details, but I'm sort of at a loss on this one,
> especially since I can't reproduce it.
>
> Maybe we need to take a poll on this list of who is working and who
> isn't to see what the source of the breakage may be...
>
> Cheers,
> Mike
<>

test_mathtext.py
Description: application/python
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug or problem in my configuration

2007-10-19 Thread humufr
Sorry I didn't know the difference...

N.

Le Friday 19 October 2007 10:52:25 Darren Dale, vous avez écrit :
> On Friday 19 October 2007 10:38:36 am [EMAIL PROTECTED] wrote:
> > Le Friday 19 October 2007 08:37:00 Darren Dale, vous avez écrit :
> > > On Thursday 18 October 2007 11:49:50 am [EMAIL PROTECTED] wrote:
> > > > Hi,
> > > >
> > > > I have a small problem with label.
> > > >
> > > >
> > > > plot([0,1],[0,1])
> > > > xlabel(r'$ABCDEF$',fontsize=35)
> > > >
> > > > (but the size doesn't change anything) I obtain the result visible on
> > > > the figure join. I think there are a problem when using latex and how
> > > > the first character is handle.
> > >
> > > I don't think its a problem with matplotlib; I can't reproduce the
> > > problem on my machine. Maybe its an issue with your dvipng? I'm using
> > > version 1.9.
> >
> > Oups I found the problem, I don't know why because it was working fine
> > before the upgrade to gutsy but I have to change matplotlib configuration
> > and everything is working fine if I put in the file:
> >
> > rc('text', usetex=True)
>
> In your first email you said you were using latex, but you were actually
> using mathtext. I can confirm the problem when I disable usetex and instead
> use mathtext. Mike, is this something easy to fix?
>
> Darren

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug or problem in my configuration

2007-10-19 Thread humufr
Oups I found the problem, I don't know why because it was working fine before 
the upgrade to gutsy but I have to change matplotlib configuration and 
everything is working fine if I put in the file:

rc('text', usetex=True)

sorry to have bother you with this,

N.

Le Friday 19 October 2007 08:37:00 Darren Dale, vous avez écrit :
> On Thursday 18 October 2007 11:49:50 am [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > I have a small problem with label.
> >
> >
> > plot([0,1],[0,1])
> > xlabel(r'$ABCDEF$',fontsize=35)
> >
> > (but the size doesn't change anything) I obtain the result visible on the
> > figure join. I think there are a problem when using latex and how the
> > first character is handle.
>
> I don't think its a problem with matplotlib; I can't reproduce the problem
> on my machine. Maybe its an issue with your dvipng? I'm using version 1.9.
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug or problem in my configuration

2007-10-19 Thread humufr
I don't think the problem is in dvipng because I have exactly the same when 
I'm using GtkAgg and before your message I didn't have dvipng installed. I'm 
using ubuntu gutsy so perhaps there are a change in the lib.

N. 

Le Friday 19 October 2007 08:37:00 Darren Dale, vous avez écrit :
> On Thursday 18 October 2007 11:49:50 am [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > I have a small problem with label.
> >
> >
> > plot([0,1],[0,1])
> > xlabel(r'$ABCDEF$',fontsize=35)
> >
> > (but the size doesn't change anything) I obtain the result visible on the
> > figure join. I think there are a problem when using latex and how the
> > first character is handle.
>
> I don't think its a problem with matplotlib; I can't reproduce the problem
> on my machine. Maybe its an issue with your dvipng? I'm using version 1.9.
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] bug or problem in my configuration

2007-10-18 Thread humufr
Hi,

I have a small problem with label.


plot([0,1],[0,1])
xlabel(r'$ABCDEF$',fontsize=35)

(but the size doesn't change anything) I obtain the result visible on the 
figure join. I think there are a problem when using latex and how the first 
character is handle.

Thanks for matplotlib.

N.

PS: I'm using svn version:

pylab.__version__
'1.0.4.dev4241'


<>-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Importing Binary files

2007-02-05 Thread humufr
Le Friday 02 February 2007 08:14:37 Vijay Kumar, vous avez écrit :
> Hi,
>
> I want to import binary files generated from C/FORTRAN into matplotlib for
> plotting.
> Can this be done using 'load'?
>
> Thanks
> Vijay

no load can read only text file.



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] another problem with subplot...

2006-11-02 Thread humufr
and the same question: this behavior is normal?

fig1 = figure()
ax1 = subplot(121)
xlim([0,10])
ax2 = subplot(122,sharey=ax1)
yticks([])

I would like to hide the ticks label for only one subplot (the one who share 
the axes) but I would like to have the ticklabels for the global plot, ie on 
the left subplot. 

I was thinking that sharey means that the plot will have the same limit for 
this axes not to have all the properties. Do I have to tell to all the 
subplot to have the same limit and remove the ticks for the one I want?

N.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] subplot_adjust bug?

2006-11-02 Thread humufr
Le Jeudi 2 Novembre 2006 09:19, John Hunter a écrit :
> > "John" == John Hunter <[EMAIL PROTECTED]> writes:
>
> John> I need to tweak the overlap function to take an optional arg
> John> so that endpoint overlap is OK.
>
> OK, this is now fixed in svn.  Thanks for the report.

The solution gave by Eric works too and with your solution I saw that 
I had to force myself to use a more pythonic writing in my software...
But if far better with the bug corrected. 
Thanks to have done it so fast. I'm always impressed. 

N.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] subplot_adjust bug?

2006-11-01 Thread humufr
Hi,

I have a problem with subplot_adjust but I don't know if it's a bug or because 
I didn't understand how to use it...

I would like to create a 2 by 3 plots without space between the subplot and I 
can't arrive to manage it...


Is the results of the next script is normal?

 import pylab

fig1 = pylab.figure()
fig1.subplots_adjust(wspace=0,hspace=0)

pylab.subplot(231)
pylab.subplot(232)
pylab.subplot(233)
pylab.subplot(234)
pylab.subplot(235)
pylab.subplot(236)

fig2 = pylab.figure()
fig2.subplots_adjust(wspace=0)

pylab.subplot(231)
pylab.subplot(232)
pylab.subplot(233)
pylab.subplot(234)
pylab.subplot(235)
pylab.subplot(236)

fig3 = pylab.figure()
fig3.subplots_adjust(hspace=0)

pylab.subplot(231)
pylab.subplot(232)
pylab.subplot(233)
pylab.subplot(234)
pylab.subplot(235)
pylab.subplot(236)

pylab.show()

Thanks,

N.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] tex problem

2006-11-01 Thread humufr
Le Mardi 31 Octobre 2006 23:47, Robert Kern a écrit :
> [EMAIL PROTECTED] wrote:
> > I tried:
> >
> > label='$\textrm{test}_2$
> > xlabel(r label)
> > xlabel(r+label)
> >
> > etc but it not working (like I expected). So I would like to know if
> > there are a way to precise that the text is a raw string by another thing
> > that the r character just before the string. Perhaps that will be good to
> > have an option like raw=true or something similar?
>
> There is no such thing as a raw string *object*. There are only raw string
> *literals*. The r'' determines how the source code is parsed, not how the
> contents of the object is treated.
>
>label = r'$\textrm{test}_2$'
>xlabel(label)
>
> After the source code containing the string literal is parsed, the string
> is simply a string.

Thank you very much I didn't know this. That will be very helpful.

N.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] tex problem

2006-10-31 Thread humufr
Le Mardi 31 Octobre 2006 23:14, Eric Firing a écrit :
> [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > I have different questions to use tex with matplotlib.
> >
> > The first one:
> >
> > If I'm doing:
> >
> > rc('text', usetex=True)
> > xlabel('$\textrm{toto}$')  # bad
> > xlabel(r'$\textrm{toto}$') # ok
> >
> > The results are not the same and I don't understand why.
> >
> > and for:
> >
> > xlabel('$\textit{toto}$')  #bad
> > xlabel(r'$\textit{toto}$') #ok
> >
> > same things, but it's working fine for:
> >
> > xlabel('$\it{toto}$') #ok
> > xlabel(r'$\it{toto}$') #ok
> >
> > but it's not working for \bf:
> >
> > xlabel('$\textbf{toto}$')  # bad
> > xlabel(r'$\textbf{toto}$') # ok
> > xlabel('$\bf{toto}$')# bad
> > xlabel(r'$\bf{toto}$')   # ok
> >
> > And this bring to the second question, I would like to create the xlabel
> > with latex stuf inside somewhere in my script:
> >
> > label='$\textrm{test}_2$'
> >
> > but that can't work:
> >
> > xlabel(label) # bad
> >
> > How to tell that I want the "r" before the chains to have TeX working
> > like expected?
>
> I think you have much to gain and nothing to lose by *always* using raw
> strings for TeX.  The reason your "bad" cases are bad is that \b and \t
> are escape sequences; in an ordinary string, without the leading r, the
> two-character sequences are translated into control characters (bell and
> tab, respectively).  \i is not an escape sequence, so it gets left alone.
>
> Eric

I agree with you but how can I use the raw strings when I want to compose a 
text (2nd question)

I tried:

label='$\textrm{test}_2$
xlabel(r label)
xlabel(r+label)

etc but it not working (like I expected). So I would like to know if there are 
a way to precise that the text is a raw string by another thing that the r 
character just before the string. Perhaps that will be good to have an option 
like raw=true or something similar?

Thanks,

N.




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] tex problem

2006-10-31 Thread humufr
Hi,

I have different questions to use tex with matplotlib.

The first one:

If I'm doing:

rc('text', usetex=True)
xlabel('$\textrm{toto}$')  # bad
xlabel(r'$\textrm{toto}$') # ok

The results are not the same and I don't understand why.

and for:

xlabel('$\textit{toto}$')  #bad
xlabel(r'$\textit{toto}$') #ok

same things, but it's working fine for:

xlabel('$\it{toto}$') #ok
xlabel(r'$\it{toto}$') #ok

but it's not working for \bf:

xlabel('$\textbf{toto}$')  # bad
xlabel(r'$\textbf{toto}$') # ok
xlabel('$\bf{toto}$')# bad
xlabel(r'$\bf{toto}$')   # ok

And this bring to the second question, I would like to create the xlabel with 
latex stuf inside somewhere in my script:

label='$\textrm{test}_2$'

but that can't work:

xlabel(label) # bad

How to tell that I want the "r" before the chains to have TeX working like 
expected?

Thanks,

N.




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to label the each line by the corresponding values in the contour plot?

2006-10-19 Thread humufr
CS=pylab.contour(X,Y,Z)
pylab.clabel(CS, inline=1, fontsize=10)

Le mercredi 18 octobre 2006 17:03, [EMAIL PROTECTED] a écrit :
> HI, all:
> How to label the each line by the corresponding values in the contour plot?
> Thanks!
>

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] crashes when using savefig for eps files

2006-10-17 Thread Humufr
did you try to fix the size of the figure and the dpi?

N.

Eric Emsellem wrote:
> Hi,
>
> I have a problem saving eps files in certain conditions. Unfortunately I
> am unable to find a simple example which may be very illustrative here
> to show you when it works and when it does not.
> I include the error message below and so the question is: does anybody
> have a hint of why the savefig fails and crashes?
>
> (I tried to close('all'), rcdefaults, etc).
>
> thanks for any input,
>
> Eric
> =
>
> >> savefig('toto.eps')
>   
>
> Your figure is too big to fit on a4 paper. b4 paper will be used to
> prevent clipping.
> AFPL Ghostscript 8.51: Unrecoverable error, exit code 1
> ---
> exceptions.NameError Traceback (most
> recent call last)
>
> /home/science/Sauron/AnalysisKin/Paper7/
>
> /usr/local/lib/python2.4/site-packages/matplotlib/pylab.py in
> savefig(*args, **kwargs)
> 809 def savefig(*args, **kwargs):
> 810 fig = gcf()
> --> 811 return fig.savefig(*args, **kwargs)
> 812 if Figure.savefig.__doc__ is not None:
> 813 savefig.__doc__ = _shift_string(Figure.savefig.__doc__)
>
> /usr/local/lib/python2.4/site-packages/matplotlib/figure.py in
> savefig(self, *args, **kwargs)
> 673 kwargs[key] = rcParams['savefig.%s'%key]
> 674
> --> 675 self.canvas.print_figure(*args, **kwargs)
> 676
> 677 def colorbar(self, mappable, cax=None, **kw):
>
> /usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py
> in print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
> **kwargs)
> 112 try:
> 113 agg.print_figure(filename, dpi, facecolor,
> edgecolor,
> --> 114  orientation, **kwargs)
> 115 except IOError, msg:
> 116 error_msg_gtk('Failed to save\nError message:
> %s'%(msg,), self)
>
> /usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py
> in print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
> **kwargs)
> 486 ps = self.switch_backends(FigureCanvasPS)
> 487 ps.print_figure(filename, dpi, facecolor, edgecolor,
> --> 488 orientation, **kwargs)
> 489 elif ext.find('pdf')>=0:
> 490 from backend_pdf import FigureCanvasPdf
>
> /usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py
> in print_figure(self, outfile, dpi, facecolor, edgecolor, orientation,
> papertype)
> 999 # Let's keep the usetex stuff seperate from the
> generic postscript
>1000 self._print_figure_tex(outfile, dpi, facecolor,
> edgecolor,
> -> 1001orientation, papertype)
>1002 else:
>1003 if  isinstance(outfile, file):
>
> /usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py
> in _print_figure_tex(self, outfile, dpi, facecolor, edgecolor,
> orientation, papertype)
>1233 elif rcParams['text.usetex']:
>1234 if False: pass # for debugging
> -> 1235 else: gs_distill(tmpfile, ext=='.eps',
> ptype=papertype, bbox=bbox)
>1236
>1237 if  isinstance(outfile, file):
>
> /usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py
> in gs_distill(tmpfile, eps, ptype, bbox)
>1331 exit_status = os.system(command)
>1332 fh = file(outfile)
> -> 1333 if exit_status: raise RuntimeError('ghostscript was not able
> to process \
>1334 your image.\nHere is the full report generated by ghostscript: \
>1335 \n\n'% dvifile + fh.read())
>
> NameError: global name 'dvifile' is not defined
>
>   
> -- 
> 
> Eric Emsellem [EMAIL PROTECTED]
>Centre de Recherche Astrophysique de Lyon
> 9 av. Charles-Andretel: +33 (0)4 78 86 83 84
> 69561 Saint-Genis Laval Cedex  fax: +33 (0)4 78 86 83 86
> Francehttp://www-obs.univ-lyon1.fr/eric.emsellem
> 
>   
> 
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
>
> ___
> Matplotlib-users mailing list
> Ma

Re: [Matplotlib-users] contour bug?

2006-10-16 Thread humufr
Le lundi 16 octobre 2006 15:55, Eric Firing a écrit :
> [EMAIL PROTECTED] wrote:
> > I thing there are a small problem with contour.
> >
> > import pyfits
> > import pylab
> > data = pyfits.getdata('test.fits')
> > pylab.imshow(data,cmap=cm.gray)
> > pylab.contour(data)
> > #to have the result wanted:
> > pylab.contour(data,origin='upper')
> > pylab.show()
> >
> > not sure that it's something did in purpose.
>
> It is intentional, not a bug.  See examples/contour_image.py
>
> Eric

So that means that contour does have origin set a lower by default when imshow 
is set at upper? If it's intentional I'll note it but I'm must admit that I 
have a problem with the logic.

N.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] bug or feature?

2006-10-16 Thread humufr
Hi,

I have some problem with this kind of script:

#!/usr/bin/env python
import numpy
import numpy.random
import pylab

a = numpy.random.rand(10,10)
pylab.matshow(a)
pylab.colorbar()

pylab.figure(figsize=(4.8,8),dpi=100)
pylab.imshow(a,aspect='equal',interpolation='nearest')
pylab.colorbar()

pylab.show()

The second figure is not good (at least for my point of view). I was expecting 
that the colorbar will have the same size than the image, even if aspect is 
set on equal or a number. Perhaps there are a simple solution for this that I 
didn't find.

Thanks

N.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Upgraded mayplotlib won't plot

2006-10-10 Thread humufr
clean completely your precedent installation. That means remove the directory 
matplotlib in the site-package directory.

N.

Le mardi 10 octobre 2006 09:46, Bill Dandreta a écrit :
> I upgraded matplotlib (from 0.84 to 0.87.4 and then 0.87.5) and my
> scripts that previously worked no longer plot.
>
> No error message just won't plot.
>
> I tried down grading to 0.84, that no longer plots either.
>
> I used the simple_plot.py example for testing.
>
> Bill
>
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys -- and earn
> cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] load and comments

2006-10-10 Thread humufr
Hi,

I'm using very often the load command, I would like to know why the default 
comments character is still '%', the one from matlab, other than historical? 
I would prefer to have the one from python '#'. I know it's just a personal 
preference but we are using python so for consistency I'm thinking that it 
would be better to have '#' or at least to have an option in matplotlibrc to 
choose the default character.

Thanks,

N. 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] markercolor broken

2006-10-09 Thread humufr
Hi,

some times ago I saw that the rgb color was not working anymore, the hexa code 
yes but not the rgb.

markerfacecolor=(120,120,120,)

retrun this error:

ValueError: to_rgb: Invalid rgb arg "(120, 120, 120)"
to_rgb: Invalid rgb arg "(120, 120, 120)"

but:

markerfacecolor='#88'

is working fine

I send a mail, I don't remember if I had time to post a bug report. Perhaps is 
it link?

N.

Le dimanche 8 octobre 2006 15:49, Eric Firing a écrit :
> Stefan,
>
> Thanks for the bug report--it is surprising that no one noticed this
> earlier.  It looks like Norbert's changes completely wiped out the
> setting of markerfacecolor and markeredgecolor.  I have reverted axes.py
> in svn to the 2788 revision (via revision 2799) so that it will work
> until Norbert gets a chance to add marker handling back into his patch
> and reapply it.
>
> Eric
>
> Stefan van der Walt wrote:
> > Hi all
> >
> > The marker behaviour changed in
> >
> > 
> > r2790 | nnemec | 2006-09-29 11:46:57 +0200 (Fri, 29 Sep 2006) | 1 line
> >
> > reworked linestyle and markercolor handling
> >
> >
> > For example, try the following:
> >
> > N.plot(N.random.random(1000),'r.')
> >
> > Note that all the dots are blue!
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys -- and earn
> cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug in numerix?

2006-09-26 Thread humufr
But why the compatibility function is used? Not the new one from numpy? I 
didn't ask for a Numeric compatibility?
I don't understand the need to have the Numeric function when I'm using numpy.
I think this is a bad "feature" perhaps not a bug but not the thing that the 
majority of people would like. In my opinion, if numerix is define to be 
numpy, all the function from numpy must be the default ones. In other hand 
that will confuse plenty of people. 
Now I understand that I have to avoid all numerix function. The problem is 
that I love to use ipython -pylab and so I have to be more careful when I'm 
doing fast plot...

N.

Le mardi 26 septembre 2006 14:00, Eric Firing a écrit :
> It is not a bug in numerix; numerix is using an older version of where,
> provided by numpy for compatibility with Numeric:
>
> In [4]:numpy.where?
> Type:   builtin_function_or_method
> Base Class: 
> String Form:
> Namespace:  Interactive
> Docstring:
>  where(condition, | x, y)
>
>  The result is shaped like condition and has elements of x and y where
>  condition is respectively true or false.  If x or y are not given,
>  then it is equivalent to condition.nonzero().
>
>  To group the indices by element, rather than dimension, use
>
>  transpose(where(condition, | x, y))
>
>  instead. This always results in a 2d array, with a row of indices for
>  each element that satisfies the condition.
>
>
> In [5]:pylab.where?
> Type:   function
> Base Class: 
> String Form:
> Namespace:  Interactive
> File:
> /usr/lib/python2.4/site-packages/numpy/oldnumeric/functions.py
> Definition: pylab.where(condition, x, y)
> Docstring:
>  
>
>
> Eric
>
> [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > I think there are a bug in numerix. I was expecting the same result from
> > pylab.where and numpy.where  (in my matplotlibrc I have numerix define
> > for numpy) but like you can see in the following example the result is
> > quite different.
> >
> > N.
> >
> >
> >
> >
> > Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
> > Type "copyright", "credits" or "license" for more information.
> >
> > IPython 0.7.3.svn -- An enhanced Interactive Python.
> > ?   -> Introduction to IPython's features.
> > %magic  -> Information about IPython's 'magic' % functions.
> > help-> Python's own help system.
> > object? -> Details about 'object'. ?object also works, ?? prints more.
> >
> >   Welcome to pylab, a matplotlib-based Python environment.
> >   For more information, type 'help(pylab)'.
> >
> > In [1]: import numpy
> >
> > In [2]: a = numpy.arange(123)
> >
> > In [3]: pylab.where(a>23)
> > -
> >-- exceptions.TypeError Traceback (most
> > recent call last)
> >
> > /home/humufr/
> >
> > TypeError: where() takes exactly 3 arguments (1 given)
> >
> > In [4]: from matplotlib import rcParams
> >
> > In [5]: rcPara
> > rcParams rcParamsDefault
> >
> > In [5]: rcParams['numerix']
> > Out[5]: 'numpy'
> >
> > In [6]: numpy.where(a>23)
> > Out[6]:
> > (array([ 24,  25,  26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,
> > 37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,
> > 50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,
> > 63,  64,  65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,
> > 76,  77,  78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,
> > 89,  90,  91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101,
> >102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
> >115, 116, 117, 118, 119, 120, 121, 122]),)
> >
> > -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your opinions on IT & business topics through brief surveys -- and earn
> > cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> --

[Matplotlib-users] bug in numerix?

2006-09-26 Thread humufr
Hi,

I think there are a bug in numerix. I was expecting the same result from 
pylab.where and numpy.where  (in my matplotlibrc I have numerix define for 
numpy) but like you can see in the following example the result is quite 
different.

N.




Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
Type "copyright", "credits" or "license" for more information.

IPython 0.7.3.svn -- An enhanced Interactive Python.
?   -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help-> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

  Welcome to pylab, a matplotlib-based Python environment.
  For more information, type 'help(pylab)'.

In [1]: import numpy

In [2]: a = numpy.arange(123)

In [3]: pylab.where(a>23)
---
exceptions.TypeError Traceback (most recent 
call last)

/home/humufr/

TypeError: where() takes exactly 3 arguments (1 given)

In [4]: from matplotlib import rcParams

In [5]: rcPara
rcParams rcParamsDefault

In [5]: rcParams['numerix']
Out[5]: 'numpy'

In [6]: numpy.where(a>23)
Out[6]:
(array([ 24,  25,  26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,
37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,
50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,
63,  64,  65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,
76,  77,  78,  79,  80,  81,  82,  83,  84,  85,  86,  87,  88,
89,  90,  91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101,
   102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
   115, 116, 117, 118, 119, 120, 121, 122]),)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] large postscript files

2006-09-06 Thread humufr
Le mercredi 6 septembre 2006 09:49, Darren Dale a écrit :
> On Wednesday 06 September 2006 07:49, [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > The following plot
> >
> > >>> from numarray import *
> > >>> x = arange(8)
> > >>> from pylab import plot,show
> > >>> plot(x,x)
> > >>> show()
> >
> > and saving in postscript format generated a file of 1.5MB, while the
> > equivalent is only 288KB in xmgrace (another plotting program). If I use
> > plot(x,x,"k,"), this even leads to a horrible 8.0MB. How come? I
> > understand there is an issue with the fonts, but this can't be the only
> > responsible, can it? Plotting no points, just a title, and saving in
> > postscript leads to a file size of only 133KB.
> >
> > FWIW, I'm trying to make postscript plots using Python 2.4.1, latest
> > numarray, and matplotlib 0.83.2.
>
> Each data point consists of a line like
>
> 54.3869 28.6788 l
>
> which is 17 bytes long. 17*8 = 1.36MB. Maybe we dont need as many sig
> figs, that could cut the size down by maybe 25%.
>
> Darren

Another things that can be good to add is a better clipping. For the moment 
there are no clipping that means if I have something like::


x =  arange(1000)
plot(x,x)
xlim(30,40)
savefig('test.svg')


All the point are stored in the file, not only the part between 30 and 40.

This is something I spoke before and I fill a bug or feature request on 
sourceforge (I'have been unable to find it today but I looked fast).

You can check the problem with the svg created if you open it with inkscape, 
you'll see all the point. I understood that this is a bug inside inkscape too 
butthat means that all the point are there and it's a big concern for me when 
I have to plot plenty of spectra and use only a small range because I know 
that my file at the end will be huge. The only way I found is 1) save in png 
and use another software to save it in eps but I loose the fact that eps is a 
vectoriel format 2) do the clipping myself or 3) create my plot with another 
software like pgplot or gnuplot. 

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mathtext2

2006-08-24 Thread humufr
Itś working now, thanks. Just a remark why the fonts must be in mpl-data and 
why matplotlib is not using the fonts who are in the system? 

N.

Le jeudi 24 août 2006 13:56, vous avez écrit :
> On Thursday 24 August 2006 13:42, [EMAIL PROTECTED] wrote:
> > Hello,
> >
> > I saw that mathtext2 was include in the svn, I try to test it but even
> > the demo is not working with the error message:
> >
> >
> >
> > ValueError: unrecognized symbol "\frac3"
> > WARNING: Failure executing file: 
>
> The demo doesn't work out of the box. You need to install download the
> freefont fonts into your mpl-data directory, and then add the following
> before the pylab import in mathtext2_demo.py:
>
> from matplotlib import rcParams
> rcParams['mathtext2'] = True
> rcParams['mathtext.rm'] = 'FreeSerif.ttf'
> rcParams['mathtext.it'] = 'FreeSerifItalic.ttf'
> rcParams['mathtext.tt'] = 'FreeMono.ttf'
> rcParams['mathtext.mit'] = 'FreeSerifItalic.ttf'
> rcParams['mathtext.cal'] = 'FreeSansOblique.ttf'
> rcParams['mathtext.nonascii'] = 'FreeSerif.ttf'

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] mathtext2

2006-08-24 Thread humufr
Hello, 

I saw that mathtext2 was include in the svn, I try to test it but even the 
demo is not working with the error message:



ValueError: unrecognized symbol "\frac3"
WARNING: Failure executing file: 


N.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] order of drawing a plot

2006-07-11 Thread humufr
you can use the zorder option:

plot(x_line,y_line,zorder=10)
scatter(x_point,y_point,zorder=12)


N.

Le mardi 11 juillet 2006 14:48, aonghus a écrit :
> Hi,
>
> I would like to draw a line, and then draw some points
> on top of the line, so I try something like
>
>  plot(x_line, y_line, ...)
>  scatter(x_point, y_point)
>
> but in the resulting plot it seems the points are
> drawn first and the lines drawn over them (so they are
> obscured).
>
> How do I specify the order in which the drawing should
> take place?
>
> thanks,
>
> a
>
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug?

2006-07-11 Thread humufr
Some change have been introduce in matplotlib? Because I used this sequence 
before and it was working. I'm a little bit surprise by the fact that the rgb 
sequence must be three numbers between 0 and 1. Generally rgb sequence are 
between 0 and 255, aren't they?


http://homepage.mac.com/jakesan/DHP/page0/page3/page3.html

And so my sequence is correct in this definition but yes false in the actual 
matplotlib definition but in this case an explicit error message must be 
given to tell that RGB color doesn't respect the general convention and must 
be between 0 and 1 

Regards,

N.

Le mardi 11 juillet 2006 04:43, Eric Firing a écrit :
> An rgb colorspec in matplotlib must be a sequence of three numbers
> between zero and one, so the problem is that you are indeed giving an
> invalid rgb arg.
>
> I think perhaps you grabbed an error message from a different instance
> of this error; when I try it, I get an error message that correctly
> gives the invalid arg that was supplied:
>
> ValueError: to_rgb: Invalid rgb arg "(120, 120, 120)"
> to_rgb: Invalid rgb arg "(120, 120, 120)"
>
>
> Eric
>
> [EMAIL PROTECTED] wrote:
> > Hello, I have a problem with the svn version of matplotlib. I don't know
> > when this problem appeared but it was working before.
> >
> > so the next script gave me an error message:
> >
> >
> > import pylab
> >
> > p = pylab.plot([1,2],[2,3],'o')
> > pylab.setp(p,markerfacecolor=(120,120,120),markersize=5,markeredgewidth=1
> >.,zorder=50)
> >
> > pylab.show()
> >
> > the main error message is:
> >
> > ValueError: to_rgb: Invalid rgb arg "(10.0, 10.0, 10.0)"
> > to_rgb: Invalid rgb arg "(10.0, 10.0, 10.0)"
> >
> > but I don't understand why.
> >
> > N.
> >
> >
> > -
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] bug?

2006-07-10 Thread humufr
Hello, I have a problem with the svn version of matplotlib. I don't know when 
this problem appeared but it was working before.

so the next script gave me an error message: 


import pylab

p = pylab.plot([1,2],[2,3],'o')
pylab.setp(p,markerfacecolor=(120,120,120),markersize=5,markeredgewidth=1.,zorder=50)

pylab.show()

the main error message is:

ValueError: to_rgb: Invalid rgb arg "(10.0, 10.0, 10.0)"
to_rgb: Invalid rgb arg "(10.0, 10.0, 10.0)"

but I don't understand why.

N.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib, numpy, numarray

2006-06-12 Thread humufr
oki sorry for griddata it was my fault. After the mail on the list, I cleaned 
all precedent installation and now it's working fine with numpy...

Thanks,

N.



Le samedi 10 juin 2006 13:45, Jeff Whitaker a écrit :
> Eric Firing wrote:
> > Thanks.  There were in fact several points of incompatibility with
> > Numeric and numarray. (Normally I would have checked this, but I
> > slipped up.) I have changed quiver.py and numerix to solve the
> > immediate problem, and to slightly reduce the incidence of such
> > problems in the future.  The real solution, of course, will be a
> > complete transition to numpy.
> >
> > Regarding griddata: I downloaded it a few minutes ago, built it, and
> > tested it with numpy, and it worked fine, at least with the test.py
> > that comes with the package.  Looking very quickly at the code, I
> > don't see anything specific to any numeric package; it is using the
> > buffer interface at the C level and matplotlib.numerix at the python
> > level. Perhaps the author, Jeff Whitaker, can shed more light on this
> > question.
> >
> > Eric
>
> Eric is correct - griddata should work with either Numeric/numarray/numpy.
>
> -Jeff


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


Re: [Matplotlib-users] matplotlib, numpy, numarray

2006-06-10 Thread humufr
Le vendredi 9 juin 2006 18:30, Christopher Barker a écrit :
> [EMAIL PROTECTED] wrote:
>
> well, anyone using Numeric (or numarray), can just keep on using it for
> a god while. So something that works now should work for a while into
> the future.

"should" but sometimes perhaps it's too hard to do this. One solution, if the 
function won't work with anything else than numpy, is to print a 
warning/error message for this specific function. That will push people 
towards numpy?

N.


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


[Matplotlib-users] matplotlib, numpy, numarray

2006-06-09 Thread humufr
Hi,

just to tell that the new quiver2 sample are not working with numarray. 

/usr/lib/python2.4/site-packages/matplotlib/quiver.py", line 237, in 
_make_verts
scale = nx.amax(a) * math.sqrt(len(a)) # crude auto-scaling
AttributeError: 'module' object has no attribute 'amax'


I think that we will have soon a big problem with the scientific soft in 
python. Some of them will use numpy, Numeric or numarray and they will be 
totally incompatible. Theorically numpy was to do the reunification but a 
transition period must exist. The module Numerix was doing it for matplotlib 
but it's beginning to have more and more incompatibility. 
The quiver problem is not the only one. I used a lot the griddata module to 
interpolate some irregulary spaced data, it was working very fine but it's 
not working with numpy and I don't have the skill to change it unfortunatly.

I want to thank you for all the work done for matplotlib, the critics are only 
to avoid people to be distressed because one day all their softs won't work 
due to numpy/numarray/Numeric incompatibility and stop to use python.

Regards,

N.




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