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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(16) |
2
(16) |
3
(5) |
|
4
(4) |
5
(4) |
6
(10) |
7
(33) |
8
(11) |
9
(20) |
10
(7) |
|
11
(8) |
12
(18) |
13
(27) |
14
(21) |
15
(15) |
16
(10) |
17
(12) |
|
18
(3) |
19
(12) |
20
(12) |
21
(14) |
22
(32) |
23
(15) |
24
(20) |
|
25
(12) |
26
(32) |
27
(29) |
28
(17) |
29
(25) |
30
(12) |
31
(5) |
|
From: Benjamin R. <ben...@ou...> - 2010-07-18 18:17:51
|
On Thu, Jul 15, 2010 at 9:13 PM, Jeff Berry <jj...@em...>wrote: > Hi, > > I'm using the new mixed axes feature in matplotlib 1.0.0 to combine 3D and > 2D plots in a single figure. The problem is that the 3D axes have a lot of > extra white space around them that prevents the plot to line up flush with > the 2D plot. Here is an example image of this: > > using matplotlib: http://www.u.arizona.edu/~jjberry/matplotlib.png<http://www.u.arizona.edu/%7Ejjberry/matplotlib.png> > > vs. matlab of the same thing: http://www.u.arizona.edu/~jjberry/matlab.png<http://www.u.arizona.edu/%7Ejjberry/matlab.png> > > Is there any way of changing the space on the 3D axis to look more like the > matlab figure? > > Thanks, > Jeff Berry > > > Jeff, thanks for pointing this out. An inadvertant side-effect of using add_subplot() for 3d axes seems to be that the creation process greatly restricts the available space for the 3d figure to be plotted. Whereas doing the old Axes3D() approach (albeit for non-subplots) would allow the 3D figure to use all the available space. I am currently examining this issue right now and might be tied to another bug that has been reported recently. Ben Root > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Friedrich R. <fri...@gm...> - 2010-07-18 16:32:36
|
2010/7/18 Simon Friedberger <sim...@a-...>: > On 22:49 Sat 17.07.10, Friedrich Romstedt wrote: >> Maybe try to use axes.set_xticks() first, see >> http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_xticks >> . > I know about that but couldn't find any useful way. Could you be more > specific? Try to add: ax.set_xticks(range(0, 10)) ax.set_yticks(range(0, 10)) before the imshow call. For some reason it must happen before the imshow call and not after, else the yscaling will change (I don't understand this). >> Your code on pocoo is messed up with whitespace. Is that intentional? > Messed up? It looks all good to me. Sorry, but there is plenty of whitespace at the end of each line when I copy-paste the code, even in raw format. hth you, Friedrich |
|
From: Simon F. <sim...@a-...> - 2010-07-18 16:02:39
|
On 22:49 Sat 17.07.10, Friedrich Romstedt wrote: > Maybe try to use axes.set_xticks() first, see > http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_xticks > . I know about that but couldn't find any useful way. Could you be more specific? > Your code on pocoo is messed up with whitespace. Is that intentional? Messed up? It looks all good to me. Regards Simon |
|
From: Friedrich R. <fri...@gm...> - 2010-07-17 20:50:01
|
2010/7/16 Simon Friedberger <sim...@a-...>: > Hello List. > > I'm trying to plot a confusion matrix and I got this far: > http://paste.pocoo.org/show/238332/ > > Basically what I still want to do is get the ticklabels from the bottom > to the top, have every ticklabel shown and start showing them from the > first not from the second. Maybe try to use axes.set_xticks() first, see http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_xticks . Your code on pocoo is messed up with whitespace. Is that intentional? Friedrich |
|
From: Friedrich R. <fri...@gm...> - 2010-07-17 20:38:35
|
2010/7/15 Waléria Antunes David <wal...@gm...>: > But, i don't know how do... > > I tried, but don't, most failed.... Maybe this is something in the direction you want? You have to adapt the test file. Friedrich |
|
From: Christoph G. <cg...@uc...> - 2010-07-17 20:26:21
|
The matplotlib installers for Windows are built with the user-access-control=auto option. Otherwise they would not work correctly with UAC on Windows Vista and 7. See also http://www.mail-archive.com/mat...@li.../msg13466.html. I can provide eggs for the next release. Python bdist_wininst installers are valid ZIP files. You can open matplotlib-1.0.0.win32-py2.6.exe with a ZIP program, e.g. WinRAR, and extract the directories/files found under PLATLIB into C:\Python26\Lib\site-packages. Christoph On 7/17/2010 4:14 AM, Pavlo Shchelokovskyy wrote: > Hi all, > on my workplace I use matplotlib in restricted Windows environment. > Since couple of versions matplotlib Windows installer needs elevated > user privileges to work (why?), but installation from Python eggs was > working just fine. However I can not find any eggs for latest > matplotlib, and those on PyPI are for previous release, i.e. 0.99.3. > So can somebody point me to Python eggs for matplotlib on Python 2.6 > under Windows? Or how can I build one, for example from working > installation of matplotlib 1.0.0 on the identical platform? > > Best regards, > Pavlo Shchelokovskyy > |
|
From: Friedrich R. <fri...@gm...> - 2010-07-17 19:33:45
|
2010/7/15 Benjamin Root <ben...@ou...>: > Assuming you are using Linux or a Mac, I wonder if it is somehow possible to > "save" a .ps file to a postscript device? I have never had to do any Linux > magic with CUPS, so maybe this isn't possible. Anybody else have any > thoughts? Normally you can cat the .ps file to lpr or similar: $ cat file.ps | lpr -P my_printer $ lpr -P my_printer file.ps I'm not sure if it works also for eps files. On mac I'd print it using the system. Actually my first inspection now shows that apparently you can use lpr also on mac: $ lpq HP_LaserJet_4100n_at_CERN_ISOLDE_offices ist bereit keine Einträge (meaning the printer is ready and there are no entries) But I don't know if all printers are listed in the lpq list, because for me one is missing. Friedrich |
|
From: Benjamin R. <ben...@ou...> - 2010-07-17 18:49:37
|
On Fri, Jul 16, 2010 at 12:34 PM, Simon Friedberger < sim...@a-... <simon%2Bm...@a-...>> wrote: > Hello List. > > Is it just me or does the alignment in the picture at > http://matplotlib.sourceforge.net/users/text_props.html > look off? > > Best > Simon > > Maybe. To me, the rotated "with newlines" text doesn't quite seem to be rotated about its center, and that is even without any capital letters (it would look worse with them). The "centered" text to the right seems like it might be to far to the left, and might look worse with capital letters. And the "center top" also seems a bit off. However, checking the PDF version of the image, it looks perfect! So, either we have a bug in the backend that saves PNG files and the positions are being calculated right by matplotlib.... or we have a bug in matplotlib position calculations and the PDF backend that are correcting each other... My vote is for the former. Ben Root |
|
From: Daniele P. <dpa...@ya...> - 2010-07-17 18:37:49
|
Hi everybody, I have a problem with a plot. I attach a figure to be easily understandable. As you can see from the figure, I have in the same area a line and a bar plot. The problem is that y=0 for right y axis is different with respect to left y axis one. I want the two y=0 to be the same. How can i do that? Excuse me for my bad english, I'm italian :) Thanks in advance. |
|
From: Friedrich R. <fri...@gm...> - 2010-07-17 18:29:13
|
2010/7/15 Stephen T. <obs...@ho...>: > ============================================================================ > BUILDING MATPLOTLIB > matplotlib: 1.0.svn > python: 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) [GCC > 4.0.1 (Apple Inc. build 5493)] > platform: darwin > REQUIRED DEPENDENCIES > numpy: 1.4.1 > freetype2: 9.20.3 > OPTIONAL BACKEND DEPENDENCIES > libpng: 1.2.35 > Tkinter: Tkinter: 73770, Tk: 8.4, Tcl: 8.4 > wxPython: no > * wxPython not found > Gtk+: no > * Building for Gtk+ requires pygtk; you must be able > * to "import gtk" in your build/install environment > Mac OS X native: yes > Qt: no > Qt4: no > Cairo: no > OPTIONAL DATE/TIMEZONE DEPENDENCIES > datetime: present, version unknown > dateutil: matplotlib will provide > pytz: matplotlib will provide > adding pytz > OPTIONAL USETEX DEPENDENCIES > dvipng: 1.9 > ghostscript: 8.64 > latex: 3.141592 > pdftops: 3.02 Exactly what I had in mind, and everything ok so far. > [...] and then: > ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required > architecture > ld warning: in /opt/local/lib/libz.dylib, file is not of required > architecture > ld: in /opt/local/lib/libxml2.2.dylib, file is not of required architecture > for architecture ppc > collect2: ld returned 1 exit status > ld warning: duplicate dylib /opt/local/lib/libz.1.dylib > lipo: can't open input file: > /var/folders/Yh/Yh3On1j+FXW+r-334Wk-vk+++TI/-Tmp-//ccUX0Ard.out (No such > file or directory) > error: command 'c++' failed with exit status 1 >> > collect2: ld returned 1 exit status >> >> It doesn't tell which arch it's missing. I'm a bit confused about >> this "missing architecture". What arch does your system have? >> > My architecture is an Intel Core 2 Duo 2 GHz (64-bit). This is important. I recently had a similar issue (sort of). I think the macports library is 32-bit only, and I know that at least for building Python the build performs 64-bit only by default (this was my issue) on a 64bit system. Of course, in case you want to make a 64bit build against a 32bit library the error would be sensible. To check this, try to run: $ file /opt/local/lib/libxml2.2.dylib When I run it on the Apple supplied file it gives: /usr/lib/libxml2.dylib: Mach-O universal binary with 3 architectures /usr/lib/libxml2.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 /usr/lib/libxml2.dylib (for architecture i386): Mach-O dynamically linked shared library i386 /usr/lib/libxml2.dylib (for architecture ppc7400): Mach-O dynamically linked shared library ppc Maybe we can track it down that way. > Sorry for my delayed response - I am currently on travel... but I hope this > is fixable. If nothing else comes to mind, I will try installing Python 2.6 > from source with the option you mentioned? I hope you had some patience ... I was sick :-( And now, as you have choosen the make.osx way, we stick to that. I'll try to learn it ... :-) The --enable-framework switch is only important when you want Python to be installed in /Library/Frameworks/Python.framework . Otherwise it will install in the normal unix path. I think the python.org installer installs as a framework, although I'm not completely sure, and would welcome correction if I'm wrong. Friedrich |
|
From: Benjamin R. <ben...@ou...> - 2010-07-17 18:22:40
|
On Sat, Jul 17, 2010 at 12:46 PM, Benjamin Root <ben...@ou...> wrote: > On Sat, Jul 17, 2010 at 6:14 AM, Pavlo Shchelokovskyy < > shc...@gm...> wrote: > >> Hi all, >> on my workplace I use matplotlib in restricted Windows environment. >> Since couple of versions matplotlib Windows installer needs elevated >> user privileges to work (why?), but installation from Python eggs was >> working just fine. However I can not find any eggs for latest >> matplotlib, and those on PyPI are for previous release, i.e. 0.99.3. >> So can somebody point me to Python eggs for matplotlib on Python 2.6 >> under Windows? Or how can I build one, for example from working >> installation of matplotlib 1.0.0 on the identical platform? >> >> Best regards, >> Pavlo Shchelokovskyy >> >> > I haven't tried matplotlib on Windows, but on Linux, we are able to install > the various SciPy packages locally by using "python setupegg.py install > --local". This does require the use of a build environment, though. I > don't know if there is an equivalent for Windows, but I wouldn't be > surprised if there was. > > Ben Root > > Correction -- "python setupegg.py install --user" Sorry for the confusion. Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2010-07-17 17:46:44
|
On Sat, Jul 17, 2010 at 6:14 AM, Pavlo Shchelokovskyy < shc...@gm...> wrote: > Hi all, > on my workplace I use matplotlib in restricted Windows environment. > Since couple of versions matplotlib Windows installer needs elevated > user privileges to work (why?), but installation from Python eggs was > working just fine. However I can not find any eggs for latest > matplotlib, and those on PyPI are for previous release, i.e. 0.99.3. > So can somebody point me to Python eggs for matplotlib on Python 2.6 > under Windows? Or how can I build one, for example from working > installation of matplotlib 1.0.0 on the identical platform? > > Best regards, > Pavlo Shchelokovskyy > > I haven't tried matplotlib on Windows, but on Linux, we are able to install the various SciPy packages locally by using "python setupegg.py install --local". This does require the use of a build environment, though. I don't know if there is an equivalent for Windows, but I wouldn't be surprised if there was. Ben Root |
|
From: Pavlo S. <shc...@gm...> - 2010-07-17 11:14:47
|
Hi all, on my workplace I use matplotlib in restricted Windows environment. Since couple of versions matplotlib Windows installer needs elevated user privileges to work (why?), but installation from Python eggs was working just fine. However I can not find any eggs for latest matplotlib, and those on PyPI are for previous release, i.e. 0.99.3. So can somebody point me to Python eggs for matplotlib on Python 2.6 under Windows? Or how can I build one, for example from working installation of matplotlib 1.0.0 on the identical platform? Best regards, Pavlo Shchelokovskyy |
|
From: Jae-Joon L. <lee...@gm...> - 2010-07-17 07:41:24
|
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v1_0_maint/lib/matplotlib/text.py?r1=8512&r2=8541&pathrev=8541 Regards, -JJ On Wed, Jul 14, 2010 at 1:22 AM, shuwj <shu...@16...> wrote: > Hi JJ, > Thanks for your reply. I can't access the svn for some network > reason. Will you please send me a copy of your patch about Text.draw? > Regards, > > David.shu > > > > >> It seems that there are at least two issues related with the text >>clipping. >> The first issue is that the Text.draw method does not properly set >> clip path. I think I fixed this in r8541 and r8542. >> >> The second issue is that the agg backend does not seem to support a >> clip path yet for the text. >> >> Also, your script need to be fixed. >> The patch need to be added to the axes (or its transform need to be >> set) before you call set_clip_path. >> >> So, with the current svn, you can clip the text with an arbitrary path >> when you're using the backends that support it (I only tested with pdf >> backend, the attached is the pdf output converted to png). >> If you can install matplotlib from the svn, please test the patch. >> Also, it would be great if you file a bug in the SF tracker, so that >> other developer can fix it later. >> >> Regards, >> >> -JJ > > > > |
|
From: Jae-Joon L. <lee...@gm...> - 2010-07-17 07:18:35
|
I presume that you're using matploltib v1.0? It seems that the bug was recently introduced as the baseline of the multiline text has been recently changed. This should be fixed this in r8564, and r8565. Unfortunately, I don't see any easy workaround other than changing the vertical alignment of multiline text as you suggested (but the code will produce erroneous baseline with the fixed matplotlib). Regards, -JJ On Fri, Jul 16, 2010 at 9:17 AM, Bartosz Telenczuk <b.t...@bi...> wrote: > Hi all, > > I am trying to create legend with multiple-line labels, but I noticed that the labels are not properly aligned. I tried also changing the alignment of the text objects to center, but this requires separate handling of multi-line and single-line labels: > > import matplotlib.pyplot as plt > plt.plot([1,2,3], label"multi\nline 1") > plt.plot([1,2,3], label="multi\nline 1") > plt.plot([1,2,3], label="multi\nline 2") > plt.plot([1,2,3], label=" single line") > leg=plt.legend() > #change alignment of multiline labels only > plt.setp(leg.get_texts()[:2], va='center') > > I found a discussion thread on this topic: > > http://article.gmane.org/gmane.comp.python.matplotlib.devel/6116 > > Is there a way to achieve a clean rendering independent of number of lines? > > Yours, > > Bartosz > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Eric F. <ef...@ha...> - 2010-07-16 21:31:43
|
I am always looking for ways to make mpl maintenance easier, and one way is to delete unused code. In that spirit, I am wondering: Is anyone out there actually using the fltkagg backend? Thanks. Eric |
|
From: Simon F. <sim...@a-...> - 2010-07-16 17:34:54
|
Hello List. Is it just me or does the alignment in the picture at http://matplotlib.sourceforge.net/users/text_props.html look off? Best Simon |
|
From: Eric F. <ef...@ha...> - 2010-07-16 16:48:57
|
On 07/16/2010 01:32 AM, K.-Michael Aye wrote: > On 2010-07-14 19:11:58 +0200, K.-Michael Aye said: > >> On 2010-07-14 18:51:26 +0200, K.-Michael Aye said: >> >>> On 2010-07-14 18:45:35 +0200, John Hunter said: >>> >>>> On Wed, Jul 14, 2010 at 11:38 AM, K.-Michael Aye >>>> <kmi...@gm...> wrote: >>>> >>>>> Out[12]: 1 >>>>> >>>>> In [13]: gc.collect() >>>>> >>>>> Out[13]: 12 >>>> >>>> >>>> still not seeing a leak in your data -- you need to report_memory >>>> after calling gc collect. Turn off hold, add an image, call collect, >>>> report memory, the repeat several times, each time calling collect and >>>> report memory, and report the results. >>> >>> Was just following your example, you were nowhere calling collect. >>> Here is what you requested: >>> >>> In [1]: import gc >>> >>> In [2]: import matplotlib.cbook as cbook >>> >>> In [3]: data = ones((1500,1500,3)) >>> >>> In [4]: hold(False) >>> >>> In [5]: imshow(data) >>> >>> Out[5]:<matplotlib.image.AxesImage object at 0x1c43e50> >>> >>> In [6]: gc.collect() >>> >>> Out[6]: 12 >>> >>> In [7]: cbook.report_memory() >>> >>> Out[7]: 174540 >>> >>> In [8]: imshow(data) >>> >>> Out[8]:<matplotlib.image.AxesImage object at 0x1c59e90> >>> >>> In [9]: gc.collect() >>> >>> Out[9]: 0 >>> >>> In [10]: cbook.report_memory() >>> >>> Out[10]: 253400 >>> >>> In [11]: imshow(data) >>> >>> Out[11]:<matplotlib.image.AxesImage object at 0x1c603b0> >>> >>> In [12]: gc.collect() >>> >>> Out[12]: 0 >>> >>> In [13]: cbook.report_memory() >>> >>> Out[13]: 333360 >>> >>> In [14]: imshow(data) >>> >>> Out[14]:<matplotlib.image.AxesImage object at 0x1c60410> >>> >>> In [15]: gc.collect() >>> >>> Out[15]: 0 >>> >>> In [16]: cbook.report_memory() >>> >>> Out[16]: 413296 >>> >> >> >> Here are the commands as macro form, for easy cut and paste into pylab: >> >> import gc >> import matplotlib.cbook as cbook >> data = ones((1500,1500,3)) >> hold(False) >> imshow(data) >> gc.collect() >> cbook.report_memory() >> imshow(data) >> gc.collect() >> cbook.report_memory() >> imshow(data) >> gc.collect() >> cbook.report_memory() >> imshow(data) >> gc.collect() >> cbook.report_memory() > > Furthermore, > deleting images from ax.images does not free memory : Maybe because ipython is keeping a reference to every AxesImage object that you make... Eric > > In [1]: import gc > > In [2]: import matplotlib.cbook as cbook > > In [3]: data = ones((1500,1500,3)) > > In [4]: imshow data > ------> imshow(data) > > Out[4]:<matplotlib.image.AxesImage object at 0x1c57550> > > In [5]: imshow data > ------> imshow(data) > > Out[5]:<matplotlib.image.AxesImage object at 0x1c442b0> > > In [6]: imshow data > ------> imshow(data) > > Out[6]:<matplotlib.image.AxesImage object at 0x1400cd0> > > In [7]: imshow data > ------> imshow(data) > > Out[7]:<matplotlib.image.AxesImage object at 0x1414cb0> > > In [8]: ax =gca() > > In [9]: ax.images > > Out[9]: > [<matplotlib.image.AxesImage object at 0x1c57550>, > <matplotlib.image.AxesImage object at 0x1c442b0>, > <matplotlib.image.AxesImage object at 0x1400cd0>, > <matplotlib.image.AxesImage object at 0x1414cb0>] > > In [10]: gc.collect() > > Out[10]: 15 > > In [11]: cbook.report_memory() > > Out[11]: 414588 > > In [12]: del ax.images[:-1] > > In [13]: gc.collect() > > Out[13]: 3 > > In [14]: cbook.report_memory() > > Out[14]: 414600 > |
|
From: Simon F. <sim...@a-...> - 2010-07-16 15:11:41
|
Hello List. I'm trying to plot a confusion matrix and I got this far: http://paste.pocoo.org/show/238332/ Basically what I still want to do is get the ticklabels from the bottom to the top, have every ticklabel shown and start showing them from the first not from the second. I have experimented with this for a while now and don't have all the code states at hand anymore but basically at several points some of the above worked but the others didn't or something else (like the axis length) broke. Best Simon |
|
From: Benjamin R. <ben...@ou...> - 2010-07-16 14:40:39
|
Please attach the code you used to generate this image.
Ben Root
On Fri, Jul 16, 2010 at 7:11 AM, Waléria Antunes David <
wal...@gm...> wrote:
> I forgot of the my image.
>
>
> On Fri, Jul 16, 2010 at 9:10 AM, Waléria Antunes David <
> wal...@gm...> wrote:
>
>> Hi...
>>
>> I tried the first option, but failed.... see my image attached
>>
>> And the second option, i don't understand the variable 'val'
>>
>> ...?
>>
>>
>> On Thu, Jul 15, 2010 at 3:22 PM, Ryan May <rm...@gm...> wrote:
>>
>>> On Thu, Jul 15, 2010 at 8:41 AM, Waléria Antunes David
>>> <wal...@gm...> wrote:
>>> > Hi all,
>>> >
>>> > I have a code base so that:
>>> >
>>> >
>>> > from pylab import *
>>> > x = arange (3000,3400)
>>> > y = -108 * (3.0e14 ** 2)/x**2
>>> >
>>> > pylab..title("Teste")
>>> > pylab.savefig("imagem.png")
>>> > plot(x, y)
>>> >
>>> >
>>> > Well.... the values of the function range(3000,3400) are in Hz......i
>>> need
>>> > to pass GHz which would be in scientific notation as follows bellow:
>>> >
>>> > 3000 Hz = 3,0 × 10-6 GHz
>>> > 3400 Hz = 3,4 x 10-6 Ghz
>>> >
>>> > How do I make the graph x-axis is shown in figures
>>> > scientific notation, for this currently so
>>> >
>>> > 3000,3050,3100,....,3400
>>> >
>>> > in scientific notation is: (3.0e-6, 3.4e-6)
>>>
>>> One way is to just change the values in the GHz and plot them:
>>>
>>> plot(x/1e9, y)
>>> # Need to change some limits so that they show up in scientific notation:
>>> gca().xaxis.get_major_formatter().set_powerlimits((-5,5))
>>>
>>> The other way is make a custom formatter that changes the values of the
>>> ticks:
>>>
>>> def fmt_ghz(val, pos=None):
>>> return '%g' % (val / 1e9)
>>>
>>> plot(x, y)
>>> gca().xaxis.set_major_formatter(FuncFormatter(fmt_ghz))
>>>
>>> You can get more information here:
>>> http://matplotlib.sourceforge.net/api/ticker_api.html
>>>
>>> Ryan
>>>
>>> --
>>> Ryan May
>>> Graduate Research Assistant
>>> School of Meteorology
>>> University of Oklahoma
>>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Bartosz T. <b.t...@bi...> - 2010-07-16 13:17:36
|
Hi all, I am trying to create legend with multiple-line labels, but I noticed that the labels are not properly aligned. I tried also changing the alignment of the text objects to center, but this requires separate handling of multi-line and single-line labels: import matplotlib.pyplot as plt plt.plot([1,2,3], label"multi\nline 1") plt.plot([1,2,3], label="multi\nline 1") plt.plot([1,2,3], label="multi\nline 2") plt.plot([1,2,3], label=" single line") leg=plt.legend() #change alignment of multiline labels only plt.setp(leg.get_texts()[:2], va='center') I found a discussion thread on this topic: http://article.gmane.org/gmane.comp.python.matplotlib.devel/6116 Is there a way to achieve a clean rendering independent of number of lines? Yours, Bartosz |
|
From: Waléria A. D. <wal...@gm...> - 2010-07-16 12:11:02
|
Hi...
I tried the first option, but failed.... see my image attached
And the second option, i don't understand the variable 'val'
...?
On Thu, Jul 15, 2010 at 3:22 PM, Ryan May <rm...@gm...> wrote:
> On Thu, Jul 15, 2010 at 8:41 AM, Waléria Antunes David
> <wal...@gm...> wrote:
> > Hi all,
> >
> > I have a code base so that:
> >
> >
> > from pylab import *
> > x = arange (3000,3400)
> > y = -108 * (3.0e14 ** 2)/x**2
> >
> > pylab..title("Teste")
> > pylab.savefig("imagem.png")
> > plot(x, y)
> >
> >
> > Well.... the values of the function range(3000,3400) are in Hz......i
> need
> > to pass GHz which would be in scientific notation as follows bellow:
> >
> > 3000 Hz = 3,0 × 10-6 GHz
> > 3400 Hz = 3,4 x 10-6 Ghz
> >
> > How do I make the graph x-axis is shown in figures
> > scientific notation, for this currently so
> >
> > 3000,3050,3100,....,3400
> >
> > in scientific notation is: (3.0e-6, 3.4e-6)
>
> One way is to just change the values in the GHz and plot them:
>
> plot(x/1e9, y)
> # Need to change some limits so that they show up in scientific notation:
> gca().xaxis.get_major_formatter().set_powerlimits((-5,5))
>
> The other way is make a custom formatter that changes the values of the
> ticks:
>
> def fmt_ghz(val, pos=None):
> return '%g' % (val / 1e9)
>
> plot(x, y)
> gca().xaxis.set_major_formatter(FuncFormatter(fmt_ghz))
>
> You can get more information here:
> http://matplotlib.sourceforge.net/api/ticker_api.html
>
> Ryan
>
> --
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
>
|
|
From: K.-Michael A. <kmi...@gm...> - 2010-07-16 11:32:41
|
On 2010-07-14 19:11:58 +0200, K.-Michael Aye said: > On 2010-07-14 18:51:26 +0200, K.-Michael Aye said: > >> On 2010-07-14 18:45:35 +0200, John Hunter said: >> >>> On Wed, Jul 14, 2010 at 11:38 AM, K.-Michael Aye >>> <kmi...@gm...> wrote: >>> >>>> Out[12]: 1 >>>> >>>> In [13]: gc.collect() >>>> >>>> Out[13]: 12 >>> >>> >>> still not seeing a leak in your data -- you need to report_memory >>> after calling gc collect. Turn off hold, add an image, call collect, >>> report memory, the repeat several times, each time calling collect and >>> report memory, and report the results. >> >> Was just following your example, you were nowhere calling collect. >> Here is what you requested: >> >> In [1]: import gc >> >> In [2]: import matplotlib.cbook as cbook >> >> In [3]: data = ones((1500,1500,3)) >> >> In [4]: hold(False) >> >> In [5]: imshow(data) >> >> Out[5]: <matplotlib.image.AxesImage object at 0x1c43e50> >> >> In [6]: gc.collect() >> >> Out[6]: 12 >> >> In [7]: cbook.report_memory() >> >> Out[7]: 174540 >> >> In [8]: imshow(data) >> >> Out[8]: <matplotlib.image.AxesImage object at 0x1c59e90> >> >> In [9]: gc.collect() >> >> Out[9]: 0 >> >> In [10]: cbook.report_memory() >> >> Out[10]: 253400 >> >> In [11]: imshow(data) >> >> Out[11]: <matplotlib.image.AxesImage object at 0x1c603b0> >> >> In [12]: gc.collect() >> >> Out[12]: 0 >> >> In [13]: cbook.report_memory() >> >> Out[13]: 333360 >> >> In [14]: imshow(data) >> >> Out[14]: <matplotlib.image.AxesImage object at 0x1c60410> >> >> In [15]: gc.collect() >> >> Out[15]: 0 >> >> In [16]: cbook.report_memory() >> >> Out[16]: 413296 >> > > > Here are the commands as macro form, for easy cut and paste into pylab: > > import gc > import matplotlib.cbook as cbook > data = ones((1500,1500,3)) > hold(False) > imshow(data) > gc.collect() > cbook.report_memory() > imshow(data) > gc.collect() > cbook.report_memory() > imshow(data) > gc.collect() > cbook.report_memory() > imshow(data) > gc.collect() > cbook.report_memory() Furthermore, deleting images from ax.images does not free memory : In [1]: import gc In [2]: import matplotlib.cbook as cbook In [3]: data = ones((1500,1500,3)) In [4]: imshow data ------> imshow(data) Out[4]: <matplotlib.image.AxesImage object at 0x1c57550> In [5]: imshow data ------> imshow(data) Out[5]: <matplotlib.image.AxesImage object at 0x1c442b0> In [6]: imshow data ------> imshow(data) Out[6]: <matplotlib.image.AxesImage object at 0x1400cd0> In [7]: imshow data ------> imshow(data) Out[7]: <matplotlib.image.AxesImage object at 0x1414cb0> In [8]: ax =gca() In [9]: ax.images Out[9]: [<matplotlib.image.AxesImage object at 0x1c57550>, <matplotlib.image.AxesImage object at 0x1c442b0>, <matplotlib.image.AxesImage object at 0x1400cd0>, <matplotlib.image.AxesImage object at 0x1414cb0>] In [10]: gc.collect() Out[10]: 15 In [11]: cbook.report_memory() Out[11]: 414588 In [12]: del ax.images[:-1] In [13]: gc.collect() Out[13]: 3 In [14]: cbook.report_memory() Out[14]: 414600 |
|
From: Jeff B. <jj...@em...> - 2010-07-16 03:55:27
|
Hi, I'm using the new mixed axes feature in matplotlib 1.0.0 to combine 3D and 2D plots in a single figure. The problem is that the 3D axes have a lot of extra white space around them that prevents the plot to line up flush with the 2D plot. Here is an example image of this: using matplotlib: http://www.u.arizona.edu/~jjberry/matplotlib.png vs. matlab of the same thing: http://www.u.arizona.edu/~jjberry/matlab.png Is there any way of changing the space on the 3D axis to look more like the matlab figure? Thanks, Jeff Berry |
|
From: Stephen E. <mat...@re...> - 2010-07-15 22:45:21
|
On 14/07/2010 23:32, Eric Firing wrote: > On 07/14/2010 11:41 AM, Stephen Evans wrote: > >> Hi, >> >> While testing Psyco V2 to see if it would offer any speed improvements I >> tried it with some applications using matplotlib. Exceptions were raised >> that were easily resolved by replacing calls to min() and max() with >> their numpy equivalents numpy.amin() and numpy.amax() in the matplotlib >> code. >> >> Simply demonstrated by inserting at the beginning of, say, matplotlib's >> examples/api/barchart_demo.py : >> >> import psyco >> psyco.full() >> >> which caused: >> >> Traceback (most recent call last): >> File "barchart_demo.py", line 29, in<module> >> ax.set_xticks(ind+width) >> File "c:\python26\lib\site-packages\matplotlib\axes.py", line 2064, >> in set_xticks >> return self.xaxis.set_ticks(ticks, minor=minor) >> File "c:\python26\lib\site-packages\matplotlib\axis.py", line 1154, >> in set_ticks >> self.set_view_interval(min(ticks), max(ticks)) >> File "c:\python26\lib\site-packages\psyco\builtin.py", line 75, in min >> return _min(*args) >> File "c:\python26\lib\site-packages\psyco\builtin.py", line 34, in _min >> if not iterable: >> ValueError: The truth value of an array with more than one element is >> ambiguous. Use a.any() or a.all() >> >> >> software used: >> >> Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit >> (Intel)] on win32 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import psyco >> >>> psyco.version_info >> (2, 0, 0, 'final', 0) >> >>> import numpy >> >>> numpy.version.version >> '1.4.1' >> >>> import matplotlib >> >>> matplotlib.__version__ >> '0.99.3' >> >> >> Psyco V2 is available from: http://codespeak.net/svn/psyco/v2/dist/ >> >> Should numpy.min()/numpy.amin() be used on array like objects within >> matplotlib, or is min() adequate ? Ditto max(). >> > When short sequences are involved, min() is much faster than amin(). If > min() is called only a few times per plot in such cases, using the > slower function would cause a negligible slowdown. I'm reluctant to > change mpl to work around a bug in psyco, though. > > When you did make the substitution and do the test, was there a big speedup? > > Eric > For a quick check of any speedup I timed some runs on two plots using one of my applications with real world data. 4 runs, average of last 3, with some meaningless precision: a) one subplot of 44000 points b) two subplots of 1.4M points each using freshly installed matplotlib 1.0 a) 2.97 seconds b) 37.85 with psyco and changing min() max() to numpy.amin() numpy.amax() where appropriate in matplotlib a) 3.05 b) 27.48 without psyco, but with the changes above a) 2.96 b) 37.52 Not a rigorous test, but psyco causes a definite speedup in the larger plot. Whether this applies throughout matplotlib on all platforms is another matter. Hopefully anyone who is using psyco with numpy/matplotlib should be able to patch matplotlib themselves where required. If it ain't broke, don't fix it. Stephen >> Stephen Evans >> >> (Out of interest I came across numpy ticket #1286 while looking for this >> issue.) >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |