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: Darren D. <dd...@co...> - 2005-04-20 21:13:09
|
Hi Gabriele, Matplotlib currently does not do this. The problem, as I understand it (and there are others on this list that may correct me), is that there is a lot of information that needs to be written into the prologue at the beginning of the file, like font information. This makes it difficult to append to an existing file, since each page description could require different information in the prologue. As an alternative, you could create multiple eps files. In the process, you could write a script that generates a simple latex document and embeds your eps files. Then you could convert that into PS. There are examples of this in "Python Scripting for Computational Science" by Hans Petter Langtangen. Darren On Wednesday 20 April 2005 3:29 am, Gabriele Garavini wrote: > Hi, > I'm new to matplotlib, I'm trying to save a series of plots in a single > postscript files. Is that possible? > I'm able to save each single plot in a different file using savefig, > but I'd like my script to save the plots in a single ps file with more > pages. Is there anyway to open a ps file, send the output of the plot() > command to it and close it as the script ends? > > Thanx > Cheers > Gabriele > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: New Crystal Reports XI. > Version 11 adds new functionality designed to reduce time involved in > creating, integrating, and deploying reporting solutions. Free runtime > info, new features, or free trial, at: > http://www.businessobjects.com/devxi/728 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Darren S. Dale Bard Hall Department of Materials Science and Engineering Cornell University Ithaca, NY. 14850 dd...@co... |
From: Andrew D. <da...@da...> - 2005-04-20 09:39:33
|
I would like to use matplotlib to make a simple client-side image map for a web page. I have a scatter plot and I would like mouseovers/clicks to show information about the given point. I started with the webapp_demo.py from the most recent release (0.80). There was a small bug % python webapp_demo.py Traceback (most recent call last): File "webapp_demo.py", line 87, in ? make_fig() File "webapp_demo.py", line 64, in make_fig x = nx.rand(100) AttributeError: 'module' object has no attribute 'rand' Here's my bandage hack import random def rand(n): return nx.array([random.random() for i in range(n)]) nx.rand = rand I then added some code after the PNG is written which generates an basic html file from the coordinates using what I thought was the correct transformation from data space to image space. canvas.print_figure('webapp.png', dpi=150) f = open("webapp.html", "w") f.write('''<HTML><BODY><img src="webapp.png" ismap usemap="#plot"> <map name="plot"> ''') t = c.get_transform() xys = t.seq_xy_tups(c.get_verts()) for i, xy in enumerate(xys): f.write('<area shape="circle" coords="%d,%d,2" href="%d">\n' % (xy[0], xy[1], i)) f.write("</map>\n</html>") The HTML output starts with the following <HTML><BODY><img src="webapp.png" ismap usemap="#plot"> <map name="plot"> <area shape="circle" coords="393,286,2" href="0"> <area shape="circle" coords="381,285,2" href="1"> <area shape="circle" coords="222,271,2" href="2"> <area shape="circle" coords="238,300,2" href="3"> There are two things wrong with the code. First, the transformed coordinates aren't at the same scale as the generated PNG. The PNG size depends on the dpi setting but the x/y coordinates aren't affected by that setting. Second, I think I have the y direction swapped. Where do I get the current image size, and for that matter how do I set the output image size? Andrew da...@da... |
From: Werner F. B. <wer...@fr...> - 2005-04-20 08:48:28
|
Hi All, I think I found a solution for dates.py which could work for everyone. Instead of hardcoding the encoding I "import locale" and get the default encoding from it. I have tested it on both Win XP and 2000 and it works for me, i.e. in English locale I get "Dec" and in French locale I get "déc." etc. without the correction I would get a graphic sign for the "é". To test just use "locale.setlocale(locale.LC_ALL, 'fr')" Just noticed that "avr" is not correctly aligned with the other month, but that's for another day. The only two changes needed to dates.py are: import locale and change return dt.strftime(fmt) to return unicode(dt.strftime(fmt), locale.getpreferredencoding()) Best regards Werner Werner F. Bruhin wrote: > In some of my plots I show month names as axes labels. > > When I run this on a machine in "French" (i.e. on Win XP changing the > Settings - Regional and Language settings" to French the labels don't > show correctly if there is an accented character in there e.g. "déc". > > I changed the line 256 in dates.py (matplotlib 0.8) from: > > return dt.strftime(fmt) > > to: > > return unicode(dt.strftime(fmt), 'iso-8859-1') > > Obviously this is not a correct fix as it will only work in some > situations. > > I tried to use sys.getdefaultencoding(), instead of hard coding > 'iso-8859-1', but on my machine it returns "ascii". > > Any suggestions on how to handle this correctly will be very appreciated. > > See you > Werner > > > > ------------------------------------------------------- > 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 > |
From: Gabriele G. <gar...@in...> - 2005-04-20 08:25:31
|
Hi, I'm new to matplotlib, I'm trying to save a series of plots in a single postscript files. Is that possible? I'm able to save each single plot in a different file using savefig, but I'd like my script to save the plots in a single ps file with more pages. Is there anyway to open a ps file, send the output of the plot() command to it and close it as the script ends? Thanx Cheers Gabriele |
From: Gabriele G. <gar...@in...> - 2005-04-20 07:29:11
|
Hi, I'm new to matplotlib, I'm trying to save a series of plots in a single postscript files. Is that possible? I'm able to save each single plot in a different file using savefig, but I'd like my script to save the plots in a single ps file with more pages. Is there anyway to open a ps file, send the output of the plot() command to it and close it as the script ends? Thanx Cheers Gabriele |
From: Grig G. <gr...@gh...> - 2005-04-19 19:02:50
|
Hi, I'd like to be able to add text to various (x,y) coordinates. Currently I specify a figsize of (1.3,0.3) and I add as text (via the text method) the value of the last y, right next to that data point. Depending on the actual value, sometimes the text does not fit within the bounds of the figure. Is there any way I can enlarge just the figure so that the text can fit, without enlarging the axes? Or is there a better way to solve my problem? Thanks, Grig |
From: Darren D. <dd...@co...> - 2005-04-19 14:36:30
|
On Friday 15 April 2005 5:32 am, Sascha Schnepp wrote: > I realized a change in the behavior of the eps export with the release 0.8. > Sometimes (not always!) the bounding box on the left side is very close to > the ylabel. When converting this to a pdf and printing it, this results in > a (partially or even totally) cutted ylabel on your printout... The script at the end of this message will reproduce the behavior Sasha reported. Sasha, the short answer is to try replacing your call pl=subplot(111) with pl = axes([0.16,0.11,0.8,0.8]). The problem is that MPL will not be able to guess the appropriate position of the axes in every circumstance, because the precision of the tick labels is allowed to go as far as 3 or 4 places, and the presence scientific notation will also push the axis label off the page. I did some work on a new formatter a while back, and think it would help to solve this issue more generally. The idea was to pull the scientific notation out of the ticklabels, and render it at the top of the axis, like Matlab does. Another place to render could be in the axis label, like Igor allows. It might also be appropriate to add a new rc setting for the tick precision: the number of sigfigs to include in a ticklabel. MPL would then be able to intelligently place the axis in the plot window, based on the rc settings for fontsize of the axis labels, the fontsize of the ticklabels, and the precision. from pylab import * a=arange(-1,1,.01) plot(a,a*1e-4) xlabel('X axis') ylabel('Y axis') savefig('test.eps') show() -- Darren S. Dale Bard Hall Department of Materials Science and Engineering Cornell University Ithaca, NY. 14850 dd...@co... |
From: <Fer...@co...> - 2005-04-19 07:56:10
|
Hi Nikolai, Nikolai Hlubek wrote: > Last week I stumbled about a bug in imshow, which can easily be > reproduced by doing the following: > > python > >>> from pylab import * > >>> imshow(ones((20,40)),aspect='preserve',origin='lower') > >>> show() > Note that the y-axis is wrong and resizing makes this even worse. > I tried versions 0.71 to 0.80 which show all the same behaviour. > > It is obviously the aspect='preserve' option, that introduces this bug. > > So I'd like to address two issues: > First of course I'd like to ask if this bug could be fixed since > constant aspect ratio is very crucial for me. > Second it seems that the plotting area is always maximum size and the > aspect='preserve' option just rescales the axis. I think it would be > more natural to rescale the plotting area. You may want to use matshow for this kind of problem, which will try to give you a figure with the aspect ratio of the array you actually want to display. As you noticed, the preserve feature is basically broken right now, and there has been a fair amount of discussion on how to fix it. In the meantime, the best workaround is to compute figure size and axes aspect rations appropriate for your image aspect ration using the figure and axes command, which is basically what matshow does. Best, f/jdh |
From: Jeffrey O. <Jef...@ve...> - 2005-04-18 19:23:13
|
There appears to be a bug in the latest basemap distrib. (0.3.1) that prevents it from being installed in a non-standard location. In basemap.py, the required data file location is specified as: _datadir = os.path.join(sys.prefix,'share/basemap-py'+repr(sys.version_info[0])+rep r(sys.version_info[1])) On my system, sys.prefix returns '/usr'. However, I installed the package using the --prefix option and a different path than /usr. Then when basemap tries to access data files for coastlines, etc. with open(os.path.join(_datadir,'gshhs_'+resolution+'.txt')) it's looking for the files in /usr and they ain't there. Since I don't have root privileges on my own machine, I can't do a symbolic link (and that would be tacky anyway). Jeff, could you fix this? Thanks. Jeff Orrey |
From: Olive <enc...@ya...> - 2005-04-18 17:58:20
|
On Sat, 16 Apr 2005 00:19:37 +0200, Olive <enc...@ya...> wrote : > I forgot to take the version number of the freetype library before > leaving work, I will get it on monday. > Version of freetype is 2.1.7 ! |
From: Eric E. <ems...@ob...> - 2005-04-18 11:26:21
|
Hi, The more I am using matplotlib, the more I like it. But using it more means I more often hit the limits of the code, so I was wondering if there is any plan for a routine to plot data points w.r.t 3 axes (so a perspective scatter plot with x,y,z, data and a viewing angle). Of course another (maybe more difficult) goal would be to be able to draw surfaces, but already a simple scatter plot in 3D would help tremendously there (I realize the concept of "axis" has then to be revised, but well I have no idea how much effort this is). (if there is no - coming - plan for this, is there any way around it?) Please let me know, and congrats for the work already achieved! Cheers Eric -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== |
From: Nikolai H. <nik...@ma...> - 2005-04-18 10:35:25
|
Hi everyone Last week I stumbled about a bug in imshow, which can easily be reproduced by doing the following: python >>> from pylab import * >>> imshow(ones((20,40)),aspect='preserve',origin='lower') >>> show() Note that the y-axis is wrong and resizing makes this even worse. I tried versions 0.71 to 0.80 which show all the same behaviour. It is obviously the aspect='preserve' option, that introduces this bug. So I'd like to address two issues: First of course I'd like to ask if this bug could be fixed since constant aspect ratio is very crucial for me. Second it seems that the plotting area is always maximum size and the aspect='preserve' option just rescales the axis. I think it would be more natural to rescale the plotting area. Cheers, Nikolai |
From: Werner F. B. <wer...@fr...> - 2005-04-18 10:34:12
|
Hi David, Thanks for the info. See you Werner D Brown wrote: > Werner, > > Recently I reported a batch plot memory issue when using > mostly matlab-style commands and TkAgg backend. In my case > I found that the memory increased when I called close(). > If I stopped using this the memory use became more or less > constant. Based on Fernando Perez's comments I also > started using import gc and gc.collect() to reduce memory > use more. This just calls the garbage collector more > frequently to clean up memory. If your system is paging to > disk because of memory use it can speed things up quite a > bit. In my case it keeps the total python footprint > significantly reduced. > > Good Luck, > > David > > >>From: "Werner F. Bruhin" <wer...@fr...> >>Date: Thu, 14 Apr 2005 11:42:34 +0200 >>Subject: [Matplotlib-users] Memory usage > > >>Hi All, >> >>Doing multiple plots I see that memory usage grows and > > grows. > >>Before doing a new plot I do "self.figure.clear()", or >>"self.figure.clf()", is there some other call I should > > use? > >>See you >>Werner > > > +_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+ > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > ------------------------------------------------------- > 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 |
From: Werner F. B. <wer...@fr...> - 2005-04-18 10:28:48
|
In some of my plots I show month names as axes labels. When I run this on a machine in "French" (i.e. on Win XP changing the Settings - Regional and Language settings" to French the labels don't show correctly if there is an accented character in there e.g. "déc". I changed the line 256 in dates.py (matplotlib 0.8) from: return dt.strftime(fmt) to: return unicode(dt.strftime(fmt), 'iso-8859-1') Obviously this is not a correct fix as it will only work in some situations. I tried to use sys.getdefaultencoding(), instead of hard coding 'iso-8859-1', but on my machine it returns "ascii". Any suggestions on how to handle this correctly will be very appreciated. See you Werner |
From: Jochen V. <vo...@se...> - 2005-04-18 10:10:56
|
Hi Stephen, On Fri, Apr 15, 2005 at 10:01:30AM -0700, Stephen Walton wrote: > What I really meant was that the PostScript file produced by MPL starts= =20 > with '%!PS-Adobe-3.0', which I thought meant Postscript level 3. =20 > Changing the 3.0 to 2.0 by hand still doesn't allow it to print. dvips= =20 > output files print fine on this printer, and they start with=20 > '%!PS-Adobe-2.0'. Confusingly enough there are two kinds of version numbers involved, here. There is the PostScript language level, which can be 1, 2, or 3. Additionally there is something called DSC (Document structuring conventions), which gives additional information in PostScript comments (lines starting with a percent sign). This DSC thing allows PostScript viewers to go back to the previous page, allows to print single pages =66rom a PostScript file, etc. DSC also comes in several versions. The "%!PS-Adobe-3.0" indicated that the document confirms to DSC version 3. This does not imply anything for the PostScript language level. Since all DSC stuff is most probably ignored by the Printer, it should not cause any problems. > Thanks for the suggestion, but I'm afraid this didn't help. The=20 > workaround I found was to do a dvipdf on the LaTeX file which included=20 > the MPL doc, read it with Acrobat Reader, and tell acroread to print it= =20 > at Postscript level 1. GhostScript has also a converting-fancy-PostScript-into-simple-PostScript functionality which might come in handy here. All the best, Jochen --=20 http://seehuhn.de/ |
From: D B. <db...@ya...> - 2005-04-18 07:02:10
|
Werner, Recently I reported a batch plot memory issue when using mostly matlab-style commands and TkAgg backend. In my case I found that the memory increased when I called close(). If I stopped using this the memory use became more or less constant. Based on Fernando Perez's comments I also started using import gc and gc.collect() to reduce memory use more. This just calls the garbage collector more frequently to clean up memory. If your system is paging to disk because of memory use it can speed things up quite a bit. In my case it keeps the total python footprint significantly reduced. Good Luck, David >From: "Werner F. Bruhin" <wer...@fr...> >Date: Thu, 14 Apr 2005 11:42:34 +0200 >Subject: [Matplotlib-users] Memory usage >Hi All, > >Doing multiple plots I see that memory usage grows and grows. > >Before doing a new plot I do "self.figure.clear()", or >"self.figure.clf()", is there some other call I should use? > >See you >Werner +_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Werner F. B. <wer...@fr...> - 2005-04-17 15:20:30
|
The attached backend_wx (matplotlib 0.8) has a Printer_Setup2 method using the standard wx page setup stuff. There seems to have been problems with this in the past that is why I created a new method and left Printer_Setup alone. I also commented out "self.printerData.SetPaperId(wx.PAPER_LETTER)" in Printer_Init, not setting it will use the printer default paper size which I think is more correct, so if I have a nice A3 capable printer I don't have to reset my paper size all the time, or if I live e.g. in the South of France I can use my standard A4 paper. See you Werner |
From: Alan G I. <ai...@am...> - 2005-04-16 18:44:06
|
On Wed, 06 Apr 2005, John Hunter apparently wrote: > >>> rect.set_facecolor(0.8) # a grayscale intensity ... > There are many wanys to set colors in matplotlib, these are discussed > at http://matplotlib.sourceforge.net/matplotlib.pylab.html#-colors I do not see any discussion of grayscale at that location. Grayscale does work mostly as expected once one knows about it. Exception: integer values are not welcome. (E.g., pylab tries to treat 0 as part of an RGB specification.) Cheers, Alan Isaac |
From: Stephen W. <ste...@cs...> - 2005-04-15 23:42:27
|
John Hunter wrote: >See examples/shared_axis_demo.py, >examples/two_scales.py and examples/ganged_plots.py. > Speaking of which: I just put a ganged plot made with matplotlib into a grant proposal. It worked really well with one exception: the top value of the y axis on each graph was printed on top of the bottom value of the graph above. If you look carefully, you'll see that examples/ganged_plots.py does the same thing. Any good way to avoid this? |
From: Olive <enc...@ya...> - 2005-04-15 22:17:41
|
On Fri, 15 Apr 2005 00:34:15 -0500, John Hunter <jdh...@ac...> wrote : > Olive> Hello, I've juste downloaded the last version (0.8) of > Olive> matplotlib and successfully built it on SunOS 5.8 with GTK > Olive> backend (gcc 3.2.2). "import matplolib" is OK but typing > Olive> "from matplotlib.pylab import *" result in a core dumped ! > Olive> without any error message or exception... "import gtk", > Olive> "import pygtk", and "import wx" works OK. > > Olive> I've tried with version 0.72, same error : > > I don't have a lot of good advice for you, but here is how I would go > about debugging the problem. You can recompile mpl in verbose mode. > rm -rf "site-packages/matplotlib" and your "build" subdir and edit > setup.py and set VERBOSE=True and recompile/reinstall. Ah ! that was what I was looking for ! So I've managed to isolate the culprit : >>> from font_manager import FontProperties Glyph::init_type FT2Font::init_type ft2font_module::new_ft2font FT2Font::FT2Font FT2Font::clear Illegal Instruction (core dumped) It appears that the problem was in file ft2font.cpp at line 354 : const char* ps_name = FT_Get_Postscript_Name( face ); I don't know what is wrong here but I managed to get matplotlib working by replacing it by : const char* ps_name = NULL; I forgot to take the version number of the freetype library before leaving work, I will get it on monday. I haven't understand what is really in the argument 'face', can you give me a code which print the fields of 'face' ? (I don't know C++...) Thank you anyway for your help ! |
From: John H. <jdh...@ac...> - 2005-04-15 18:47:52
|
>>>>> "Werner" == Werner F Bruhin <wer...@fr...> writes: Werner> Note that all of the above still have problems if I do: Werner> self.figure = Figure(frameon=False) The first thing to be drawn to the figure is the figure frame , a matplotlib.patches.Rectangle instance. This is what "clears" the background. If you want to clear the background to a certain color, set the facecolor of the figure frame to that color and it will be done. If you don't like the thin edge around the frame, set the rectangle edgecolor to be the same as the facecolor. If you want the figure to be transparent to overlay some other image, set the rectangle alpha to be 0. It will still clear the pixel buffer, but will be transparent. In other words, you should be able to get any desired effect by leaving the frame on and setting its properties. See http://matplotlib.sf.net/matplotlib.patches.html for more information on Patch/Rectangle properties. JDH |
From: Wendell C. <wcr...@uf...> - 2005-04-15 18:45:53
|
> >Take a look at the release notes at >http://matplotlib.sf.net/whats_new.html for release 0.72. We improved >the way we do multiscale axes and shared axis axes, and the interface >changed somewhat. See examples/shared_axis_demo.py, >examples/two_scales.py and examples/ganged_plots.py. The examples are >available in a zip file on the website. Thanks for the information. I haven't been keeping up with matplotlib improvements very well. Looking back at the release notes, its amazing how fast the progress has been. The ylim() and twinx() functions greatly improved the readibility, and restored the functionality. > > Wendell> Is there another way of doing this that gets back to the > Wendell> original output? >Yes > > > Wendell> Also, is it just my imagination, or does 0.8 take longer > Wendell> to display graphs than previous versions. I haven't done > Wendell> any formal timing, but the delay seems longer. > >I hope it's your imagination :-) Apparently just my imagination, rebooting the computer speeded things up noticibly. Wendell Cropper > >JDH > > University of Florida School of Forest Resources and Conservation 214 Newins-Ziegler PO Box 110410 Gainesville, FL 32611-0410 352-846-0859 phone 352-392-1707 fax wcr...@uf... |
From: Werner F. B. <wer...@fr...> - 2005-04-15 17:24:24
|
Hi Matt, Matt Newville wrote: > Hi Werner, > > I think what you may want is something like this: > > def OnButton1Button(self, event): > print 'done it' > ### self.figure.clear() > ### self.axes = self.figure.add_subplot(111) > self.axes.cla() # <-- clear the axes > t = arange(0.0,4.0,0.01) > s = sin(2*pi*t) > > self.axes.plot(t,s) > self.axes.set_xlabel('Time 2 (s)') > self.axes.set_ylabel('Price 2 ($)') > self.canvas.draw() # <-- force a redraw > > Is that OK? It works for me on Windows and Linux. I do the > same thing for 'make a fresh plot' in my own codes that I know > work OK on Mac OS X as well. Yes, that works too. So, I can do: self.figure.clear() ... self.canvas.Refresh() or: self.axes.cla() ... self.canvas.draw() or: self.figure.clear() ... self.canvas.draw() Note that all of the above still have problems if I do: self.figure = Figure(frameon=False) i.e. the "frameon=False" bit causes the figure/axes not to get totally cleared. > > Cheers, > > --Matt > > See you Werner |
From: John H. <jdh...@ac...> - 2005-04-15 17:14:55
|
>>>>> "Wendell" == Wendell Cropper <wcr...@uf...> writes: Wendell> '''Hi, I use the following program in a simulation class Wendell> to demonstrate the niftyness of matplotlib. The Wendell> combination of Python, Numeric, and matplotlib really Wendell> makes a great set of tools for biologists who are largely Wendell> non-programmers these days. Thanks. Great -- do you have class notes? I will be using the same combination in a class I am teaching to biologists this fall and am working on a manuscript with Fernando Perez, basically an introduction to scientific computing in python. Wendell> I just did a big upgrade from 0.6-before pylab to Wendell> 0.80. This is the only tested program that didn't produce Wendell> the same results before and after: Wendell> Attached are matlab and pylab png files. Take a look at the release notes at http://matplotlib.sf.net/whats_new.html for release 0.72. We improved the way we do multiscale axes and shared axis axes, and the interface changed somewhat. See examples/shared_axis_demo.py, examples/two_scales.py and examples/ganged_plots.py. The examples are available in a zip file on the website. Wendell> Is there another way of doing this that gets back to the Wendell> original output? Yes ax1 = subplot(111) t = arange(0.01, 10.0, 0.01) s1 = exp(t) plot(t, s1, 'b-') xlabel('time (s)') ylabel('exp') ax2 = twinx() ### <- this is the new way s2 = sin(2*pi*t) plot(t, s2, 'r.') ylabel('sin') Wendell> Also, is it just my imagination, or does 0.8 take longer Wendell> to display graphs than previous versions. I haven't done Wendell> any formal timing, but the delay seems longer. I hope it's your imagination :-) JDH |
From: Eric E. <ems...@ob...> - 2005-04-15 17:04:21
|
Hi, I would like to produce histograms in N dimensions, the minimum being in 2D. Here is an example of what I wish to do: I have a set of P particles with x and y positions. I have a rectangular grid, defined by e.g. a sampling in x and a sampling in y, (e.g. samp_x=arange(-15,31,1) ..), and I wish to know how many particles are in each "pixel". I can do that in many different ways (using searchsorted from numarray, or abruptly using loops, etc) but I am now looking for a simple (fewer lines) and efficient way (as I am treating large sets of particles) to do this so that I would be able to use a function like: histogram_2D(x,y, samp_x, samp_y) would return a matrix with the number of particles in each corresponding pixel. and showhistogram_2D(x,y, samp_x, samp_y) would display it [using e.g. imshow or matshow] Any hint there (I realize this is more a numarray question but I thought of first asking your community first since someone may have done it already)? And maybe also of how to generalize this in N dimensions? (for 1D matplotlib has the hist function..) Thanks! Eric -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== |