You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: John H. <jdh...@ac...> - 2005-03-09 19:54:27
|
>>>>> "andrea" == andrea gavana <and...@ti...> writes: andrea> No matter which is my choice, the window crashes and I get andrea> the usual XP message about sending error messages to andrea> Microsoft and so on. It is a strange exception, if I andrea> resize the window VERY slowly, there is no exception andrea> (usually). There is a known bug in Agg on Windows XP that appears on repeated draws (resizing does this) that causes a segmentation fault. I've only seen this in the context of draw markers (eg plot(x,y,'o') where 'o' is a plot marker symbol. Do you have markers in your plot? Unfortunately, even though I think I know where the bug is occurring, I don't yet have a fix for it. If it is too annoying, you may want to roll back to 0.71 until I figure this one out. andrea> Problem 2: Considering always the keypress_demo.py, if I andrea> run it (without resizing the window ;-) ) and I press the andrea> key "g" (for the grid), the grid appears and suddenly andrea> disappears. I opened the keypress_demo.py and I commented andrea> out the draw() command (that follows the grid() command), andrea> and now the grid does not disappear. What could be the andrea> problem with draw()?!? I have to use it in my application, andrea> but I am not able to display the grid... Oh, I get it :-) the 'g' key is now a default part of matplotlib -- eg pressing 'g' toggles the grid on any axes. I wrote the keypress_demo before making this behavior default, so what you see in the demo is that you toggle grid two times in keypress_demo, once in the default axes handling, and once in the demo. And so it ends up turning it on and back off. Time to update the demo! andrea> Thank your for every suggestion, and sorry for the long andrea> post. Bug reports are always welcome -- thanks! JDH |
From: John H. <jdh...@ac...> - 2005-03-09 19:46:21
|
>>>>> "Eli" == Eli Glaser <eg...@se...> writes: Eli> Thanks...Originally I opened up the PS file in a text editor Eli> and saw lines of hex data - I assumed it was a raster version Eli> of the plot. Now I see that hex data is describing the Eli> fonts, and there are standard vector descriptors at the end Eli> of the file. That's right -- to support mathtext and font compatibility between the raster formats and ps output, we embed the truetype font information directly into the file. Unfortunately, we haven't yet succeeded in getting just the characters we need embedded in the file, and have to dump the whole font file. We have a couple of approaches to fix this, and so the file size issue should get better in future releases. The only rasters we embed in postscript are images you create with imshow or figimage -- everything else is vector graphics. JDH |
From: Chris B. <Chr...@no...> - 2005-03-09 17:20:02
|
Hi all, I've built a new matplotlib package for OS-X. Bob Ippolito has graciously hosted it at: http://pythonmac.org/packages/ This is an upgrade to matplotlib 0.72.1, and it should work with Agg, Wx and Tk. I have not included PyGTK, as you need fink and/or darwinports to run PyGTK, and if you're running those, you can get matplotlib through them (I think). This version should work on an stock OS-X 10.3.* You, or course, need Numeric or numarray (available on the same site), and TK or wxPython, if you want to use those back ends. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: John H. <jdh...@ac...> - 2005-03-08 23:14:41
|
>>>>> "James" == James Boyle <bo...@ll...> writes: James> My suggestion is that the options for legend location James> include an option 'outside right' to automate this process. See Figure.legend or the pylab figlegend function which exposes it. Should help... JDH |
From: James B. <bo...@ll...> - 2005-03-08 23:08:48
|
Often I plot a lot of lines and the legend obscures some of the curves, especially if I do not want to re-scale the axes to make room for the legend. Taking my cue from what colorbar() does, I re-scale the figure and place the legend to the right of the plot. I have to dink around to make the legend fit in this space but it works OK. This is also handy for contour plots that have the contours color mapped. In the vertical I usually put the legend even with the top of the plot. My suggestion is that the options for legend location include an option 'outside right' to automate this process. --Jim |
From: Norm P. <nj...@nj...> - 2005-03-08 14:59:22
|
> > I guess my real question is: is it possible to save a matplotlib plot > in a vector-based format? > Sure, saving as ".svg" works just fine for me... > Thanks, > > Eli > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Rich D. <dr...@in...> - 2005-03-07 22:01:40
|
On Mon, 7 Mar 2005, Jim Benson wrote: > I had that vertical text problem when i first used legend...until > John showed me my error. > > I think: > > legend(('aLabel',), 'upper left') > notice that needed , after the 'aLabel' Ah yes, the old tuple trick. Duh. Thanks. Now the only question remains: is there any way to put the marker *symbol* itself into the legend too? On a regular (non-scatter) plot's legend that is taken care of automatically, but in a scatter plot the 'lines' can't be labeled (I think). Thanks, Rich |
From: Eli G. <eg...@se...> - 2005-03-07 21:37:28
|
> > It does not save a bitmap of the image to a postscript file, but > normal postscript commands. The eps file is relatively large > (at least compared to png) because it includes a large but fixed > amount of font data. Try adding another line to your plot or > otherwise changing the contents of the plot, and you'll see size > of the eps file change. Thanks...Originally I opened up the PS file in a text editor and saw lines of hex data - I assumed it was a raster version of the plot. Now I see that hex data is describing the fonts, and there are standard vector descriptors at the end of the file. Thanks again, Eli |
From: Jim B. <jb...@se...> - 2005-03-07 21:25:56
|
On Mon, 7 Mar 2005, Rich Drewes wrote: > > Hello, > > I'm looking for the cleanest way to put a sort of legend into a scatter > plot. I want a legend box that says "<blue circle> is something, <red > square> is somethingelse" and so on. However I can't seem to set line > labels as I can with other kinds of plots, and for some reason legend for > prints the text that I supply vertically (and of course it doesn't print > the <blue circle> or whatever). > Hi, I had that vertical text problem when i first used legend...until John showed me my error. I think: legend(('aLabel',), 'upper left') notice that needed , after the 'aLabel' For more than one line label: legend(('aLabel1', 'aLabel2', 'aLabel3'), 'upper left') ...i'm still several versions behind the current matplotlib release, so i don't know if the syntax may be different now. Hope this helps, Jim |
From: Rich D. <dr...@in...> - 2005-03-07 21:06:23
|
Hello, I'm looking for the cleanest way to put a sort of legend into a scatter plot. I want a legend box that says "<blue circle> is something, <red square> is somethingelse" and so on. However I can't seem to set line labels as I can with other kinds of plots, and for some reason legend for prints the text that I supply vertically (and of course it doesn't print the <blue circle> or whatever). Any suggestions? Just paste some text()? (And if I do that, can I get it to put a <blue circle> next to my label?) Thanks to the developers of matplotlib and those who contribute support on this list! Rich |
From: Matt N. <new...@ca...> - 2005-03-07 20:53:28
|
> > I dont think it is a bitmap, but I will let someone more > > knowledgable speak to that. > > Can anyone confirm or deny this? It seems to me that it is > saving out in a rasterized version encapsulated in the > postscript format. I tried saving a simple plot in both PNG > and PS format - the PNG is 77 kb and the PS is 623 kb. The > plot only has 3 curves and a legend so I'm guessing its being > rasterized in the PS format. > > I guess my real question is: is it possible to save a > matplotlib plot in a vector-based format? It does not save a bitmap of the image to a postscript file, but normal postscript commands. The eps file is relatively large (at least compared to png) because it includes a large but fixed amount of font data. Try adding another line to your plot or otherwise changing the contents of the plot, and you'll see size of the eps file change. Cheers, --Matt |
From: Eli G. <eg...@se...> - 2005-03-07 19:32:03
|
>> savefig(*args, **kwargs) >> SAVEFIG(fname, dpi=150, facecolor='w', edgecolor='w', >> orientation='portrait'): >> >> Save the current figure to filename fname. dpi is the resolution >> in dots per inch. >> >> Output file types currently supported are jpeg and png and will be >> deduced by the extension to fname > > I agree that is a little misleading, but keep reading: > > orientation is either 'landscape' or 'portrait' - not supported on > all backends; currently only on postscript output. > > savefig works for ps and eps, I use it all the time without changing > backends. > Ok I tried that out and I am able to save ps files without doing any backend switching. Thanks for the tip! >> Also I guess I'm not clear if saving to PS/EPS format actually creates a >> line drawing/ vector image or >> just creates a bitmap and encapsulates the bitmap in the PS/EPS format. >> I'm looking to >> be able to save as a line drawing or vector-type format. > > I dont think it is a bitmap, but I will let someone more knowledgable > speak to > that. Can anyone confirm or deny this? It seems to me that it is saving out in a rasterized version encapsulated in the postscript format. I tried saving a simple plot in both PNG and PS format - the PNG is 77 kb and the PS is 623 kb. The plot only has 3 curves and a legend so I'm guessing its being rasterized in the PS format. I guess my real question is: is it possible to save a matplotlib plot in a vector-based format? Thanks, Eli |
From: Rick M. <rm...@sa...> - 2005-03-07 18:10:48
|
Thanks. That worked fine. R. On Mar 7, 2005, at 10:41 AM, Stephen Walton wrote: > Rick Muller wrote: > >> First, let me tell you how jaw-droppingly-cool I think matplotlib is. > > Ditto. > >> >> /usr/include/pygtk-2.0/pygobject.h:140: error: expected `,' or `...' >> before "typename" >> /usr/include/pygtk-2.0/pygobject.h:147: error: expected `,' or `...' >> before "typename" > > Old known problem with these include files, fixed at some more recent > version of pygtk. 'typename' is now a reserved word and so can't be > used as a variable name. Edit the above two lines and change > 'typename' to '_typename' manually and you'll have no trouble building > matplotlib on FC3. Heck that's what a lot of us are running. > > > Rick Muller - rm...@sa... - http://www.cs.sandia.gov/~rmuller Computational Materials and Molecular Biology Sandia National Laboratories PO Box 5800, M/S 1110 Albuquerque, NM 87185-1110 |
From: Matt N. <new...@ca...> - 2005-03-07 17:34:50
|
Hi Andrea, The pylab interface is generally the non-Class-based approached, suitable for small, procedural scripts. Personally, I'd say this is good for interactive use, 'one-time' scripts, and very simple uses of matplotlib, but that's just my opinion: it seems many people use pylab for more demanding apps. But: you don't need to import pylab at all if you're creating a matplotlib figure in a wxPython (or other) GUI. And, for me at least, toggling the grid and interacting with gui Events work fine. If the embedding_in_wx*.py and the docs aren't enough, you may find it useful to look at the wxPython plotting widget (MPlot) I've been working on. The code is currently at http://cars.uchicago.edu/~newville/Epics/Python/MPlot This provides a simple wxPython Panel (and/or Frame) widget that has simple plot() and oplot() methods. This widget responds to events for zoom, etc and several of the plot attributes (title, labels, line symbol/color,etc) can be altered through the GUI, and you can export plot images and/or use the Printer interface. The documentation is scant but there are a couple examples and a README. I'm intending to improve the functionality and docs and have at least one other person interested and helping out on this. Anyway, feel free to steal from this (that goes for anyone else on the list as well!!). Any suggestions for improvement would be great. Cheers, --Matt |
From: Darren D. <dd...@co...> - 2005-03-07 17:26:06
|
On Monday 07 March 2005 12:15 pm, and...@ti... wrote: > Hello Darren & NG, > > >from pylab import ... is intended for interactive matplotlib plotting > > sessions or scripting, with syntax very similar to Matlab. To see what it > > is all > > > >about, try http://matplotlib.sourceforge.net/tutorial.html, and > >http://matplotlib.sourceforge.net/pylab_commands.html > > I am not using Matplotlib/Pylab in interactive way. In my RC file the > interactive option is switched off. > [...] > > I'm sorry, probably I don't catch your point... No, I think I did not catch yours. Disregard my last message. -- Darren |
From: <and...@ti...> - 2005-03-07 17:15:35
|
Hello Darren & NG, > >from pylab import ... is intended for interactive matplotlib plotting se= ssions >or scripting, with syntax very similar to Matlab. To see what it is all >about, try http://matplotlib.sourceforge.net/tutorial.html, and >http://matplotlib.sourceforge.net/pylab_commands.html > I am not using Matplotlib/Pylab in interactive way. In my RC file the int= eractive option is switched off. >The example you are building from is the "Pythonic" object oriented inte= rface, > >which is more suitable for writing applications than the pylab interface= . I'm sorry, probably I don't catch your point... I used embedding_in_wx.py= because I am trying do embed a Matplotlib figure in a wxPanel on my appli= cation. It seems to me that this is the correct way to go. In my application, I am able to reproduce the strange behavior of the "gr= id" (pushing the "g" button or calling grid(True) doesn't change anything, th= e grid is deleted by Matplotlib). Regarding the examples, either they are not designed to work with Matplot= lib 0.72.1 or there is something strange happening somewhere (my PC? Matplotl= ib?). Andrea. |
From: Darren D. <dd...@co...> - 2005-03-07 17:08:17
|
Hi Andrea, On Monday 07 March 2005 11:54 am, and...@ti... wrote: > > I am following the embedding_in_wx.py example. If effect, I never use the > syntaxes: > > from pylab import > import pylab > > and so on. I just "copied" the embedding_in_wx.py module and I have adapted > it for my purposes. This is my import section: > > from matplotlib import use as matuse > matuse('WXAgg') > from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as > FigureCanvas from matplotlib.backends.backend_wx import > NavigationToolbar2Wx > > from matplotlib.figure import Figure > > Pylab is not there... am I missing something else? from pylab import ... is intended for interactive matplotlib plotting sessions or scripting, with syntax very similar to Matlab. To see what it is all about, try http://matplotlib.sourceforge.net/tutorial.html, and http://matplotlib.sourceforge.net/pylab_commands.html The example you are building from is the "Pythonic" object oriented interface, which is more suitable for writing applications than the pylab interface. -- Darren |
From: <and...@ti...> - 2005-03-07 16:55:08
|
Hello Matt & NG, >I get this (fast resizes will eventually crash python though not >immediately) as well with keypress_demo.py, but not with >embedding_in_wx.py or in my own class-based uses of WXAgg: they >resize fine (and quickly) without crashing. It doesn't seem to >be leaking memory, but it seems like it may be something >specific to pylab. I'm not very familiar with pylab, so I'm not >sure of the details. > I am not familiar with pylab too, so I don't know what may be the problem= . >I believe this behavior is common to other backends (the >toggling occurs for me with the TkAgg backend too). I'd guess >that this example hasn't been updated to work with the newer >approaches to pylab being "interactive". Again, I'm not sure of >the right fix, as I'm not familiar enough with the approach that >starts with "from matplotlib.pylab import *" > >The keypress and resizing events work for me with WXAgg on >WinXP. Is it possible to meet your needs by following the >embedding_in_wx.py examples instead of relying on pylab? > I am following the embedding_in_wx.py example. If effect, I never use the= syntaxes: from pylab import import pylab and so on. I just "copied" the embedding_in_wx.py module and I have adapt= ed it for my purposes. This is my import section: from matplotlib import use as matuse matuse('WXAgg') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Figure= Canvas from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure Pylab is not there... am I missing something else? Thank you very much for your help. Andrea. |
From: Darren D. <dd...@co...> - 2005-03-07 16:54:21
|
On Monday 07 March 2005 11:36 am, Eli Glaser wrote: > Darren, > > It was my impression that savefig() only supports jpeg and png format. > > From the docs: > http://matplotlib.sourceforge.net/matplotlib.pylab.html#-savefig > > savefig(*args, **kwargs) > SAVEFIG(fname, dpi=150, facecolor='w', edgecolor='w', > orientation='portrait'): > > Save the current figure to filename fname. dpi is the resolution > in dots per inch. > > Output file types currently supported are jpeg and png and will be > deduced by the extension to fname I agree that is a little misleading, but keep reading: orientation is either 'landscape' or 'portrait' - not supported on all backends; currently only on postscript output. savefig works for ps and eps, I use it all the time without changing backends. > > > Also I guess I'm not clear if saving to PS/EPS format actually creates a > line drawing/ vector image or > just creates a bitmap and encapsulates the bitmap in the PS/EPS format. > I'm looking to > be able to save as a line drawing or vector-type format. I dont think it is a bitmap, but I will let someone more knowledgable speak to that. -- Darren |
From: Eli G. <eg...@se...> - 2005-03-07 16:36:14
|
Darren, It was my impression that savefig() only supports jpeg and png format. From the docs: http://matplotlib.sourceforge.net/matplotlib.pylab.html#-savefig savefig(*args, **kwargs) SAVEFIG(fname, dpi=150, facecolor='w', edgecolor='w', orientation='portrait'): Save the current figure to filename fname. dpi is the resolution in dots per inch. Output file types currently supported are jpeg and png and will be deduced by the extension to fname Also I guess I'm not clear if saving to PS/EPS format actually creates a line drawing/ vector image or just creates a bitmap and encapsulates the bitmap in the PS/EPS format. I'm looking to be able to save as a line drawing or vector-type format. Thanks, Eli ----- Original Message ----- From: "Darren Dale" <dd...@co...> To: <mat...@li...> Sent: Monday, March 07, 2005 10:52 AM Subject: Re: [Matplotlib-users] PS Output from WXAGG / wxPython application > Hi Eli, > > Have you tried simply calling savefig('file.eps')? You shouldnt need to > worry > about switching backends. > > Darren > > > On Monday 07 March 2005 10:37 am, Eli Glaser wrote: >> Hello all, >> >> First let me say how much I appreciate matplotlib and the matplotlib >> community. >> >> I currently have a wxPython application which embeds a matplotlib window >> using the WXAgg backend. I use this >> application to generate plots based on some simple user inputs. After I >> get the plot looking the way I like, I have >> a "Save Plot" button which basically calls >> self.canvas.print_figure(filename,...). This works great for saving to >> JPG and PNG format. What I'd like to do is be able to save to PS or EPS >> format. Is this possible? >> >> It seems like there is an switch_backend() function which might be of >> help. >> Before I go down that route, I'd like to know >> if it is possible to use the WXAgg backend for normal plotting to the >> screen and then switch_backend(PS), redraw the >> plot, save using print_figure() or savefig() to a *.ps file, and then >> switch_backend(WXAgg) to resume interactive >> plotting on the screen. >> >> Thanks, >> >> Eli >> >> >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- > > Darren > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Darren D. <dd...@co...> - 2005-03-07 16:20:39
|
Hi Eli, Have you tried simply calling savefig('file.eps')? You shouldnt need to worry about switching backends. Darren On Monday 07 March 2005 10:37 am, Eli Glaser wrote: > Hello all, > > First let me say how much I appreciate matplotlib and the matplotlib > community. > > I currently have a wxPython application which embeds a matplotlib window > using the WXAgg backend. I use this > application to generate plots based on some simple user inputs. After I > get the plot looking the way I like, I have > a "Save Plot" button which basically calls > self.canvas.print_figure(filename,...). This works great for saving to > JPG and PNG format. What I'd like to do is be able to save to PS or EPS > format. Is this possible? > > It seems like there is an switch_backend() function which might be of help. > Before I go down that route, I'd like to know > if it is possible to use the WXAgg backend for normal plotting to the > screen and then switch_backend(PS), redraw the > plot, save using print_figure() or savefig() to a *.ps file, and then > switch_backend(WXAgg) to resume interactive > plotting on the screen. > > Thanks, > > Eli > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Darren |
From: Eli G. <eg...@se...> - 2005-03-07 15:37:17
|
Hello all, First let me say how much I appreciate matplotlib and the matplotlib community. I currently have a wxPython application which embeds a matplotlib window using the WXAgg backend. I use this application to generate plots based on some simple user inputs. After I get the plot looking the way I like, I have a "Save Plot" button which basically calls self.canvas.print_figure(filename,...). This works great for saving to JPG and PNG format. What I'd like to do is be able to save to PS or EPS format. Is this possible? It seems like there is an switch_backend() function which might be of help. Before I go down that route, I'd like to know if it is possible to use the WXAgg backend for normal plotting to the screen and then switch_backend(PS), redraw the plot, save using print_figure() or savefig() to a *.ps file, and then switch_backend(WXAgg) to resume interactive plotting on the screen. Thanks, Eli |
From: Rick M. <rm...@sa...> - 2005-03-07 13:00:00
|
First, let me tell you how jaw-droppingly-cool I think matplotlib is. I think I've used every plotting package for Python out there, and matplotlib is the best of them all. These are truly "publication quality" graphics. Congratulations on a wonderful package. Now, being that cool, I want to install them everywhere. I found a binary version for the mac (although I would prefer to install from source...), but I'm having a hard time building on Fedora Core 3. The RH9 thread and the patch recommended therein was helpful, but I'm still getting a bug: gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -I/usr/local/include -I/usr/include -Isrc -Iagg22/include -I. -I/usr/local/include -I/usr/include -I/usr/local/include/freetype2 -I/usr/include/freetype2 -Isrc/freetype2 -Iagg22/include/freetype2 -I./freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I/usr/include/pygtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.3 -c src/_gtkagg.cpp -o build/temp.linux-i686-2.3/src/_gtkagg.o In file included from /usr/include/python2.3/Python.h:8, from /usr/include/pygtk-2.0/pygobject.h:5, from src/_gtkagg.cpp:8: /usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" redefined In file included from /usr/include/string.h:26, from /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/ cstring:51, from src/_gtkagg.cpp:1: /usr/include/features.h:150:1: warning: this is the location of the previous definition In file included from src/_gtkagg.cpp:8: /usr/include/pygtk-2.0/pygobject.h:140: error: expected `,' or `...' before "typename" /usr/include/pygtk-2.0/pygobject.h:147: error: expected `,' or `...' before "typename" error: command 'gcc' failed with exit status 1 I just re-tried this with the CVS version (I note you've fixed the RH9 bug therein), but this bug still occurs. Any suggestions? Thanks in advance for your help. Rick Rick Muller - rm...@sa... - http://www.cs.sandia.gov/~rmuller Computational Materials and Molecular Biology Sandia National Laboratories PO Box 5800, M/S 1110 Albuquerque, NM 87185-1110 |
From: <and...@ti...> - 2005-03-06 20:23:03
|
Hello NG, first of all, I would like to thank you a for your kind support. I ca= me across a couple of problems using Matplotlib/Pylab, and I would like to ask if someone else has encountered them or if I am missing something. First of all, I am on a WinXP, with: - Python 2.3.4 - wxPython 2.5.3.1 - Numeric 23.7 - I use WXAgg - Matplotlib/Pylab 0.72.1 Problem 1: I have downloaded the examples at: http://matplotlib.sourceforge.net/matplotlib_examples_0.72.zip If, for example, I try to run the keypress_demo.py, and if I resize the window "too fast" (but it's not really fast, is just a normal resize), I get an unhandled exception like: "An unhandled exception occurred. Press "Abort" to terminate the program,= "Retry" to exit the program normally and "Ignore" to try to continue." No matter which is my choice, the window crashes and I get the usual XP message about sending error messages to Microsoft and so on. It is a stra= nge exception, if I resize the window VERY slowly, there is no exception (usu= ally). Problem 2: Considering always the keypress_demo.py, if I run it (without resizing th= e window ;-) ) and I press the key "g" (for the grid), the grid appears and= suddenly disappears. I opened the keypress_demo.py and I commented out th= e draw() command (that follows the grid() command), and now the grid does not disappear. What could be the problem with draw()?!? I have to use it in my application, but I am not able to display the grid... Thank your for every suggestion, and sorry for the long post. Andrea. |
From: kristen k. <co...@ya...> - 2005-03-06 16:53:58
|
Hi Andrea Data inputs in plot must be lists or arrays. So instead of : plot( x[i] , y[i] ) you must write plot( [x[i]] , [y[i]] ) Kristen --- and...@ti... wrote: > Hello NG, > > I am trying to plot a series of point (in a > wxPython window). Everything > works if I plot all the points together, as: > > myreference = plot(x, y, 'ko') > > But I would like to plot 1 point at a time, and to > keep a "plot reference" > of every point, because I will have to be able to > interact with every single > point (and not with all of them) separately, using > the mpl_connect functions. > If I try to plot a single point, matplotlib/pylab > returns me an error like: > > File "D:\MyProjects\globall\SummaryPanel.py", line > 169, in CreateWellMap > mp = axdata.plot(xc[cc], yc[cc], "ko") > File > "C:\Python23\Lib\site-packages\matplotlib\axes.py", > line 2324, in > plot > for line in self._get_lines(*args, **kwargs): > File > "C:\Python23\Lib\site-packages\matplotlib\axes.py", > line 276, in > _grab_ne > xt_args > yield self._plot_3_args(remaining, **kwargs) > File > "C:\Python23\Lib\site-packages\matplotlib\axes.py", > line 238, in > _plot_3_ > args > assert(iterable(x)) > AssertionError > > > Does anyone have a suggestion? Thank you very much. > > Andrea. > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id396&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > __________________________________ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ |