[matplotlib-devel] numpy dtype argument

2008-06-12 Thread Manuel Metz
When looking, e.g. at axes.py, I see 3 different arguments passed to numpy astype()/array()/zero() and friends: x = np.asarray(x).astype(np.float32) x = np.zeros( x, np.float_ ) x = np.ones((col,), float) Is there a preferred one to stick to ?! Manuel ---

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Michael Droettboom
Hmm. Isn't broken for me. I suspect we have some sort of version mismatch. One thing to try -- in conf.py remove the line \usepackage{amsfonts} It actually doesn't seem to be necessary (but the other two are). This error message happens during package loading, before any of the core of our

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Michael Droettboom
It looks as if the docs can't be built if text.usetex is "True", first because of needing Unicode (which also requires setting text.latex.unicode to True), and second because the dollar_ticks.py demo doesn't escape '$'. I suppose we should hardcode text.usetex to "False" when building the docu

[matplotlib-devel] matplotlib-0.98 not easy_installable?

2008-06-12 Thread Neal Becker
matplotlib-0.98 is not available for easy_install it seems: sudo easy_install --dry-run matplotlib Searching for matplotlib Best match: matplotlib 0.91.2 Processing matplotlib-0.91.2-py2.5-linux-x86_64.egg matplotlib 0.91.2 is already the active version in easy-install.pth --

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Darren Dale
On Thursday 12 June 2008 08:08:41 am Michael Droettboom wrote: > It looks as if the docs can't be built if text.usetex is "True", first > because of needing Unicode (which also requires setting > text.latex.unicode to True), and second because the dollar_ticks.py demo > doesn't escape '$'. > > I su

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 7:01 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > Hmm. Isn't broken for me. I suspect we have some sort of version mismatch. > > One thing to try -- in conf.py remove the line > > \usepackage{amsfonts} > > It actually doesn't seem to be necessary (but the other two

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Michael Droettboom
John Hunter wrote: > On Thu, Jun 12, 2008 at 7:01 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > >> Hmm. Isn't broken for me. I suspect we have some sort of version mismatch. >> >> One thing to try -- in conf.py remove the line >> >> \usepackage{amsfonts} >> >> It actually doesn't seem to

[matplotlib-devel] Number of points in legend

2008-06-12 Thread Stéfan van der Walt
Hi all, By default, 'legend' uses two points two represent a line. This looks a bit weird when you have only markers (no line), e.g., import matplotlib.pyplot as plt plt.plot([1,2,3], [4,5,6], 'x', label='first line') plt.legend() plt.show() Notice how there are two crosses in the legend. Havi

Re: [matplotlib-devel] numpy dtype argument

2008-06-12 Thread Stéfan van der Walt
2008/6/12 Manuel Metz <[EMAIL PROTECTED]>: > When looking, e.g. at axes.py, I see 3 different arguments passed to > numpy astype()/array()/zero() and friends: > > x = np.asarray(x).astype(np.float32) > x = np.zeros( x, np.float_ ) > x = np.ones((col,), float) > > Is there a preferred one to s

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Michael Droettboom
This message looks interesting. It suggests that combining non-Computer Modern fonts with ams* packages can be troublesome. Perhaps this has been fixed in recent LaTeX distributions, which is why it works for me. http://osdir.com/ml/tex.latex.beamer.general/2006-01/msg00026.html I wonder if r

Re: [matplotlib-devel] numpy dtype argument

2008-06-12 Thread Michael Droettboom
This suggests that maybe the first line is a buglet (without any real consequence), since there happens to be no good reason to require that array to be single precision. I think it's reasonable to say that we should use double precision (float/float_/float64) everywhere floating point is need

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Johann Cohen-Tanugi
thanks Darren, I just tried and it completed to a readable pdf files, though after a couple of error message of this type : ! Undefined control sequence. \Equiv l.2379 \end{tabulary} ? x escaping with 'x' everythime lead to completion best, Johann

Re: [matplotlib-devel] Number of points in legend

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 7:56 AM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > linestyle 'x' ---> legend ' x ' > linestyle '-x' ---> legend '---x---' > > Has this been considered before? If not, I'll write a patch. I think this is just something that has been overlooked. The legend code

Re: [matplotlib-devel] numpy dtype argument

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 8:20 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: >> Both `np.float_` and the Python `float` are interpreted as >> `np.float64`. The only time you really need something other than >> `float` is if you require a width other than 64 (like in the first >> line you showed

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Michael Droettboom
That's my bad -- I added even more symbols to the symbol table without updating the preamble. I should have a fix shortly. Cheers, Mike Johann Cohen-Tanugi wrote: > thanks Darren, > I just tried and it completed to a readable pdf files, though after a > couple of error message of this type : >

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread John Hunter
On Wed, Jun 11, 2008 at 4:00 PM, John Hunter <[EMAIL PROTECTED]> wrote: > ! LaTeX Error: Command \Cap already defined. > Or name \end... illegal, see p.192 of the manual. This may have been obvious to all of you,but I am just discovering it. The problem is that *sphinx* is defining

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Michael Droettboom
Interestingly, sphinx *doesn't* define it for me. One of the first things I did was "grep Cap" on the latex build directory. I updated sphinx from SVN pretty recently... I wonder if that has anything to do with it. If that doesn't fix it, yes, that sounds like something to report. Cheers, M

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Johann Cohen-Tanugi
Personnally I get: build/latex/Matplotlib.tex:$\Cap$ \code{\textbackslash{}Cap} but I have sphinx 0.3 which is the version easy_installed on my FC8 box. Actually I wonder how much trouble this 0.3 version is a promise of. Johann Michael Droettboom wrote: > Interestingly, sphinx *doesn't* def

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Michael Droettboom
It appears to be Pygments (source code highlighter) that produces these lines. I have Pygments 0.10 which "works for me" (TM). pygments/formatters/latex.py 158:cmndef = r'\textcolor[rgb]{%s}{%s}' % ( Cheers, Mike Michael Droettboom wrote: > Interestingly, sphinx *doesn't* defin

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 9:25 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > Interestingly, sphinx *doesn't* define it for me. One of the first things I > did was "grep Cap" on the latex build directory. > I updated sphinx from SVN pretty recently... I wonder if that has anything > to do with

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Michael Droettboom
Johann Cohen-Tanugi wrote: > Personnally I get: > build/latex/Matplotlib.tex:$\Cap$ \code{\textbackslash{}Cap} That's a usage, not a definition. The problem is related to duplicate definitions of \Cap. > but I have sphinx 0.3 which is the version easy_installed on my FC8 > box. Actually I wonder

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 9:52 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > Eventually, we'll have to track down and document which versions of sphinx, > docutils and pygments work to build the matplotlib documentation. There's a > lot of moving parts here... Documenting is good, and I don'

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 7:47 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > Barring that, I suppose we'll have to a) drop the symbol table or b) use > mathtext to generate the math for LaTeX (there's something very patricidal > about that... ;). b) may be a little bit of work to do well, sin

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Johann Cohen-Tanugi
right, I agree : I tried because I did not know for sure whether it would work or not, and because that was post-lunch time :) Looks like bleeding edge sphinx is not required seemingly! Johann John Hunter wrote: > On Thu, Jun 12, 2008 at 9:52 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote

Re: [matplotlib-devel] Full rebuild in order

2008-06-12 Thread Michael Droettboom
John Hunter wrote: > On Thu, Jun 12, 2008 at 7:47 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > > >> Barring that, I suppose we'll have to a) drop the symbol table or b) use >> mathtext to generate the math for LaTeX (there's something very patricidal >> about that... ;). b) may be a litt

Re: [matplotlib-devel] numpy dtype argument

2008-06-12 Thread Christopher Barker
Manuel Metz wrote: >x = np.asarray(x).astype(np.float32) >x = np.zeros( x, np.float_ ) >x = np.ones((col,), float) > > Is there a preferred one to stick to ?! Michael Droettboom wrote: > x = np.asarray(x, np.float_) I'd vote for: x = np.asarray(x, np.float) It ends up resulting i

Re: [matplotlib-devel] matplotlib-0.98 not easy_installable?

2008-06-12 Thread Charlie Moad
If you don't pass the "-U" flag to easy_install, it won't look online if you already have a module installed. - Charlie On Thu, Jun 12, 2008 at 8:16 AM, Neal Becker <[EMAIL PROTECTED]> wrote: > matplotlib-0.98 is not available for easy_install it seems: > sudo easy_install --dry-run matplotlib

[matplotlib-devel] AttributeError: 'module' object has no attribute 'GraphicsContext'

2008-06-12 Thread Nils Wagner
Hi All, I have changed the backend in matplotlibrc from GTKAgg to WX CONFIGURATION BEGINS HERE # the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg # WX WXAgg Agg Cairo GD GDK Paint PS PDF SVG Template #backend : GTKAgg backend : WX Now I get python -i nlp_

Re: [matplotlib-devel] AttributeError: 'FigureCanvasWxAgg' object has no attribute 'SetInitialSize'

2008-06-12 Thread John Hunter
On Wed, Jun 11, 2008 at 4:34 PM, Stan West <[EMAIL PROTECTED]> wrote: > Would you please look over the attached patch? During > FigureCanvasWx.__init__, it connects FigureCanvasWx.SetInitialSize to > SetBestFittingSize or do_nothing if it isn't already inherited from > wx.Panel. FigureFrameWx.__

Re: [matplotlib-devel] AttributeError: 'module' object has no attribute 'GraphicsContext'

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 2:23 PM, Nils Wagner <[EMAIL PROTECTED] wrote: > "/usr/local/lib64/python2.5/site-packages/matplotlib/backends/backend_wx.py", > line 456, in __init__ > gfx_ctx = wx.GraphicsContext.Create(dc) > AttributeError: 'module' object has no attribute > 'GraphicsContext' > > An

Re: [matplotlib-devel] AttributeError: 'FigureCanvasWxAgg' object has no attribute 'SetInitialSize'

2008-06-12 Thread John Hunter
> On Thu, Jun 12, 2008 at 2:54 PM, Nils Wagner > <[EMAIL PROTECTED]> wrote: > >> src/ft2font.cpp: In member function 'Py::Object FT2Image::py_as_array(const >> Py::Tuple&)': >> src/ft2font.cpp:273: error: cannot convert 'int*' to 'npy_intp*' in argument >> passing >> error: command 'gcc' failed wit

Re: [matplotlib-devel] AttributeError: 'module' object has no attribute 'GraphicsContext'

2008-06-12 Thread Ken McIvor
Nils, To the best of my knowledge the wx.GraphicsContext class is not present in wxPython 2.6. Ken - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open S

Re: [matplotlib-devel] AttributeError: 'module' object has no attribute 'GraphicsContext'

2008-06-12 Thread Christopher Barker
John Hunter wrote: >> AttributeError: 'module' object has no attribute >> 'GraphicsContext' > Unfortunately, I do not have access to wxpython 2.6. wx.GraphicsContext was introduced in wxPython 2.8 -- it's never going to work with 2.6 or older. Personally, I think we should just focus on wxAgg,

Re: [matplotlib-devel] AttributeError: 'module' object has no attribute 'GraphicsContext'

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 3:07 PM, Ken McIvor <[EMAIL PROTECTED]> wrote: > To the best of my knowledge the wx.GraphicsContext class is not > present in wxPython 2.6. Nils, part of what we are trying to do on the 0.98 release series is remove a lot of legacy code supporting 18 versions of everything

Re: [matplotlib-devel] AttributeError: 'module' object has no attribute 'GraphicsContext'

2008-06-12 Thread Ken McIvor
On Jun 12, 2008, at 3:22 PM, John Hunter wrote: > > If some wx guru sees an easy fix here, by all means add it. Not to imply that I'm a guru, but I'll try to look into it this evening. > Otherwise, we should decide on a minimum wxpython version for the > trunk and raise an exception. I'm always

Re: [matplotlib-devel] AttributeError: 'module' object has no attribute 'GraphicsContext'

2008-06-12 Thread Christopher Barker
John Hunter wrote: > If some wx guru sees an easy fix here, by all means add it. > Otherwise, we should decide on a minimum wxpython version for the > trunk and raise an exception. I don't know how GraphicsContext is used in MPL, but it provides nifty features like alpha blending and anti-aliasin

Re: [matplotlib-devel] AttributeError: 'module' object has no attribute 'GraphicsContext'

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 3:38 PM, Ken McIvor <[EMAIL PROTECTED]> wrote: > On Jun 12, 2008, at 3:22 PM, John Hunter wrote: >> >> If some wx guru sees an easy fix here, by all means add it. > > Not to imply that I'm a guru, but I'll try to look into it this evening. Well, you are a guru to us :-) >>

Re: [matplotlib-devel] more hist() suggestions

2008-06-12 Thread Erik Tollerud
Maybe the best solution here is to simply add a "histogramkwargs" argument that gets passed into nump.histogram - that way, the user can also do things like have a weighted histogram if they so desire (probably want to make sure no one passes in {'new':False}, though, as that would screw everything

[matplotlib-devel] Skew-T

2008-06-12 Thread Ryan May
(Sorry if this is a duplicate) Hi, I'm trying to make a Skew-T LogP plot, an important plot in meteorology, using matplotlib (mainly to help convert people away from much more horrible solutions). You can see one here: http://www.rap.ucar.edu/weather/upper/oun.gif and more cartoonish: http:/

Re: [matplotlib-devel] [Matplotlib-users] No plots show after update

2008-06-12 Thread T J
Sorry, quick clarification: With usetex enabled, GTK will not plot GTKAgg will plot WXAgg will plot - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything

Re: [matplotlib-devel] Fwd: [Matplotlib-users] No plots show after update

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 5:28 PM, T J <[EMAIL PROTECTED]> wrote > With usetex turned on, > $ python examples/pylab_examples/simple_plot.py --verbose-debug > run_agg.out > fails to produce a plot. When usetex is turned off, the plot is produced. Does it help to clear the caches: > rm -rf ~/.mat

Re: [matplotlib-devel] [Matplotlib-users] No plots show after update

2008-06-12 Thread John Hunter
On Thu, Jun 12, 2008 at 5:36 PM, T J <[EMAIL PROTECTED]> wrote: > Sorry, quick clarification: > > With usetex enabled, > GTK will not plot > GTKAgg will plot > WXAgg will plot One more point, you may want to try usetex=False with the new mathtext support in 0.98, which is quite good. You ca

Re: [matplotlib-devel] [Matplotlib-users] No plots show after update

2008-06-12 Thread Darren Dale
On Thursday 12 June 2008 6:36:16 pm T J wrote: > Sorry, quick clarification: > > With usetex enabled, >GTK will not plot I don't think the gtk backend has ever supported usetex. Only the various Agg backends, postscript, and pdf backends support ustex. >GTKAgg will plot >WXAgg will p

Re: [matplotlib-devel] [Matplotlib-users] No plots show after update

2008-06-12 Thread T J
On Thu, Jun 12, 2008 at 3:50 PM, Darren Dale <[EMAIL PROTECTED]> wrote: > On Thursday 12 June 2008 6:36:16 pm T J wrote: >> Sorry, quick clarification: >> >> With usetex enabled, >>GTK will not plot > > I don't think the gtk backend has ever supported usetex. Only the various Agg > backends, po

[matplotlib-devel] test

2008-06-12 Thread Ryan May
Test. Ignore. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Op

[matplotlib-devel] test

2008-06-12 Thread Ryan May
Test. Ignore. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Op

[matplotlib-devel] Test

2008-06-12 Thread Ryan May
Test. Please disregard. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about an

Re: [matplotlib-devel] Test

2008-06-12 Thread David Moore
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ryan May wrote: > Test. Please disregard. > > Ryan > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma > Hi Ryan, Gmail never shows you your own emails. Your emails are getting to the list. HTH, Dave