Re: [Matplotlib-users] draw() doesn't always force draw on qt4?
Hello Glen, I'm not sure, but maybe it would help to use ax = subplot(111) and ax.plot(arange(it)) instead of plot(arange(it)) or to call a second draw() after plotting. regards Matthias On Wednesday 23 April 2008 20:49:46 Glen W. Mabey wrote: Hello, I'm using today's svn source and I'm surprised that the following loop does not get redrawn 10 times. for it in range( 10 ): plot( arange( it ) ) draw() raw_input(); That is, within a 'ipython -pylab' session. Is this really a question for the ipython folks? Or am I missing something here? Thank you, Glen Mabey - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java one ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Different between canvas.draw() and canvas.restore_region()??
I'm confused, because I don't see any place where self.canvas.draw is called in the code1 version. Also, when I resize the figure, the background region changes, so the plot gets messed up as I have noticed before with this method. Does anyone know a good way to recapture a clean background, in particular when the image is resized? Thanks, Glenn On Mon, Apr 21, 2008 at 6:21 AM, John Hunter [EMAIL PROTECTED] wrote: On Sun, Apr 20, 2008 at 9:13 PM, hjc520070 [EMAIL PROTECTED] wrote: Thanks for your help. I get it work. However, an interesting thing appears. The following two codes(code 1 and code 2) makes different result??? Only set background in different place. Anyone can tell me why? I am eager to know it. In code2, you copy the background before the canvas is drawn, which is wrong. code 1 is the correct approach. Calling ax.plot is not enough to cause the background to be drawn. You must call fig.canvas.draw first. JDH - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem with dynamic subplots and wx
The clipping rectangle was using inverted y-coordinates (origin at bottom), rather than origin at top. This has been fixed in SVN trunk r5067. FWIW, this seems to be specific to the Wx rendering backend, and doesn't happen with Agg, Gtk, Cairo etc. Cheers, Mike Brian Blais wrote: On Apr 23, 2008, at Apr 23:9:17 PM, Joshua Lippai wrote: I should note that I'm doing this on OS X 10.5.2, but I don't imagine Tiger would have a problem Leopard doesn't have. you do indeed have the problem. If you change the subplot(211) to subplot(111) you'll see the proper plot (a sine wave). For some reason, when you try to subplot with 2 rows and 2 columns (and probably more) the line doesn't appear on the plot. what it should look like, and does with .91.2, is attached. bb -- Brian Blais [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://web.bryant.edu/~bblais http://web.bryant.edu/%7Ebblais - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] draw() doesn't always force draw
On Wednesday 23 April 2008 02:49:46 pm Glen W. Mabey wrote: Hello, I'm using today's svn source and I'm surprised that the following loop does not get redrawn 10 times. for it in range( 10 ): plot( arange( it ) ) draw() raw_input(); That is, within a 'ipython -pylab' session. Is this really a question for the ipython folks? Or am I missing something here? That also surprises me, but it is not specific to the qt4 backend, nor to recent changes in svn. I see similar behavior with the gtkcairo backend in 0.91.2. Unfortunately, I dont have time to look into it further. Darren - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] font always the same in PNG
The font lookup mechanism has been much improved in 0.91.2 -- you may want to try using that. In 0.90.x, often if you don't get a perfectly exact match for a font, it reverts back to the default Vera Sans. Vera Sans, however, is not a fixed-width font. Can you provide the png file of fonts_demo.py so I can be sure of what is happening? One way to diagnose this is to do rc(verbose, level=debug-annoying) which will print out a bunch of stuff related to font lookup. Attach the output here and I'll have a look at it to try to figure out what may be going wrong. Cheers, Mike Paul Smith wrote: Hi all, I've been trying in vain to get a better font on a plot than the fixed width serif one that always appears. I've got lib-freetype6 installed (on Ubuntu server), and ran fc-cache after. The .matplotlib/ttfont.cache contains entries for the Free* fonts. The fonts themselves are in /usr/share/fonts/truetype/freefont. The sample code below would seem (to me) to have used FreeSans, but the png has the same bad looking fixed-serif font. When running the matplotlib examples/fonts_demo.py the result is the same font all over that .png figure too (difference only in sizes). I usually work on XP, and it all works fine there. Does using only Agg as the backend make any difference whatsoever? Paul ubuntu 7.10 python 2.5 matplotlib 0.90.1 Some sample code; import matplotlib from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Arial','FreeSans']}) matplotlib.use('Agg') from pylab import * plot(arange(100)) ax=gca() ax.set(xlabel='Useless',ylabel='Pointless') draw() show() savefig('test') l=ax.xaxis.get_label() print 'font prop: ',l.get_font_properties() print 'font name: ',l.get_fontname() Produces this output; font prop: (['Arial', 'FreeSans'], 'normal', 'normal', 'normal', 'normal', 12) font name: FreeSans - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend is not properly drawn when a plot is saved in 'pdf' format
I don't suspect another distro will make a difference. The bug is in matplotlib's Cairo backend (it's interface to Cairo), not in Cairo itself. Change your backend to PDF and you can avoid this bug. In the meantime, we'll need to fix the Cairo backend in matplotlib. Sorry I wasn't clearer the first time. Cheers, Mike Yong-Duk Jin wrote: Well, I may have to try it from another distro. Thanks ^^ On Thu, Apr 24, 2008 at 3:12 AM, Michael Droettboom [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: This bug seems to be Cairo-backend specific. The Python PDF backend seems to work fine. Most likely a problem in the Cairo backend and not Cairo itself, but I haven't dug any further. Cheers, Mike Joshua Lippai wrote: I just tested it on OS X using the wxAgg backend, and it appears to be fine. I've atached the pdf image. What GUI are you having matplotlib use? Josh On Wed, Apr 23, 2008 at 8:50 AM, Yong-Duk Jin [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I'm using matplotlib 0.91.2 from ubuntu hardy 8.04 When I saved a plot in a pdf format the legend is not properly drawn. I attached the figure to demonstrate the problem. The legend box(?) is smaller than the legend label. I used the following code to draw this test plot. from pylab import * x = []; y = [] figure(figsize=(2,2)) Angle = '0.0' plot(x,y,label='0.0deg'); axis([0,1,0,1]); legend() savefig('test.pdf') Any comment? -- Yong-Duk Jin - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net mailto: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 -- Yong-Duk Jin -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] win32 build error in _path.cpp: 'numeric_limits' : is not a member of 'std'
Thanks. Your suggested changes (slightly modified) are in SVN r5070. Thanks for the warning output -- I'll try to tackle some of those as well. Cheers, Mike Martin Spacek wrote: It worked! I had to make a few changes, and there's lots of warnings, but it's now compiling. I've attached a patch. In backend_agg.cpp, I had to replace an 'and' with '', and I had to replace a few 'round()' calls with your 'my_round()'. I don't think my_round is directly being included in backend_agg.cpp, it's still hanging around from its definition in agg_py_path_iterator.h. Don't know if something should be done about that. I've also attached the full output with all the warnings. Thanks Michael! Martin Michael Droettboom wrote: It doesn't appear to exist in VS2008 -- at least I can't find it in the online docs. Maybe someone else can enlighten me. In the meantime, I just wrote my own round function and switched to use that. Please update from SVN and let me know how it goes. And again, thank you for your patience. Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] failed to save in 'eps' format when I use latex environment
On Thursday 24 April 2008 08:53:47 am you wrote: Although the 'align' environment inside the figure environment does not cause any error, tt seems like that the 'put' command from the 'picture' environment in LaTeX does not accept \begin{something} ~ \end{something} or \[~\]. As you pointed out, my problem is coming from the limitation in LaTeX. However, there are two things I do not understand still. First, saving a plot with the align environment in 'eps' format had worked in the previous version of matplotlib (0.90.1 from ubuntu gutsy 7.10). What has been changed? Nothing with the latex support, as far as I can tell from the changelogs. Secondly, saving in a 'png' or 'pdf' format works still. What's the difference? Saving a ps or eps file goes through the procedure of embedding the figure in a latex document in order for PSFrags to do its job and convert some tags into actual text. That way you get scalable output. png just renders the text as images, not as text. pdf output uses dviread.py to parse the dvi files created by latex, get the font layout information, and place the glyphs. dviread was not available when we added support to the eps/*agg backends, it was contributed later by Jouni Seppanen. dviread is a simpler and more elegant approach than the way it is done in eps/*agg, but there are some subtle and difficult to resolve limitations of dviread (like rendering greek letters in math mode) that have prevented us from using it everywhere. Jouni, would you care to comment? - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] font always the same in PNG
Michael Droettboom [EMAIL PROTECTED] writes: The font lookup mechanism has been much improved in 0.91.2 -- you may want to try using that. In 0.90.x, often if you don't get a perfectly exact match for a font, it reverts back to the default Vera Sans. Vera Sans, however, is not a fixed-width font. Can you provide the png file of fonts_demo.py so I can be sure of what is happening? One way to diagnose this is to do rc(verbose, level=debug-annoying) which will print out a bunch of stuff related to font lookup. Attach the output here and I'll have a look at it to try to figure out what may be going wrong. Cheers, Mike Paul Smith wrote: Hi all, I've been trying in vain to get a better font on a plot than the fixed width serif one that always appears. I've got lib-freetype6 installed (on Ubuntu server), and ran fc-cache after. The .matplotlib/ttfont.cache contains entries for the Free* fonts. The fonts themselves are in /usr/share/fonts/truetype/freefont. The sample code below would seem (to me) to have used FreeSans, but the png has the same bad looking fixed- serif font. When running the matplotlib examples/fonts_demo.py the result is the same font all over that .png figure too (difference only in sizes). I usually work on XP, and it all works fine there. Does using only Agg as the backend make any difference whatsoever? Paul ubuntu 7.10 python 2.5 matplotlib 0.90.1 Some sample code; import matplotlib from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Arial','FreeSans']}) matplotlib.use('Agg') from pylab import * plot(arange(100)) ax=gca() ax.set(xlabel='Useless',ylabel='Pointless') draw() show() savefig('test') l=ax.xaxis.get_label() print 'font prop: ',l.get_font_properties() print 'font name: ',l.get_fontname() Produces this output; font prop: (['Arial', 'FreeSans'], 'normal', 'normal', 'normal', 'normal', 12) font name: FreeSans Hi Michael, I put in the rc line you suggested below into fonts_demo.py but didn't see it print any extra info (but did confirm in ipython that rcParams showed verbose.level had changed to annoying). It just quietly finished otherwise. Did I miss something here? I've linked the output of fonts_demo.py to; https://www.box.net/shared/static/o693hq3soo.png If I need to upgrade matplotlib above 0.90.1 I guess I'll have to build it separately unfortunately. We're trying to stick to the standard ubuntu packages that get pulled in for that release. Thanks for your help, Paul - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] failed to save in 'eps' format when I use latex environment
Darren Dale [EMAIL PROTECTED] writes: pdf output uses dviread.py to parse the dvi files created by latex, get the font layout information, and place the glyphs. [...] there are some subtle and difficult to resolve limitations of dviread (like rendering greek letters in math mode) that have prevented us from using it everywhere. Jouni, would you care to comment? The details are a little complicated, but yes, dviread.py lacks some features of the font support in dvips. The PS backend calls dvips and so gets to use all the font machinery in a modern TeX system, and dviread doesn't (yet) implement all the features. Another potential problem is that dviread makes more assumptions about the TeX system than the PS backend, and I have only tested it on TeX Live on a Mac. Both TeX Live and teTeX on a Unix-ish system should be fine, but I have no idea about TeX implementations on Windows, or any commercial implementations. For various reasons, I haven't had much time recently to hack on matplotlib, but improving dviread is high on my todo list when I do find the time. -- Jouni K. Seppänen http://www.iki.fi/jks - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] font always the same in PNG
Paul Smith wrote: Hi Michael, I put in the rc line you suggested below into fonts_demo.py but didn't see it print any extra info (but did confirm in ipython that rcParams showed verbose.level had changed to annoying). It just quietly finished otherwise. Did I miss something here? Does it work if you put this into your matplotlibrc? verbose.level: debug-annoying (Note it's debug-annoying, not simply annoying) I've linked the output of fonts_demo.py to; https://www.box.net/shared/static/o693hq3soo.png Hmm. That font is definitely not Vera Sans. Something really odd is going on here. If I need to upgrade matplotlib above 0.90.1 I guess I'll have to build it separately unfortunately. We're trying to stick to the standard ubuntu packages that get pulled in for that release. I can appreciate that goal -- and AFAIK it does work for other users on Ubuntu 7.10 so there is probably just some configuration problem here that we can hopefully get to the bottom of. Do you have any customizations in your matplotlibrc? Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How do you static link to freetype when building eggs?
Chris wrote: export CFLAGS=-arch i386 -I/Developer/src/libpng -I/Developer/src/freetype/include export LDFLAGS=-arch i386 -L/Developer/src/libpng -L/Developer/src/freetype rm -rf build python setupegg.py bdist_egg The build of freetype in /Developer/src/freetype does not even have dynamic libs built. The basedir dict in setupext.py contains the following entry for OSX: 'darwin' : [] even with that, I think setup.py looks in standard places. ImportError: dlopen(/Library/Python/2.5/site-packages/matplotlib- 0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/ft2font.so, 2): Library not loaded: /usr/local/lib/libfreetype.6.dylib Do you have /usr/local/lib/libfreetype.6.dylib on your build system? I assume so, or it wouldn't work at all. The easiest thing to do is remove it. Not a good solution if you need it for other things, but if nothing else you could temporarily re-name it in your build script, then name it back at end. Otherwise, poke more into setup.py and setupext.py, and remove any references to /usr/local/lib. Indeed, in an older version of MPL that I have handy, it's added in setupext.py. An Alternative: I posted a note about this yesterday, with no replies, so I'll try again: Instead of all of us going through the pain of figuring out how to build and link static libs for MPL, and PIL, and GDAL, and ???, why don't we just build against the nice Frameworks here: http://www.kyngchaos.com/wiki/software:frameworks yes, it's an extra download and install, but it's easy, they can be provided by package distributors, and they can be shared by a bunch of python packages (and other *nix-y software). See my message yesterday for more detail. I'm doing some testing with PIL -- it's very easy to build, and works fine. It looks like py2app picks up the libs fine, too, though I need a bit more testing. -Chris Referenced from: /Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5- i386.egg/matplotlib/ft2font.so Reason: image not found I thought I had my bases covered -- if anyone has some insight here, please let me know. maptlotlib is the only missing piece of the superpack of modules that I distribute for OSX. - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- 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] - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How do you static link to freetype when building eggs?
One more comment: Chris wrote: maptlotlib is the only missing piece of the superpack of modules that I distribute for OSX. The Superpack is great, but please, please, please built it Universal -- if you do that, then we'll solve a lot of distribution issues for OS-X python users everywhere. Yes, it's more pain for you, but the Python packages for OS-X situation is just way too ugly -- we really need to make it cleaner. -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] - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] find_best_location for axes ?
Hi, I want to inset one axes within a larger one... as in http://matplotlib.sourceforge.net/screenshots/axes_demo.py and http://matplotlib.sourceforge.net/screenshots/axes_demo_small.png but I was wondering if there is an option similar to best location in the legend function. So, instead of hardwiring, like: a = axes([.65, .6, .2, .2], axisbg='y'), I like it automatically place the inset in a best location! Thanks, Nino - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] OSX build under universal python fails
I'm trying to get a built of Matplotlib built under Python.org Python 2.5.2, but get the following build error, which did not occur under Leopard's python: src/_image.cpp: In member function ‘Py::Object _image_module:: from_images (const Py::Tuple)’: src/_image.cpp:848: error: insn does not satisfy its constraints: (insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set (mem:QI (plus:SI (reg/f:SI 6 bp) (const_int -280 [0xfee8])) [0 SR.2970+0 S1 A8]) (reg:QI 5 di)) 56 {*movqi_1} (nil) (nil)) src/_image.cpp:848: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://developer.apple.com/bugreporter for instructions. error: command 'gcc' failed with exit status 1 Any idea as to what the problem may be? Thanks in advance. - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] font always the same in PNG
Michael Droettboom [EMAIL PROTECTED] writes: Paul Smith wrote: Hi Michael, I put in the rc line you suggested below into fonts_demo.py but didn't see it print any extra info (but did confirm in ipython that rcParams showed verbose.level had changed to annoying). It just quietly finished otherwise. Did I miss something here? Does it work if you put this into your matplotlibrc? verbose.level: debug-annoying (Note it's debug-annoying, not simply annoying) I've linked the output of fonts_demo.py to; https://www.box.net/shared/static/o693hq3soo.png Hmm. That font is definitely not Vera Sans. Something really odd is going on here. I can appreciate that goal -- and AFAIK it does work for other users on Ubuntu 7.10 so there is probably just some configuration problem here that we can hopefully get to the bottom of. Do you have any customizations in your matplotlibrc? Cheers, Mike Mike, I've not made any other changes to matplotlibrc. In fact I only just now have copied the one in /etc to my $HOME/.matplotlib directory. It still seemed to pick up the /etc version as you'll see below, I guess coz I was sudo'd as root? :) anyway... Interesting the font search path seems to only include mpl-data fonts, but it does seem to know about the ones in /usr/share/fonts/truetype/freefont. Then fails to use one, so we're always back to cmr10. The output below was for my test plot but it's pretty much the same (longer) story for fonts_demo.py I tried copying all the freetype fonts into mpl-data/font and everything came out FreeSansOblique. Still failed to find the correct font, but used something a little closer. What do you make of it? I'll be away for a while but I'll check the list if I can. Cheers, Paul debug-annoying dump from my test plot program loaded rc file /etc/matplotlibrc matplotlib version 0.90.1 verbose.level debug-annoying interactive is False units is True platform is linux2 loaded modules: ['_bisect', 'distutils', 'random', 'datetime', 'matplotlib.tempfile', 'distutil s.sysconfig', 'encodings.encodings', 'pytz.cStringIO', 'struct', 'tempfile', 'p ytz.os', 'zipimport', 'string', 'encodings.utf_8', 'matplotlib.__future__', 'py tz.tzinfo', 'pytz.datetime', 'distutils.re', 'bisect', 'signal', 'matplotlib.py tz', 'pytz.tzfile', 'cStringIO', 'locale', 'encodings', 'dateutil', 'matplotlib .warnings', 'pytz.pytz', 'matplotlib.sys', 're', 'math', 'fcntl', 'UserDict', ' distutils.os', 'matplotlib', 'codecs', 'md5', '_locale', 'matplotlib.os', 'thre ad', 'itertools', 'distutils.sys', 'os', '__future__', '_sre', '__builtin__', ' matplotlib.re', 'operator', 'distutils.string', 'matplotlib.datetime', 'posixpa th', 'errno', 'binascii', 'sre_constants', 'matplotlib.md5', 'types', 'pytz.sys ', '_codecs', 'pytz', 'copy', '_struct', '_types', 'matplotlib.dateutil', 'hash lib', 'posix', 'encodings.aliases', 'exceptions', 'sre_parse', 'pytz.bisect', ' distutils.distutils', 'copy_reg', 'sre_compile', '_hashlib', '_random', 'pytz.s truct', 'site', '__main__', 'shutil', 'strop', 'encodings.codecs', 'gettext', ' pytz.sets', 'stat', 'warnings', 'encodings.types', 'sys', 'os.path', 'pytz.gett ext', 'matplotlib.distutils', 'distutils.errors', 'linecache', 'matplotlib.shut il', 'sets'] numerix numpy 1.0.3 font search path ['/usr/share/matplotlib/mpl- data/fonts/ttf', '/usr/share/matplotlib/mpl-data/fonts/afm'] trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmr10.ttf trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmtt10.ttf trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmmi10.ttf trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed- Bold.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed- Oblique.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Italic.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeMonoOblique.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldItalic.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSerif.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf trying fontname /usr/share/fonts/truetype/freefont/FreeSerifBold.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-
Re: [Matplotlib-users] OSX build under universal python fails
Chris, Based on recent emails, this looks like a problem attributed to the gcc version, not the python version. Suggested solutions are compile with the -Os flag or use gcc 4.2. Eric Chris wrote: I'm trying to get a built of Matplotlib built under Python.org Python 2.5.2, but get the following build error, which did not occur under Leopard's python: src/_image.cpp: In member function ‘Py::Object _image_module:: from_images (const Py::Tuple)’: src/_image.cpp:848: error: insn does not satisfy its constraints: (insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set (mem:QI (plus:SI (reg/f:SI 6 bp) (const_int -280 [0xfee8])) [0 SR.2970+0 S1 A8]) (reg:QI 5 di)) 56 {*movqi_1} (nil) (nil)) src/_image.cpp:848: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://developer.apple.com/bugreporter for instructions. error: command 'gcc' failed with exit status 1 Any idea as to what the problem may be? Thanks in advance. - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] OSX build under universal python fails
Chris [EMAIL PROTECTED] writes: Based on recent emails, this looks like a problem attributed to the gcc version, not the python version. Suggested solutions are compile with the -Os flag or use gcc 4.2. I think universal builds may have to wait for another day, when gcc 4.2 is ready for prime time. Actually, the -0s flag with gcc 4.0 seemed to work just fine. Thanks. - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] find_best_location for axes ?
On Thu, Apr 24, 2008 at 4:11 PM, Antonino Miceli [EMAIL PROTECTED] wrote: Hi, I want to inset one axes within a larger one... as in http://matplotlib.sourceforge.net/screenshots/axes_demo.py and http://matplotlib.sourceforge.net/screenshots/axes_demo_small.png but I was wondering if there is an option similar to best location in the legend function. So, instead of hardwiring, like: a = axes([.65, .6, .2, .2], axisbg='y'), I like it automatically place the inset in a best location! There isn't any such function, but you could look at the legend code for loc=best for inspiration if you want t roll your own. JDH - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How do you static link to freetype when building eggs?
On Thu, Apr 24, 2008 at 11:51 AM, Christopher Barker [EMAIL PROTECTED] wrote: I posted a note about this yesterday, with no replies, so I'll try again: Instead of all of us going through the pain of figuring out how to build and link static libs for MPL, and PIL, and GDAL, and ???, why don't we just build against the nice Frameworks here: http://www.kyngchaos.com/wiki/software:frameworks yes, it's an extra download and install, but it's easy, they can be provided by package distributors, and they can be shared by a bunch of python packages (and other *nix-y software). See my message yesterday for more detail. Hey Chris, I read your post and perhaps I am missing the obvious, but my basic question is: apple provides libpng and freetype with xcode which ships with their computers (an optional install from their cd) and these work fine with MPL, so why should we require an external dependency? JDH - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Different between canvas.draw() and canvas.restore_region()??
On Thu, Apr 24, 2008 at 2:43 AM, G Jones [EMAIL PROTECTED] wrote: I'm confused, because I don't see any place where self.canvas.draw is called in the code1 version. Also, when I resize the figure, the background region changes, so the plot gets messed up as I have noticed before with this method. Does anyone know a good way to recapture a clean background, in particular when the image is resized? It's a good question. There is no explicit fig.canvas.draw in the code1 example, but there is an implicit one, since the relevant function calls (draw_artist, restore_region and blit) occur in the wx OnTimer method. These things are GUI dependent, but stuff that happens in the idle hander or timer handler of GUI toolkits often happen after the initial mpl draw. JDH - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users