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: LUK S. <shu...@po...> - 2004-01-30 14:54:15
|
John Hunter wrote: >>>>>>"LUK" == LUK ShunTim <shu...@po...> writes: > > > LUK> I have tex installed so I hope I can use quite a lot more > LUK> fonts now. Is the path to the .afm files all that is needed? > LUK> Do I have to set anything else, for example where to find the > LUK> pfa/pfb files? I found that matplotlib spits out warnings > LUK> like > > All matplotlib needs is the *.afm files. It uses this to compute text > lengths, etc, for layout. You'll just need to provide the right font > names to the text commands, perhaps using a font dictionary as in > examples/text_themes.py. Your postscript output device will still > need to know about the fonts of course. Note that I use a custom font > matching scheme in backend_ps and I certainly don't claim that it is > ideal. So if you encounter strange behavior, let me know. > > LUK> ** (log_demo.py:1264): WARNING **: Couldn't load font "Times > LUK> 9.599609375" falling back to "Sans 9.599609375" > > This doesn't look like a backend_ps error. Have you upgraded to > matplotlib-0.42.2? I've reworked text handling in the backends so > it's hard for me to compare what I've got now without knowing what > version of matplotlib you're using. > > JDH > CVS. ST |
From: John H. <jdh...@ac...> - 2004-01-30 14:08:07
|
>>>>> "LUK" == LUK ShunTim <shu...@po...> writes: LUK> I have tex installed so I hope I can use quite a lot more LUK> fonts now. Is the path to the .afm files all that is needed? LUK> Do I have to set anything else, for example where to find the LUK> pfa/pfb files? I found that matplotlib spits out warnings LUK> like All matplotlib needs is the *.afm files. It uses this to compute text lengths, etc, for layout. You'll just need to provide the right font names to the text commands, perhaps using a font dictionary as in examples/text_themes.py. Your postscript output device will still need to know about the fonts of course. Note that I use a custom font matching scheme in backend_ps and I certainly don't claim that it is ideal. So if you encounter strange behavior, let me know. LUK> ** (log_demo.py:1264): WARNING **: Couldn't load font "Times LUK> 9.599609375" falling back to "Sans 9.599609375" This doesn't look like a backend_ps error. Have you upgraded to matplotlib-0.42.2? I've reworked text handling in the backends so it's hard for me to compare what I've got now without knowing what version of matplotlib you're using. JDH |
From: LUK S. <shu...@po...> - 2004-01-30 13:57:57
|
John Hunter wrote: >>>>>>"LUK" == LUK ShunTim <shu...@po...> writes: > > > LUK> A slight glitch though. I think John has changed the AFMPATH > LUK> environmental variable to MATPLOTLIBDATA (which is a more > LUK> appropriate name) so people installing matplotlib in > LUK> non-default places will have to set it instead. > > ps backend is setup to use both, the idea that you may have some AFM > files independent of matplotlib, and some that ship with matplotlib. > The MATPLOTLIBDATA is indeed for people installing in nonstandard > places. But if AFMPATH is not working for you, I need to know since > this is a bug. > > Thanks! > John Hunter > I think that's an oversight of mine. I had AFMPATH set to point to the directory which holds the afm, xpm files etc before I upgrade. After upgrading I got the error described above and I found out that I have to set MATPLOTLIBDATA. I did not realize that AFMPATH is *still* used. I have tex installed so I hope I can use quite a lot more fonts now. Is the path to the .afm files all that is needed? Do I have to set anything else, for example where to find the pfa/pfb files? I found that matplotlib spits out warnings like ** (log_demo.py:1264): WARNING **: Couldn't load font "Times 9.599609375" falling back to "Sans 9.599609375" Regards, ST |
From: Kuzminski, S. R <SKu...@fa...> - 2004-01-29 12:20:11
|
Some notes on compiling GD backend for windows. 1) _gdmodule.c needs to be modified in 2 places to compile on windows=20 a) line 1888 PyObject_HEAD_INIT() needs to passed a NULL. This is in the Python docs. =09 .... static PyTypeObject Imagetype =3D { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ .... b) the init_gd function ( line 1957 ) needs to have '_declspec(dllexport)' added to the declaration.=20 ..... /* Initialization function for the module (*must* be called init_gd) */ void _declspec(dllexport) init_gd(void) {=20 .... 2) This one took me a long time to figure out. For some reason opening a windows file in Python with 'wb' permission will cause the png files to be corrupted above a certain image size. If you pass the filename to gdmodule, then the gdmodule opens the file and it works. I imagine that the python call "open( 'filename', 'wb' )" just calls fopen, furthermore I thought that binary mode only applied to reading files. At any rate, I have no idea why this doesn't work in this case but it doesn't. To get it to work, I had to change line 261 in backends_gd.py to pass the filename rather than a file object, this is the only modification to Matplotlib I had to make. im.writePng( filename ) #2 above is the answer to the problem in my original post. However I have another question. When I set the ylabel rotation to be horizontal, the beginning of the text is truncated ( the width of the border does not compensate ). I'm happy to set it wider but am wondering how ( what controls the width of the area where the labels gets written ). I also noticed that title of the graph ( with the horizontal alignment set to bottom ) is too close to the top of the graph itself, is there a way to pad that? thanks, Stefan -----Original Message----- From: John Hunter [mailto:jdh...@ni...]=20 Sent: Friday, January 23, 2004 6:58 AM To: Kuzminski, Stefan R Cc: mat...@li... Subject: Re: [Matplotlib-users] broken PNG files with GD backend >>>>> "Kuzminski," =3D=3D Kuzminski, Stefan R <SKu...@fa...> writes: Kuzminski> Now on to my specific problem. I'm using the GD Kuzminski> backend on Windows with Matplotlib 0.41. =20 First things first -- I haven't succeeded in getting the gd backend compiled on windows. If you have some expertise here and are willing to share, or better yet build a gdmodule and gd installer that I can put on the website, I would be very much obliged! I contacted the gdmodule maintainer some time ago over this issue and he had never built it on windows either. In my googling, I discovered the perl gd module for windows and following their lead, succeeded in building gd lib, but ran into some troubles (can't remember what) building gdmodule. Kuzminski> If I set the dpi to over 60 the png file that gets Kuzminski> generated is 'empty', it's only 17 bytes long. As soon Kuzminski> as I drop he DPI to below 65 or so, I get the image Kuzminski> file correctly. This is with the simple_plot.py Kuzminski> example. Now on to your problem. Is there a typo here? You say over 60 is empty and under 65 is ok ?? Can you send me a script which replicates the problem, with the two calls to savefig, one which has the problem and which does not. Then I can begin to diagnose the problem; see if it occurs under linux, see if it's a gd problem, see if it's a problem on my end, etc.... Are you using matplotlib + GD for a web app server? =20 John Hunter=20 =20 |
From: Kuzminski, S. R <SKu...@fa...> - 2004-01-29 07:08:53
|
The windows GD build is bear. I had it completely working, then I upgraded to 0.41 and took a few steps back. =20 First a little background. I'm building a reporting tool for a commercial analytics platform. This tool takes an XML specification and data, and outputs HTML tables and plots. The larger platform is all Java, I am providing the reporting as an stand alone ( Python ) executable on Win32, Linux and Solaris. So my overall requirements are to create HTML ( and hence .png images ) on all three platforms with a distribution of a single binary file ( one for each platform ). Here are some quick notes on what I have had to do, once it is working, I will provide at least the MSVC makefiles an maybe a binary build, time permitting. =20 the GD backend has these dependencies.. libpng zlib gd freetype gdmodule The 2 main problems I seem to have are that the dll release of GD does not include a gd.lib. ( MSVC needs a .lib to link with a .dll ) GD does not seem to come with a windows make file, so I made one. =20 The other problem is that _gdmodule.c needs to have line 1882 changed to pass a NULL to PYObject_HEAD_INIT=20 ... static PyTypeObject Imagetype =3D { PyObject_HEAD_INIT(NULL) ... I am working on this currently and will post more results as I get them. thanks, Stefan -----Original Message----- From: John Hunter [mailto:jdh...@ni...]=20 Sent: Friday, January 23, 2004 6:58 AM To: Kuzminski, Stefan R Cc: mat...@li... Subject: Re: [Matplotlib-users] broken PNG files with GD backend >>>>> "Kuzminski," =3D=3D Kuzminski, Stefan R <SKu...@fa...> writes: Kuzminski> Now on to my specific problem. I'm using the GD Kuzminski> backend on Windows with Matplotlib 0.41. =20 First things first -- I haven't succeeded in getting the gd backend compiled on windows. If you have some expertise here and are willing to share, or better yet build a gdmodule and gd installer that I can put on the website, I would be very much obliged! I contacted the gdmodule maintainer some time ago over this issue and he had never built it on windows either. In my googling, I discovered the perl gd module for windows and following their lead, succeeded in building gd lib, but ran into some troubles (can't remember what) building gdmodule. Kuzminski> If I set the dpi to over 60 the png file that gets Kuzminski> generated is 'empty', it's only 17 bytes long. As soon Kuzminski> as I drop he DPI to below 65 or so, I get the image Kuzminski> file correctly. This is with the simple_plot.py Kuzminski> example. Now on to your problem. Is there a typo here? You say over 60 is empty and under 65 is ok ?? Can you send me a script which replicates the problem, with the two calls to savefig, one which has the problem and which does not. Then I can begin to diagnose the problem; see if it occurs under linux, see if it's a gd problem, see if it's a problem on my end, etc.... Are you using matplotlib + GD for a web app server? =20 John Hunter=20 =20 |
From: John H. <jdh...@ac...> - 2004-01-27 18:35:44
|
http://matplotlib.sourceforge.net What's new in matplotlib 0.42 EPS output from PS backend Just add an eps extension PS and EPS save from GTK and WX backends with bugs fixed A few of the bugs that were lingering in the PS output from the GTK backend have been cleared up. A fairly substantial refactoring of the Text class enabled this. Text is now backend independent and behaves like the other artists in the figure (lines, patches, etc). Additionally, PS and EPS save from WX backend work Object picker example The file examples/object_picker.py is a template showing how to select objects in the figure with the mouse(eg, text, lines). If you click on the line, a properties dialog will pop up. You can edit the line properties. This is just a template for those who want to develop a GUI properties dialog. If interested, contact the mailing list. It would be straight forward to extend this example to allow you to move objects in the figure, etc |
From: John H. <jdh...@ac...> - 2004-01-26 21:38:53
|
>>>>> "matthew" == matthew arnison <ma...@ca...> writes: matthew> * when saving from the GTK window into a .ps file, the matthew> lines are not clipped by the edge of the plot area: see matthew> the top left plot in the attached code I've made a number of changes to matplotlib to improve the PS functionality -- those of you who are interested should take this version for a test drive and let me know of any problems so I can fix them for the next release. http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.42g.tar.gz Note WX is not working (but will be soon) with this snapshot so wx users please do not download. Added: * I think I've fixed all the backend switching problems, you can now output PS from the GTK backend by adding the PS extension. This will be available in WX soon. Let me know if you find any lingering bugs. * EPS (at long last!). Just use an 'eps' extension and the bounding box will be added to the PS output. matthew> * xaxis and yaxis labels often land on top of adjacent matthew> subplot titles and plot areas in savefig('blah.ps') matthew> output (I've had trouble with this in the -dPS output matthew> too) Yep, axes don't communicate with one another for text layout. A few things which you can do to help 1) Turn off redundant x labels. If 2 subplots use the same x axis, turn off the tick labels in all but the lower one with set(gca(), 'xticklabels', []) 2) Make the tick labels and titles smaller t = get(gca(), 'xticklabels') set(t, 'fontsize', 8) t = title('my title') set(t, 'fontsize', 10) 3) control the placement of the title manually t = title('my title') t.set_y(0.95) 1.0 is the top of the y axis. 1.02 is the default. Numbers less than 1 will be below the y axis. Eg, to make the title top aligned and below the top of the y axis, do t = title('my title', verticalalignment='top') t.set_y(0.99) I'm open to suggestions for changing the defaults (eg making the default fonts smaller) if people are having these kinds of problems regularly. JDH |
From: John H. <jdh...@ac...> - 2004-01-26 21:24:18
|
>>>>> "John" == John Hunter <jdh...@ac...> writes: Kuzminski> #2 above is the answer to the problem in my original Kuzminski> post. However I have another question. When I set the Kuzminski> ylabel rotation to be horizontal, the beginning of the Kuzminski> text is truncated ( the width of the border does not Kuzminski> compensate ). I'm happy to set it wider but am Kuzminski> wondering how ( what controls the width of the area Kuzminski> where the labels gets written ). In this case the placement of the ylabel is determined by the horizontalalignment and the left side of the y tick labels. If it is being truncated, you have a few choices. 1) Use a different alignment or smaller fontsize for the label 2) Use a smaller font size for the y tick labels or turn them off entirely -- the position of the ylabel will automatically adjust based upon the size of the tick labels. 3) Probably best, make a custom axes where the 'left' parameter is larger and the width parameter is smaller. This will give you more room for your ylabel. Kuzminski> I also noticed that title of the graph ( with the Kuzminski> horizontal alignment set to bottom ) is too close to Kuzminski> the top of the graph itself, is there a way to pad Kuzminski> that? When you set the title, do t = title('my title') t.set_y(1.05) # relative axes coords 1.0 is the top of the axes, so the larger the number the higher the title will be. 1.02 is the default. Hope this helps, JDH |
From: John H. <jdh...@ac...> - 2004-01-26 06:30:00
|
>>>>> "Kuzminski," == Kuzminski, Stefan R <SKu...@fa...> writes: Kuzminski> I attached a '_gd.dll'. This is the C python Kuzminski> extension that the gd.py module from gdmodule imports. Kuzminski> It goes directly in site-packages. I built it Kuzminski> statically linked to zlib, libpng, freetype and the gd Kuzminski> lib. I don't have the time at the moment to fuss with Kuzminski> getting it to use the dlls. ( or to add the jpeg Kuzminski> support ) The precompiled windows GD dll in particular Kuzminski> seems to not export a few functions that gdmodule Kuzminski> wants which is a real pain. Excellent, the easier the better... Kuzminski> 2) This one took me a long time to figure out. For Kuzminski> some reason opening a windows file in Python with 'wb' Kuzminski> permission will cause the png files to be corrupted Kuzminski> above a certain image size. If you pass the filename Kuzminski> to gdmodule, then the gdmodule opens the file and it Kuzminski> works. I imagine that the python call "open( Kuzminski> 'filename', 'wb' )" just calls fopen, furthermore I Kuzminski> thought that binary mode only applied to reading Kuzminski> files. At any rate, I have no idea why this doesn't Kuzminski> work in this case but it doesn't. To get it to work, Kuzminski> I had to change line 261 in backends_gd.py to pass the Kuzminski> filename rather than a file object, this is the only Kuzminski> modification to Matplotlib I had to make. Could be that I don't have the text bounding boxes exactly right in gdmodule. In axes.py there is a line on or around line 454 if 0: if you replace that with if 1: the text bounding boxes will be displayed. If they are not exactly right, then the text layout will also be off. I'll take a look when I get some time, but in the mean time you may want to see for yourself. Re: gdmodule on windows. What did you do for fonttools? Did you also build this yourself? If I recall correctly I built it once on windows without too much difficulty (back when I was trying to get gd working on windows) but it's been a while and I didn't keep notes. I didn't see an installer on the sf site. JDH Kuzminski> im.writePng( filename ) Kuzminski> #2 above is the answer to the problem in my original Kuzminski> post. However I have another question. When I set the Kuzminski> ylabel rotation to be horizontal, the beginning of the Kuzminski> text is truncated ( the width of the border does not Kuzminski> compensate ). I'm happy to set it wider but am Kuzminski> wondering how ( what controls the width of the area Kuzminski> where the labels gets written ). I also noticed that Kuzminski> title of the graph ( with the horizontal alignment set Kuzminski> to bottom ) is too close to the top of the graph Kuzminski> itself, is there a way to pad that? Kuzminski> thanks, Stefan Kuzminski> -----Original Message----- From: John Hunter Kuzminski> [mailto:jdh...@ni...] Sent: Kuzminski> Friday, January 23, 2004 6:58 AM To: Kuzminski, Stefan Kuzminski> R Cc: mat...@li... Subject: Kuzminski> Re: [Matplotlib-users] broken PNG files with GD Kuzminski> backend >>>>> "Kuzminski," == Kuzminski, Stefan R <SKu...@fa...> Kuzminski> writes: Kuzminski> Now on to my specific problem. I'm using the GD Kuzminski> backend on Windows with Matplotlib 0.41. Kuzminski> First things first -- I haven't succeeded in getting Kuzminski> the gd backend compiled on windows. If you have some Kuzminski> expertise here and are willing to share, or better yet Kuzminski> build a gdmodule and gd installer that I can put on Kuzminski> the website, I would be very much obliged! I Kuzminski> contacted the gdmodule maintainer some time ago over Kuzminski> this issue and he had never built it on windows Kuzminski> either. In my googling, I discovered the perl gd Kuzminski> module for windows and following their lead, succeeded Kuzminski> in building gd lib, but ran into some troubles (can't Kuzminski> remember what) building gdmodule. Kuzminski> If I set the dpi to over 60 the png file that gets Kuzminski> generated is 'empty', it's only 17 bytes long. As soon Kuzminski> as I drop he DPI to below 65 or so, I get the image Kuzminski> file correctly. This is with the simple_plot.py Kuzminski> example. Kuzminski> Now on to your problem. Is there a typo here? You say Kuzminski> over 60 is empty and under 65 is ok ?? Can you send Kuzminski> me a script which replicates the problem, with the two Kuzminski> calls to savefig, one which has the problem and which Kuzminski> does not. Then I can begin to diagnose the problem; Kuzminski> see if it occurs under linux, see if it's a gd Kuzminski> problem, see if it's a problem on my end, etc.... Kuzminski> Are you using matplotlib + GD for a web app server? Kuzminski> John Hunter |
From: John H. <jdh...@ac...> - 2004-01-23 15:36:35
|
>>>>> "Kuzminski," == Kuzminski, Stefan R <SKu...@fa...> writes: Kuzminski> Now on to my specific problem. I'm using the GD Kuzminski> backend on Windows with Matplotlib 0.41. First things first -- I haven't succeeded in getting the gd backend compiled on windows. If you have some expertise here and are willing to share, or better yet build a gdmodule and gd installer that I can put on the website, I would be very much obliged! I contacted the gdmodule maintainer some time ago over this issue and he had never built it on windows either. In my googling, I discovered the perl gd module for windows and following their lead, succeeded in building gd lib, but ran into some troubles (can't remember what) building gdmodule. Kuzminski> If I set the dpi to over 60 the png file that gets Kuzminski> generated is 'empty', it's only 17 bytes long. As soon Kuzminski> as I drop he DPI to below 65 or so, I get the image Kuzminski> file correctly. This is with the simple_plot.py Kuzminski> example. Now on to your problem. Is there a typo here? You say over 60 is empty and under 65 is ok ?? Can you send me a script which replicates the problem, with the two calls to savefig, one which has the problem and which does not. Then I can begin to diagnose the problem; see if it occurs under linux, see if it's a gd problem, see if it's a problem on my end, etc.... Are you using matplotlib + GD for a web app server? John Hunter |
From: Kuzminski, S. R <SKu...@fa...> - 2004-01-23 13:13:18
|
Hi, =20 First off, a very nice piece of software, thanks for creating it. =20 =20 Now on to my specific problem. I'm using the GD backend on Windows with Matplotlib 0.41. If I set the dpi to over 60 the png file that gets generated is 'empty', it's only 17 bytes long. As soon as I drop he DPI to below 65 or so, I get the image file correctly. This is with the simple_plot.py example.=20 =20 Any help would be appreciated. =20 thanks, Stefan =20 =20 |
From: Nordquest, D. A <NOR...@ga...> - 2004-01-23 01:14:21
|
Thanks, John & Randy. Matplotlib is working fine, now! Dave Nordquest |
From: John H. <jdh...@ac...> - 2004-01-22 21:54:30
|
>>>>> "Engelsma," == Engelsma, Dave <D.E...@La...> writes: Engelsma,> Why are the x-axis limits adjusted when I try to plot a Engelsma,> vertical line as a Control Limit? Everytime you add some data to the plot, matplotlib recomputes the axis limits. The quick fix for you is to set your xlim after all the plot commands # the histogram of the data n, bins, patches = matplotlib.matlab.hist(histogram_data, 10, normed=0) # add a 'best fit' line y = matplotlib.matlab.normpdf(bins, average[i], std_dev[i]) l = matplotlib.matlab.plot(bins, y, 'r--') matplotlib.matlab.set(l, 'linewidth', 2) matplotlib.matlab.xlabel(DataDescription[i]) matplotlib.matlab.ylabel('Number of Parts') matplotlib.matlab.plot([201,201],[0,40],'k--') matplotlib.matlab.title(PartNum + " -- " + PartDesc) matplotlib.matlab.set(matplotlib.matlab.gca(), 'xlim', [199, 205]) matplotlib.matlab.show() But it's not clear to me why the autoset would leave some of your data offscreen - that shouldn't happen. I'll take a look at that code. Is it possible for you to provide a complete example that replicates the problem? On an unrelated note, give that you like to use the fully qualified names of all the functions, you might prefer the object oriented interface n, bins, patches = matplotlib.matlab.hist(histogram_data, 10, normed=0) ax = matplotlib.matlab.subplot(111) y = matplotlib.mlab.normpdf(bins, average[i], std_dev[i]) ^ normpdf is defined in mlab.py, not matlab.py lines = ax.plot(bins, y, 'r--') for line in lines: line.set_linewidth(2) ax.set_xlabel(DataDescription[i]) ax.set_ylabel('Number of Parts') ax.plot([201,201],[0,40],'k--') ax.set_title(PartNum + " -- " + PartDesc) ax.set_xlim([199, 205]) matplotlib.matlab.show() Hope this helps, John Hunter |
From: Engelsma, D. <D.E...@La...> - 2004-01-22 21:18:21
|
Hi - I'm using the following code to generate a histogram. I also want to plot the Upper Control Limit as a vertical line to the right of the histogram bars and a Lower Control Limit to the left of the bars. Each Control Limit would be represented by a vertical line. The code below does not include the line necessary to plot a sample control limit. # the histogram of the data n, bins, patches = matplotlib.matlab.hist(histogram_data, 10, normed=0) # add a 'best fit' line y = matplotlib.matlab.normpdf(bins, average[i], std_dev[i]) l = matplotlib.matlab.plot(bins, y, 'r--') matplotlib.matlab.set(l, 'linewidth', 2) matplotlib.matlab.set(matplotlib.matlab.gca(), 'xlim', [199, 205]) matplotlib.matlab.xlabel(DataDescription[i]) matplotlib.matlab.ylabel('Number of Parts') matplotlib.matlab.title(PartNum + " -- " + PartDesc) matplotlib.matlab.show() When I modify the code with the additional line to plot a Lower Control Limit: # the histogram of the data n, bins, patches = matplotlib.matlab.hist(histogram_data, 10, normed=0) # add a 'best fit' line y = matplotlib.matlab.normpdf(bins, average[i], std_dev[i]) l = matplotlib.matlab.plot(bins, y, 'r--') matplotlib.matlab.set(l, 'linewidth', 2) matplotlib.matlab.set(matplotlib.matlab.gca(), 'xlim', [199, 205]) matplotlib.matlab.xlabel(DataDescription[i]) matplotlib.matlab.ylabel('Number of Parts') matplotlib.matlab.plot([201,201],[0,40],'k--') <--- added this line to plot a control limit matplotlib.matlab.title(PartNum + " -- " + PartDesc) matplotlib.matlab.show() The x-axis limits are somehow automatically forced to something less than that specified in the line: matplotlib.matlab.set(matplotlib.matlab.gca(), 'xlim', [199, 205]). The histogram appears as would be expected, but now I cannot see my Control Limit (specified in the added line of code) as it seems to be plotted off of the chart. If I comment out the additional line (that plotted a vertical line as a control limit), the x-axis limits return to normal, as expected (199 -> 205). Why are the x-axis limits adjusted when I try to plot a vertical line as a Control Limit? Thanks in advance, Dave Engelsma |
From: John H. <jdh...@ac...> - 2004-01-22 17:39:04
|
>>>>> "Jean-Baptiste" == Jean-Baptiste Cazier <jea...@de...> writes: Jean-Baptiste> Hi ! The more I look at matplotlib, the more nice Jean-Baptiste> feature I find. However there are more that I Jean-Baptiste> haven't found yet, eventhough they might be Jean-Baptiste> implemented. I would like to have a little more Jean-Baptiste> interactivity with the plot itself. By this I do Jean-Baptiste> not mean the interactivity with the python shell, Jean-Baptiste> but with the mouse: - Double click on the Jean-Baptiste> legend/axes/label allow it modification - Single Jean-Baptiste> Click on a drawn line give the properties of the Jean-Baptiste> function and/or location - In short, being able to Jean-Baptiste> treat elements of the figure as widgets - I reckon Jean-Baptiste> the whole figure is a DrawingArea and that might Jean-Baptiste> not be straight forward Jean-Baptiste> Of course just having a signal sent with the Jean-Baptiste> propoerties of the curves would be good enough Jean-Baptiste> Are more people interested in that ? It's not something I need in my own work, but I think it would be a good addition to matplotlib and I'd be happy to include it. To that end, I wrote some demo code to get you started! I implemented an object picker (currently only for tick labels and lines but this can easily be extended to include the other elements of the figure). I also wrote the start of a line properties dialog. It should be straight forward to extend to incorporate the other line properties, (markeredgecolor, etc...) and then to do the same for a text properties dialog, etc.... I needed to add a few things to matplotlib to make this easier, so you'll need to grab the snapshot at http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.42a.tar.gz and see the file examples/object_picker.py. Good luck! John Hunter |
From: John H. <jdh...@ac...> - 2004-01-22 12:46:13
|
>>>>> "John" == John Hunter <jdh...@ac...> writes: John> Your paths to the GTK runtime library are not set properly. John> Check out Alternatively, you should be able to use the WX backend with the enthought edition of python with no extra installation. Just import matplotlib matplotlib.use('WX') from matplotlib.matlab import plot, show plot([1,2,3]) show() Good luck, John Hunter |
From: John H. <jdh...@ac...> - 2004-01-22 08:36:31
|
>>>>> "David" == David Nordquest <Nor...@ga...> writes: David> I've just installed Matplotlib with the 2.3 version of David> Python packaged by Enthought & believe I followed the David> instructions on the Matplotlib web page. I am getting the David> following error message: Hi David, Your paths to the GTK runtime library are not set properly. Check out http://matplotlib.sourceforge.net/installing.html and the following pygtk FAQ entry addresses the PATH issue at length http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq21.012.htp Should cure what ails you, John Hunter |
From: Jean-Baptiste C. <jea...@de...> - 2004-01-22 08:05:08
|
Hi ! The more I look at matplotlib, the more nice feature I find. However there are more that I haven't found yet, eventhough they might be implemented. I would like to have a little more interactivity with the plot itself. By this I do not mean the interactivity with the python shell, but with the mouse: - Double click on the legend/axes/label allow it modification - Single Click on a drawn line give the properties of the function=20 and/or location - In short, being able to treat elements of the figure as widgets - I reckon the whole figure is a DrawingArea and that might not be straight forward Of course just having a signal sent with the propoerties of the curves would be good enough Are more people interested in that ? Takk Kve=C3=B0ja Jean-Baptiste |
From: Randy H. <he...@iu...> - 2004-01-22 03:06:19
|
Dave, Are you sure you installed pygtk as mentioned at http://matplotlib.sourceforge.net/backends.html ? You might print out your sys.path to verify. --Randy > -----Original Message----- > From: mat...@li... [mailto:matplotlib- > use...@li...] On Behalf Of David Nordquest > Sent: Wednesday, January 21, 2004 9:48 PM > To: mat...@li... > Subject: [Matplotlib-users] Gobject missing > > I've just installed Matplotlib with the 2.3 version of Python packaged > by Enthought & believe I followed the instructions on the Matplotlib web > page. I am getting the following error message: > > IDLE 1.0 > >>> from matplotlib.matlab import * > > Traceback (most recent call last): > File "<pyshell#0>", line 1, in -toplevel- > from matplotlib.matlab import * > File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\matlab.py", > line 121, in -toplevel- > from axes import Subplot, Axes > File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\axes.py", > line 119, in -toplevel- > import backends > File > "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\backends\__init__.py" , > line 9, in -toplevel- > from backend_gtk import AxisText, Figure, FigureManager, \ > File > "D:\PROGRA~1\PYTHON23\Lib\site- > packages\matplotlib\backends\backend_gtk.py", > line 13, in -toplevel- > import gobject > ImportError: DLL load failed: One of the library files needed to run > this application cannot be found. > >>> > > I'd be grateful for any suggestions. > > Dave > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: David N. <Nor...@ga...> - 2004-01-22 02:47:58
|
I've just installed Matplotlib with the 2.3 version of Python packaged by Enthought & believe I followed the instructions on the Matplotlib web page. I am getting the following error message: IDLE 1.0 >>> from matplotlib.matlab import * Traceback (most recent call last): File "<pyshell#0>", line 1, in -toplevel- from matplotlib.matlab import * File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\matlab.py", line 121, in -toplevel- from axes import Subplot, Axes File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\axes.py", line 119, in -toplevel- import backends File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\backends\__init__.py", line 9, in -toplevel- from backend_gtk import AxisText, Figure, FigureManager, \ File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\backends\backend_gtk.py", line 13, in -toplevel- import gobject ImportError: DLL load failed: One of the library files needed to run this application cannot be found. >>> I'd be grateful for any suggestions. Dave |
From: John H. <jdh...@ac...> - 2004-01-20 18:27:06
|
What's new in matplotlib 0.41 http://sourceforge.net/projects/matplotlib Pcolor optimizations Several optimizations have improved the performance of pcolor across all backends, 4x performance boost on the GTK backend. Still, slow, but getting tolerable. PS save from GTK backend An alpha version of the PS export functionality from the GTK backend. Mostly works with a few known problems. You can simply call savefig('somefile.ps') or use the PS extension when saving from the GUI. [Matthew - still haven't gotten to the problems you reported but it's still on the list of things to do!] Bug fixes Fixed bugs in semilogy and in setting dashes under some versions of Numeric bar takes (optional) multiple color args You can now pass bar a len(x) list of color args to have bars with different colors. Enjoy! John Hunter |
From: John H. <jdh...@ac...> - 2004-01-20 17:48:03
|
>>>>> "Jean-Baptiste" == Jean-Baptiste Cazier <jea...@de...> writes: It's a bug that somehow escaped our poor-man's regression testing suite. line 2007 in /usr/lib/python2.2/site-packages/matplotlib/axes.py should read l = self.plot(*args, **kwargs) ^ not l = selfplot(*args, **kwargs) Thanks for the report! JDH |
From: Jean-Baptiste C. <jea...@de...> - 2004-01-20 16:55:28
|
Saell I have got problem using semilogy while semilogx works fine I with matplotlib with python2 on RedHat 9.0 default setup Any idea of what is going wrong ? Below is the code I use in the interactive2 mode: Takk Kve=C3=B0ja Jean-Baptiste Welcome to matplotlib. help(matplotlib) -- shows a list of all matlab compatible commands provided help(plotting) -- shows a list of plot specific commands >>> import matplotlib >>> from matplotlib.matlab import * pygtk.require() must be called before importing gtk matplotlib requires pygtk-1.99.16 or greater -- trying anyway. Please hold on >>> from matplotlib.backends.backend_gtk import ShowOn >>> ShowOn().set(1) # turning on interactive mode >>> dt=3D0.01 >>> t=3Darange(dt,10.0,dt) >>> semilogy(t,t) Traceback (most recent call last): File "<<console>>", line 1, in ? File "/usr/lib/python2.2/site-packages/matplotlib/matlab.py", line 829, in semilogy try: ret =3D gca().semilogy(*args, **kwargs) File "/usr/lib/python2.2/site-packages/matplotlib/axes.py", line 2007, in semilogy l =3D selfplot(*args, **kwargs) NameError: global name 'selfplot' is not defined >>> semilogx(t,t) [<matplotlib.lines.Line2D instance at 0x8516034>] >>>=20 |
From: John H. <jdh...@ac...> - 2004-01-18 18:55:26
|
>>>>> "Steve" == Steve Chaplin <ste...@ya...> writes: Steve> When using the matlab interface (with the default GTK+ Steve> backend), matlab.title() sets the current axis title, but Steve> can you set the window title - it defaults to "Figure 1"? Steve> -- Steve In the matlab interface there is a function called _get_current_fig_manager, which I didn't intend for public consumption but perhaps I should remove the leading underscore and make it 'public' The FigureManager class in backend_bases.py is used by backend implementations. For the GTK backend, it contains a window attribute with is a gtk.Window. You can change the title by doing figManager = _get_current_fig_manager() figManager.window.set_title('My title') or call any of the other methods defined for gtk.Window http://www.gnome.org/~james/pygtk-docs/class-gtkwindow.html For the wx backend there is a 'frame' attribute that you can use to control the wx frame. In the next release, I'll make a public version of this function. JDH |
From: Yann Le Du <yan...@no...> - 2004-01-18 10:00:29
|
On Sat, 17 Jan 2004, John Hunter wrote: > and use of the division / operator with Numeric arrays. For that > reason I usually try and write > > > dashes = dpi/72.0*dash_list > > or > > dashes = dash_list*(dpi/72.0) > > Apparently I forgot this time. Try the above and see if they help. > Please let me know. Yes, it now works fine, thank you ! Y |