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
(5) |
2
(6) |
3
(4) |
4
(9) |
5
(7) |
6
(16) |
7
(5) |
8
(10) |
9
(2) |
10
(3) |
11
(9) |
12
(1) |
13
(13) |
14
(1) |
15
(13) |
16
(5) |
17
(3) |
18
(14) |
19
(17) |
20
(14) |
21
(15) |
22
(6) |
23
(6) |
24
|
25
(4) |
26
(4) |
27
(4) |
28
(11) |
29
(7) |
30
(1) |
From: Paolo Z. <p.z...@ya...> - 2011-04-19 23:08:33
|
I have resolved using the aspect setting. I calculated the ratio between the two pixel dimensions and I use this value for aspect (if you want to shift the pixel size you can use the inverse of this value). Thank you for the support! Paolo Il 18/04/2011 15:55, Joe Kington ha scritto: > Actually, I think he's wanting a set aspect, right? Either way, it's > just "aspect=1.5" or "aspect=0.6667" depending on the orientation he > wants. > > On Mon, Apr 18, 2011 at 6:37 AM, Sebastian Berg > <seb...@si... <mailto:seb...@si...>> wrote: > > The solution is already the aspect='auto', ie: > > import numpy as np > from matplotlib import pyplot as plt > a = np.arange(100).reshape(10,10) > plt.imshow(a, aspect='auto') > > aspect='auto' is what you were looking for, the documentation (as you > probably already found is for example at: > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow > or in interactive help. > > > On Sun, 2011-04-17 at 23:16 +0200, Paolo Zaffino wrote: > > Thanks for the reply. > > I checked in the help...I didn't understand what I must to use. > > Should you post me the link of the guide of this setting? > > Thanks! > > > > > > Il 16/04/2011 10:47, Sebastian Berg ha scritto: > > > Hello, > > > > > > check the help ;). you can set aspect='auto' or something fixed. > > > > > > Regards, > > > > > > Sebastian > > > > > > On Sat, 2011-04-16 at 10:43 +0200, Paolo Zaffino wrote: > > >> Hi at all, > > >> I have a numpy matrix (an image) and I'd like to show it. > > >> I thought to use show function, but I have a question. > > >> I don't want that the pixel have dimension 1x1 unit but I > want for > > >> example 1X1.5 unit (I don't want a square but a rectangle). > > >> How can I do this? > > >> Thanks in advance. > > >> Paolo > > >> > > >> > ------------------------------------------------------------------------------ > > >> Benefiting from Server Virtualization: Beyond Initial Workload > > >> Consolidation -- Increasing the use of server virtualization > is a top > > >> priority.Virtualization can reduce costs, simplify > management, and improve > > >> application availability and disaster protection. Learn more > about boosting > > >> the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev > > >> _______________________________________________ > > >> Matplotlib-users mailing list > > >> Mat...@li... > <mailto:Mat...@li...> > > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > >> > > > > > > > > > > ------------------------------------------------------------------------------ > > > Benefiting from Server Virtualization: Beyond Initial Workload > > > Consolidation -- Increasing the use of server virtualization > is a top > > > priority.Virtualization can reduce costs, simplify management, > and improve > > > application availability and disaster protection. Learn more > about boosting > > > the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev > > > _______________________________________________ > > > Matplotlib-users mailing list > > > Mat...@li... > <mailto:Mat...@li...> > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > > ------------------------------------------------------------------------------ > > Benefiting from Server Virtualization: Beyond Initial Workload > > Consolidation -- Increasing the use of server virtualization is > a top > > priority.Virtualization can reduce costs, simplify management, > and improve > > application availability and disaster protection. Learn more > about boosting > > the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > <mailto:Mat...@li...> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and > improve > application availability and disaster protection. Learn more about > boosting > the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Ian B. <ib...@pu...> - 2011-04-19 22:53:01
|
To clarify, you are trying to read in a set of (lat,lon) points in a file that is space delimited, store the data, and then put a text marker at each point, with each point numbered in order? The critical part is that you want to use a list (or numpy array) instead of a dictionary. Something like this ought to do (don't have MPL on this computer though - pretty sure this should work): lines=open('file.txt','r').readlines() (lats,lons)=([],[]) for line in lines: (lat,lon)=line.strip().split(' ') lats.append(float(lat)) lons.append(float(lon)) for i in range(len(lons)): plt.text(lats[i],lon[i],str(i+1),ha='center',va='center',color='white') I'm sure there are a bunch of more compact ways to do this, but this should work. Ian ---- Ian Bell Graduate Research Assistant Herrick Labs Purdue University email: ib...@pu... cell: (607)227-7626 On Tue, Apr 19, 2011 at 4:09 PM, Michael Rawlins <raw...@ya...>wrote: > > I'm trying to plot a series of points/locations on a map. I'm reading the > latitudes and longitudes from a file, with each lat, lon pair on each record > (line). Here is the code: > > def make_float(line): > lati, longi = line.split() > return float(lati), float(longi) > > my_dict = {} > with open("file.txt") as f: > for item in f: > lati,longi = make_float(item) > my_dict[lati] = longi > > xpt,ypt = m(-76.1670,39.4670 ) > plt.text(xpt,ypt,'1',color='white') > > #print my_dict > > The matplotlib code which I've previously used to plot a single point on > the map is below, with longitude and latitude in ( ): > > xpt,ypt = m(-70.758392,42.960445) > plt.text(xpt,ypt,'1',color='white') > > When replacing (-70.758392,42.960445) with (longi,lati), the code plots > only a single '1' at the location of just the last coordinate pair in the > file. So now I only need to plot them all. Does the code I've implemented > have an implicit loop to it? > > Mike > > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Michael R. <raw...@ya...> - 2011-04-19 20:09:31
|
I'm trying to plot a series of points/locations on a map. I'm reading the latitudes and longitudes from a file, with each lat, lon pair on each record (line). Here is the code: def make_float(line): lati, longi = line.split() return float(lati), float(longi) my_dict = {} with open("file.txt") as f: for item in f: lati,longi = make_float(item) my_dict[lati] = longi xpt,ypt = m(-76.1670,39.4670 ) plt.text(xpt,ypt,'1',color='white') #print my_dict The matplotlib code which I've previously used to plot a single point on the map is below, with longitude and latitude in ( ): xpt,ypt = m(-70.758392,42.960445) plt.text(xpt,ypt,'1',color='white') When replacing (-70.758392,42.960445) with (longi,lati), the code plots only a single '1' at the location of just the last coordinate pair in the file. So now I only need to plot them all. Does the code I've implemented have an implicit loop to it? Mike |
From: Michael D. <md...@st...> - 2011-04-19 16:57:45
|
Ok. I have a RHEL5 Linux box with Python 2.7.1. With Numpy 1.4.1 and 1.5.1 I don't see any leaks. With Numpy git HEAD, I did see a leak -- I submitted a pull request to Numpy here: https://github.com/numpy/numpy/pull/76 I get the same results (no leaks) running your wx, tk and agg scripts (with the Windows-specific stuff removed). FWIW, I have wxPython 2.8.11.0 and Tkinter rev 81008. So the variables are the platform and the version of Python. Perhaps it's one of those two things? Mike On 04/19/2011 12:34 PM, Caleb Constantine wrote: > On Tue, Apr 19, 2011 at 1:01 PM, Michael Droettboom<md...@st...> wrote: > >> There's a lot of moving parts here. Running your script again is >> showing some leaks in valgrind that weren't there before, but a number >> of the underlying libraries have changed on my system since then (memory >> leaks tend to be Whac-a-mole sometimes...) >> >> Which versions of the following are you running, and on what platform -- >> some variant of MS-Windows if I recall correctly? >> >> Python >> Numpy >> wxPython >> Tkinter >> > Windows XP SP 3 > Python - 2.6.6 > Numpy - 1.4.1 > wxPython - 2.8.11.0 > Tkinter - $Revision: 73770 $ > > I'll install new versions of Numpy and wxPython (and maybe Python) and > try again. > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
From: Caleb C. <cad...@gm...> - 2011-04-19 16:34:28
|
On Tue, Apr 19, 2011 at 1:01 PM, Michael Droettboom <md...@st...> wrote: > There's a lot of moving parts here. Running your script again is > showing some leaks in valgrind that weren't there before, but a number > of the underlying libraries have changed on my system since then (memory > leaks tend to be Whac-a-mole sometimes...) > > Which versions of the following are you running, and on what platform -- > some variant of MS-Windows if I recall correctly? > > Python > Numpy > wxPython > Tkinter Windows XP SP 3 Python - 2.6.6 Numpy - 1.4.1 wxPython - 2.8.11.0 Tkinter - $Revision: 73770 $ I'll install new versions of Numpy and wxPython (and maybe Python) and try again. |
From: Michael D. <md...@st...> - 2011-04-19 15:32:57
|
There's a lot of moving parts here. Running your script again is showing some leaks in valgrind that weren't there before, but a number of the underlying libraries have changed on my system since then (memory leaks tend to be Whac-a-mole sometimes...) Which versions of the following are you running, and on what platform -- some variant of MS-Windows if I recall correctly? Python Numpy wxPython Tkinter Mike On 04/19/2011 10:25 AM, Caleb Constantine wrote: > This picks up from a thread of the same name between 18 Nov 2010 and > 22 Nov 2010. > > Release 1.0.1 of matplotlib has made significant gains in reducing the > memory leak (thanks!!), but it did not > eliminate the problem entirely. Recall, the TkAgg back-end does not > have any leak, so we know this particular > leak is in matplotlib or wxPython. > > Here are the results of some tests. > > Matplotlib 1.0.0 > > - 1 hour > - Plotted 3595 times, about 1Hz > - Memory usage increased by about 18.7MB (59.96 - 41.25), or about > 5.3K per redraw. > > Matplotlib 1.0.1 > > - 1 hour > - Plotted 3601 times, about 1Hz > - Memory usage increased by about 1.4MB (42.98 - 41.59), or about > 0.40K per redraw. > > - 12 hour > - Plotted 43201 times, about 1Hz > - Memory usage increased by about 13.3MB (54.32 - 41.01), or about > 0.32K per redraw. > > As stated before, for a process plotting data for long periods of > time, this becomes an issue. > > Caleb > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
From: Caleb C. <cad...@gm...> - 2011-04-19 14:25:18
|
This picks up from a thread of the same name between 18 Nov 2010 and 22 Nov 2010. Release 1.0.1 of matplotlib has made significant gains in reducing the memory leak (thanks!!), but it did not eliminate the problem entirely. Recall, the TkAgg back-end does not have any leak, so we know this particular leak is in matplotlib or wxPython. Here are the results of some tests. Matplotlib 1.0.0 - 1 hour - Plotted 3595 times, about 1Hz - Memory usage increased by about 18.7MB (59.96 - 41.25), or about 5.3K per redraw. Matplotlib 1.0.1 - 1 hour - Plotted 3601 times, about 1Hz - Memory usage increased by about 1.4MB (42.98 - 41.59), or about 0.40K per redraw. - 12 hour - Plotted 43201 times, about 1Hz - Memory usage increased by about 13.3MB (54.32 - 41.01), or about 0.32K per redraw. As stated before, for a process plotting data for long periods of time, this becomes an issue. Caleb |
From: Muffles <dan...@gm...> - 2011-04-19 13:15:37
|
efiring wrote: > > > Have you tried using vmin=1e4 above? > > Well that did the trick...how did i miss that...thankyou! -- View this message in context: http://old.nabble.com/Resize-the-colorbar-tp31425316p31432430.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Emanuele P. <ema...@tr...> - 2011-04-19 08:53:26
|
Thank you all, using mpl from git worked fine. Problem solved. Is there a deadline for the new version release ? Emanuele Passera Software Engineer Tele-Rilevamento Europa - T.R.E. srl Via Vittoria Colonna, 7 20149 Milano – Italia Tel.: +39.02.4343.121 - Fax: +39.02.4343.1230 ema...@tr... - www.treuropa.com -- This communication, that may contain confidential and/or legally privileged information, is intended solely for the use of the intended addressees. Opinions, conclusions and other information contained in this message, that do not relate to the official business of this firm, shall be considered as not given or endorsed by it. Every opinion or advice contained in this communication is subject to the terms and conditions provided by the agreement governing the engagement with such a client. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. Any use, disclosure, copying or distribution of the contents of this communication by a not-intended recipient or in violation of the purposes of this communication is strictly prohibited and may be unlawful. -- On Tue, Apr 19, 2011 at 9:02 AM, Eric Firing <ef...@ha...> wrote: > On 04/18/2011 12:46 AM, Emanuele Passera wrote: > > Hello everybody, > > > > I am experiencing a strange behavior with the imshow() function when > > using the nearest interpolation method. > > > > Executing the code listed below, I obtain a good image when using the > > bilinear interpolation method > > and a totally white image when using the nearest interpolation method. > > I have attached the input data buffer and the resulting images too. > > > [...] > > > > I use matplotlib to generate a lot of images in batch mode and this > > behavior appear not to be deterministic. It seems to depend on the input > > data buffer. > > Can anyone help me ? > > > > I use > > Linux openSUSE 11.3 (x86_64) > > Linux sat1 2.6.34.7-0.7-default #1 SMP 2010-12-13 11:13:53 +0100 x86_64 > > x86_64 x86_64 GNU/Linux > > Python 2.6.5 > > numpy 1.5.1 > > matplotlib 1.0.1 with backend Agg v2.2 > > > > > > If it can be of some help this strange behavior does not appear with a > > system > > Linux Ubuntu 9.10 > > Linux joshua 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC > > 2009 i686 GNU/Linux > > Python 2.6.4 > > numpy 1.3.0 > > matplotlib 0.99.0 with backend Agg v2.2 > > Nor does it appear on my system with mpl from git, but it does with mpl > 1.0.1, so it looks like this is something that was broken temporarily in > the 1.0 series but is now fixed. > > Eric > > > > > Executing the script with verbosity I get the subsequent output > > python /users/lelepass/python/test_imagesc/test.py --verbose-helpful > > > > $HOME=/users/lelepass > > CONFIGDIR=/users/lelepass/.matplotlib > > > > Bad key "numerix" on line 30 in > > /users/lelepass/.matplotlib/matplotlibrc. > > You probably need to get an updated matplotlibrc file from > > http://matplotlib.sf.net/_static/matplotlibrc or from the matplotlib > source > > distribution > > matplotlib data path > /usr/lib64/python2.6/site-packages/matplotlib/mpl-data > > loaded rc file /users/lelepass/.matplotlib/matplotlibrc > > matplotlib version 1.0.1 > > verbose.level helpful > > interactive is False > > units is True > > platform is linux2 > > Using fontManager instance from > /users/lelepass/.matplotlib/fontList.cache > > backend agg version v2.2 > > findfont: Matching > > > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium > > to Bitstream Vera Sans > > > (/usr/lib64/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf) > > with score of 0.000000 > > > > > > Thank you all. > > Bye. > > > > > > > > > > > > Emanuele Passera > > > > Software Engineer > > > > Tele-Rilevamento Europa - T.R.E. srl > > Via Vittoria Colonna, 7 > > 20149 Milano – Italia > > Tel.: +39.02.4343.121 - Fax: +39.02.4343.1230 > > ema...@tr... <mailto:ema...@tr...> - > > www.treuropa.com <http://www.treuropa.com> > > > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Eric F. <ef...@ha...> - 2011-04-19 07:02:13
|
On 04/18/2011 12:46 AM, Emanuele Passera wrote: > Hello everybody, > > I am experiencing a strange behavior with the imshow() function when > using the nearest interpolation method. > > Executing the code listed below, I obtain a good image when using the > bilinear interpolation method > and a totally white image when using the nearest interpolation method. > I have attached the input data buffer and the resulting images too. > [...] > > I use matplotlib to generate a lot of images in batch mode and this > behavior appear not to be deterministic. It seems to depend on the input > data buffer. > Can anyone help me ? > > I use > Linux openSUSE 11.3 (x86_64) > Linux sat1 2.6.34.7-0.7-default #1 SMP 2010-12-13 11:13:53 +0100 x86_64 > x86_64 x86_64 GNU/Linux > Python 2.6.5 > numpy 1.5.1 > matplotlib 1.0.1 with backend Agg v2.2 > > > If it can be of some help this strange behavior does not appear with a > system > Linux Ubuntu 9.10 > Linux joshua 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC > 2009 i686 GNU/Linux > Python 2.6.4 > numpy 1.3.0 > matplotlib 0.99.0 with backend Agg v2.2 Nor does it appear on my system with mpl from git, but it does with mpl 1.0.1, so it looks like this is something that was broken temporarily in the 1.0 series but is now fixed. Eric > > Executing the script with verbosity I get the subsequent output > python /users/lelepass/python/test_imagesc/test.py --verbose-helpful > > $HOME=/users/lelepass > CONFIGDIR=/users/lelepass/.matplotlib > > Bad key "numerix" on line 30 in > /users/lelepass/.matplotlib/matplotlibrc. > You probably need to get an updated matplotlibrc file from > http://matplotlib.sf.net/_static/matplotlibrc or from the matplotlib source > distribution > matplotlib data path /usr/lib64/python2.6/site-packages/matplotlib/mpl-data > loaded rc file /users/lelepass/.matplotlib/matplotlibrc > matplotlib version 1.0.1 > verbose.level helpful > interactive is False > units is True > platform is linux2 > Using fontManager instance from /users/lelepass/.matplotlib/fontList.cache > backend agg version v2.2 > findfont: Matching > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium > to Bitstream Vera Sans > (/usr/lib64/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf) > with score of 0.000000 > > > Thank you all. > Bye. > > > > > > Emanuele Passera > > Software Engineer > > Tele-Rilevamento Europa - T.R.E. srl > Via Vittoria Colonna, 7 > 20149 Milano – Italia > Tel.: +39.02.4343.121 - Fax: +39.02.4343.1230 > ema...@tr... <mailto:ema...@tr...> - > www.treuropa.com <http://www.treuropa.com> > |
From: Mike M. <mmu...@py...> - 2011-04-18 23:14:16
|
Python Course in Golden, CO, USA ================================ Introduction to Python and Python for Scientists and Engineers -------------------------------------------------------------- June 3 - 4, 2011 Introduction to Python June 5, 2011 Python for Scientists and Engineers Both courses can be booked individually or together. Venue: Colorado School of Mines, Golden, CO (20 minutes west of Denver) Trainer: Mike Müller Target Audience --------------- The introductory course is designed for people with basic programming background. Since it is a general introduction to Python it is suitable for everybody interested in Python. The scientist's course assumes a working knowledge of Python. You will be fine if you take the two-day introduction before hand. The topics are of general interest for scientists and engineers. Even though some examples come from the groundwater modeling domain, they are easy to understand for people without prior knowledge in this field. About the Trainer ----------------- Mike Müller, has been teaching Python since 2004. He is the founder of Python Academy and regularly gives open and in-house Python courses as well as tutorials at PyCon US, OSCON, EuroSciPy and PyCon Asia-Pacific. More Information and Course Registration ---------------------------------------- http://igwmc.mines.edu/short-course/intro_python.html -- Mike mmu...@py... |
From: Daπid <dav...@gm...> - 2011-04-18 23:00:46
|
I have checked with all the interpolation modes and the only one that behaves badly is 'nearest'. There are them: http://dl.dropbox.com/u/1351211/Interpolation_modes.zip On Mon, Apr 18, 2011 at 12:46 PM, Emanuele Passera <ema...@tr...> wrote: > Hello everybody, > > I am experiencing a strange behavior with the imshow() function when > using the nearest interpolation method. > > Executing the code listed below, I obtain a good image when using the > bilinear interpolation method > and a totally white image when using the nearest interpolation method. > I have attached the input data buffer and the resulting images too. > > > import numpy as n > import pylab as p > > # input data > dataFile = "/users/lelepass/python/test_imagesc/buffer.float" > samples = 15 > lines = 39 > imagescCanvasXDim = 800 > imagescCanvasDpi = 100 > data_aspect_ratio = 0.75707855955290304 > vMin = -3.3467740682968197 > vMax = 0.65322593170318011 > outImageFileBilinear = > "/users/lelepass/python/test_imagesc/subpxAzBilinear.png" > outImageFileNearest = > "/users/lelepass/python/test_imagesc/subpxAzNearest.png" > > # loading input data file > s = file(dataFile, 'rb').read() > data = n.fromstring(s, 'f') > data.shape = lines, samples > data = n.transpose(data) > > # image canvas dimension setting > xAxisInches = float(imagescCanvasXDim) / float(imagescCanvasDpi) > yPixelsDim = imagescCanvasXDim * data_aspect_ratio > yAxisInches = float(yPixelsDim) / float(imagescCanvasDpi) > > ################################ > # bilinear image # > ################################ > # image canvas > canvasObj = p.figure(facecolor="w", edgecolor="w", figsize=(xAxisInches, > yAxisInches), frameon=True, dpi=imagescCanvasDpi) > # axis setting > axisLocationList = [0,0,1,1] > axisObj = canvasObj.add_axes(axisLocationList) > axisObj.axesPatch.set_alpha(1) > # colormap > colorMap = p.cm.jet_r > # bilinear image drawing > p.imshow(data, cmap=colorMap, vmin=vMin, vmax=vMax, > interpolation="bilinear", origin="lower", aspect="auto", alpha=1) > reversing = axisObj.set_ylim(axisObj.get_ylim()[::-1]) > # bilinear image saving and closing > canvasObj.savefig(outImageFileBilinear, dpi=imagescCanvasDpi) > p.close() > > ################################ > # nearest image # > ################################ > # image canvas > canvasObj = p.figure(facecolor="w", edgecolor="w", figsize=(xAxisInches, > yAxisInches), frameon=True, dpi=imagescCanvasDpi) > # axis setting > axisLocationList = [0,0,1,1] > axisObj = canvasObj.add_axes(axisLocationList) > axisObj.axesPatch.set_alpha(1) > # colormap > colorMap = p.cm.jet_r > # nearest image drawing > p.imshow(data, cmap=colorMap, vmin=vMin, vmax=vMax, interpolation="nearest", > origin="lower", aspect="auto", alpha=1) > reversing = axisObj.set_ylim(axisObj.get_ylim()[::-1]) > # nearest image saving and closing > canvasObj.savefig(outImageFileNearest, dpi=imagescCanvasDpi) > p.close() > > > > I use matplotlib to generate a lot of images in batch mode and this > behavior appear not to be deterministic. It seems to depend on the input > data buffer. > Can anyone help me ? > > I use > Linux openSUSE 11.3 (x86_64) > Linux sat1 2.6.34.7-0.7-default #1 SMP 2010-12-13 11:13:53 +0100 x86_64 > x86_64 x86_64 GNU/Linux > Python 2.6.5 > numpy 1.5.1 > matplotlib 1.0.1 with backend Agg v2.2 > > > If it can be of some help this strange behavior does not appear with a > system > Linux Ubuntu 9.10 > Linux joshua 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009 > i686 GNU/Linux > Python 2.6.4 > numpy 1.3.0 > matplotlib 0.99.0 with backend Agg v2.2 > > Executing the script with verbosity I get the subsequent output > python /users/lelepass/python/test_imagesc/test.py --verbose-helpful > > $HOME=/users/lelepass > CONFIGDIR=/users/lelepass/.matplotlib > > Bad key "numerix" on line 30 in > /users/lelepass/.matplotlib/matplotlibrc. > You probably need to get an updated matplotlibrc file from > http://matplotlib.sf.net/_static/matplotlibrc or from the matplotlib source > distribution > matplotlib data path /usr/lib64/python2.6/site-packages/matplotlib/mpl-data > loaded rc file /users/lelepass/.matplotlib/matplotlibrc > matplotlib version 1.0.1 > verbose.level helpful > interactive is False > units is True > platform is linux2 > Using fontManager instance from /users/lelepass/.matplotlib/fontList.cache > backend agg version v2.2 > findfont: Matching > :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium > to Bitstream Vera Sans > (/usr/lib64/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf) > with score of 0.000000 > > > Thank you all. > Bye. > > > > > > Emanuele Passera > > Software Engineer > > Tele-Rilevamento Europa - T.R.E. srl > Via Vittoria Colonna, 7 > 20149 Milano – Italia > Tel.: +39.02.4343.121 - Fax: +39.02.4343.1230 > ema...@tr... - www.treuropa.com > > > -- > This communication, that may contain confidential and/or legally privileged > information, is intended solely for the use of the intended addressees. > Opinions, conclusions and other information contained in this message, that > do not relate to the official business of this firm, shall be considered as > not given or endorsed by it. Every opinion or advice contained in this > communication is subject to the terms and conditions provided by the > agreement governing the engagement with such a client. If you have received > this communication in error, please notify us immediately by responding to > this email and then delete it from your system. Any use, disclosure, copying > or distribution of the contents of this communication by a not-intended > recipient or in violation of the purposes of this communication is strictly > prohibited and may be unlawful. > -- > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Eric F. <ef...@ha...> - 2011-04-18 19:09:29
|
On 04/18/2011 06:07 AM, Muffles wrote: > > Ive seen lots of examples around, but i cant seem to adapt any to my > implementation. > The only thing i want is to change what values the colorbar shows. In the > colorbar there are values from 1 to 1e+9, and im only interested in the > values from 1e+4 to 1e+9... > > pc = ax.pcolor(pr[2].transpose(),norm=LogNorm(vmin=1),cmap=cm.jet) Have you tried using vmin=1e4 above? > > ax.set_yticks(np.arange(0-(arr_agl[0]*escala)/1000, > (arr_agl[600]*escala)/1000, escala)) > ax.set_yticklabels(range(20)) > > ax.set_ylim(0, 600) > ax.set_xlim(0,len(valores2)) > ax.xaxis.LABELPAD = 18 > > for label in ax.get_xticklabels() + ax.get_yticklabels(): > label.set_fontsize(16) > > plt.xlabel('Time of Measurement',fontsize=16) > plt.ylabel('HEIGHT above ground level, km',fontsize=16) > > colorbar = fig.colorbar(pc) With the suggested change to vmin, you might want to use the colorbar kwarg extend='min'. Eric > > Thx... |
From: Michael D. <md...@st...> - 2011-04-18 17:16:11
|
Do you have a minimal script that reproduces this error? Cheers, Mike On 04/18/2011 07:37 AM, Muffles wrote: > Hello all, > I am getting this error, and im not very experienced with matplotlib, but in > most files this code worked, but in some i just get this error: > > Traceback (most recent call last): > File "/home/paoli/public_html/netcdf2png.py", line 128, in<module> > colorbar = fig.colorbar(pc) > File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 1022, > in colorbar > cb = cbar.Colorbar(cax, mappable, **kw) > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 616, > in __init__ > ColorbarBase.__init__(self, ax, **kw) > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 214, > in __init__ > self.draw_all() > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 225, > in draw_all > self._config_axes(X, Y) > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 252, > in _config_axes > ticks, ticklabels, offset_string = self._ticker() > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 388, > in _ticker > b = np.array(locator()) > File "/usr/lib/python2.5/site-packages/matplotlib/ticker.py", line 1006, > in __call__ > vmax = math.log(vmax)/math.log(b) > OverflowError: math range error > Traceback (most recent call last): > File "/home/paoli/public_html/netcdf2png.py", line 128, in<module> > colorbar = fig.colorbar(pc) > File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 1022, > in colorbar > cb = cbar.Colorbar(cax, mappable, **kw) > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 616, > in __init__ > ColorbarBase.__init__(self, ax, **kw) > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 214, > in __init__ > self.draw_all() > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 225, > in draw_all > self._config_axes(X, Y) > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 252, > in _config_axes > ticks, ticklabels, offset_string = self._ticker() > File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 388, > in _ticker > b = np.array(locator()) > File "/usr/lib/python2.5/site-packages/matplotlib/ticker.py", line 1006, > in __call__ > vmax = math.log(vmax)/math.log(b) > OverflowError: math range error > > > Is there any workaround? > Thx in advance! |
From: Muffles <dan...@gm...> - 2011-04-18 16:07:58
|
Ive seen lots of examples around, but i cant seem to adapt any to my implementation. The only thing i want is to change what values the colorbar shows. In the colorbar there are values from 1 to 1e+9, and im only interested in the values from 1e+4 to 1e+9... pc = ax.pcolor(pr[2].transpose(),norm=LogNorm(vmin=1),cmap=cm.jet) ax.set_yticks(np.arange(0-(arr_agl[0]*escala)/1000, (arr_agl[600]*escala)/1000, escala)) ax.set_yticklabels(range(20)) ax.set_ylim(0, 600) ax.set_xlim(0,len(valores2)) ax.xaxis.LABELPAD = 18 for label in ax.get_xticklabels() + ax.get_yticklabels(): label.set_fontsize(16) plt.xlabel('Time of Measurement',fontsize=16) plt.ylabel('HEIGHT above ground level, km',fontsize=16) colorbar = fig.colorbar(pc) Thx... -- View this message in context: http://old.nabble.com/Resize-the-colorbar-tp31425316p31425316.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Sebastian B. <seb...@si...> - 2011-04-18 14:27:25
|
Hello, don't know the foo behind it, but using ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d %H:%M:%S')) works. Regards, Sebastian On Sun, 2011-04-17 at 19:52 -0700, jfortiv wrote: > Hello, > > I'm trying to create a bar chart that looks something like a gannt chart... > > See the simple example here: > > http://www.promana.net/making-use-of-gantt-charts/ > > I'm trying to utilize barh() and fmt_xdata to accomplish this with the > following: > > #~~~~~~~~~~~~~~~~~~~~~~~ > > date1 = datetime.datetime( 2000, 3, 2) > date2 = datetime.datetime( 2000, 3, 6) > delta = datetime.timedelta(hours=6) > dates = mdates.drange(date1, date2, delta) > > val = mdates.drange(date1,date2,delta) # the bar lengths > pos = range(len(val)) # the bar centers on the y axis > height=0.5 # the bar height > left=mdates.drange(date1,date2,delta) # the bar starting position > > fig = plt.figure() > ax = fig.add_subplot(111) > ax.barh(pos,val,height=height,left=left,align='center',alpha=0.3) > ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d %H:%M:%S') > > #~~~~~~~~~~~~~~~~~~~~~~~ > > > Even with ax.fmt_xdata, I'm simply getting numbers on the x-axis instead of > dates. Can anyone offer some pointers? > > Thanks, > James |
From: Joe K. <jki...@wi...> - 2011-04-18 13:55:49
|
Actually, I think he's wanting a set aspect, right? Either way, it's just "aspect=1.5" or "aspect=0.6667" depending on the orientation he wants. On Mon, Apr 18, 2011 at 6:37 AM, Sebastian Berg <seb...@si...>wrote: > The solution is already the aspect='auto', ie: > > import numpy as np > from matplotlib import pyplot as plt > a = np.arange(100).reshape(10,10) > plt.imshow(a, aspect='auto') > > aspect='auto' is what you were looking for, the documentation (as you > probably already found is for example at: > > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow > or in interactive help. > > > On Sun, 2011-04-17 at 23:16 +0200, Paolo Zaffino wrote: > > Thanks for the reply. > > I checked in the help...I didn't understand what I must to use. > > Should you post me the link of the guide of this setting? > > Thanks! > > > > > > Il 16/04/2011 10:47, Sebastian Berg ha scritto: > > > Hello, > > > > > > check the help ;). you can set aspect='auto' or something fixed. > > > > > > Regards, > > > > > > Sebastian > > > > > > On Sat, 2011-04-16 at 10:43 +0200, Paolo Zaffino wrote: > > >> Hi at all, > > >> I have a numpy matrix (an image) and I'd like to show it. > > >> I thought to use show function, but I have a question. > > >> I don't want that the pixel have dimension 1x1 unit but I want for > > >> example 1X1.5 unit (I don't want a square but a rectangle). > > >> How can I do this? > > >> Thanks in advance. > > >> Paolo > > >> > > >> > ------------------------------------------------------------------------------ > > >> Benefiting from Server Virtualization: Beyond Initial Workload > > >> Consolidation -- Increasing the use of server virtualization is a top > > >> priority.Virtualization can reduce costs, simplify management, and > improve > > >> application availability and disaster protection. Learn more about > boosting > > >> the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev > > >> _______________________________________________ > > >> Matplotlib-users mailing list > > >> Mat...@li... > > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > >> > > > > > > > > > > ------------------------------------------------------------------------------ > > > Benefiting from Server Virtualization: Beyond Initial Workload > > > Consolidation -- Increasing the use of server virtualization is a top > > > priority.Virtualization can reduce costs, simplify management, and > improve > > > application availability and disaster protection. Learn more about > boosting > > > the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev > > > _______________________________________________ > > > Matplotlib-users mailing list > > > Mat...@li... > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > > ------------------------------------------------------------------------------ > > Benefiting from Server Virtualization: Beyond Initial Workload > > Consolidation -- Increasing the use of server virtualization is a top > > priority.Virtualization can reduce costs, simplify management, and > improve > > application availability and disaster protection. Learn more about > boosting > > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Sebastian B. <seb...@si...> - 2011-04-18 11:38:07
|
The solution is already the aspect='auto', ie: import numpy as np from matplotlib import pyplot as plt a = np.arange(100).reshape(10,10) plt.imshow(a, aspect='auto') aspect='auto' is what you were looking for, the documentation (as you probably already found is for example at: http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow or in interactive help. On Sun, 2011-04-17 at 23:16 +0200, Paolo Zaffino wrote: > Thanks for the reply. > I checked in the help...I didn't understand what I must to use. > Should you post me the link of the guide of this setting? > Thanks! > > > Il 16/04/2011 10:47, Sebastian Berg ha scritto: > > Hello, > > > > check the help ;). you can set aspect='auto' or something fixed. > > > > Regards, > > > > Sebastian > > > > On Sat, 2011-04-16 at 10:43 +0200, Paolo Zaffino wrote: > >> Hi at all, > >> I have a numpy matrix (an image) and I'd like to show it. > >> I thought to use show function, but I have a question. > >> I don't want that the pixel have dimension 1x1 unit but I want for > >> example 1X1.5 unit (I don't want a square but a rectangle). > >> How can I do this? > >> Thanks in advance. > >> Paolo > >> > >> ------------------------------------------------------------------------------ > >> Benefiting from Server Virtualization: Beyond Initial Workload > >> Consolidation -- Increasing the use of server virtualization is a top > >> priority.Virtualization can reduce costs, simplify management, and improve > >> application availability and disaster protection. Learn more about boosting > >> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Mat...@li... > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > > > > > ------------------------------------------------------------------------------ > > Benefiting from Server Virtualization: Beyond Initial Workload > > Consolidation -- Increasing the use of server virtualization is a top > > priority.Virtualization can reduce costs, simplify management, and improve > > application availability and disaster protection. Learn more about boosting > > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Muffles <dan...@gm...> - 2011-04-18 11:37:57
|
Hello all, I am getting this error, and im not very experienced with matplotlib, but in most files this code worked, but in some i just get this error: Traceback (most recent call last): File "/home/paoli/public_html/netcdf2png.py", line 128, in <module> colorbar = fig.colorbar(pc) File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 1022, in colorbar cb = cbar.Colorbar(cax, mappable, **kw) File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 616, in __init__ ColorbarBase.__init__(self, ax, **kw) File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 214, in __init__ self.draw_all() File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 225, in draw_all self._config_axes(X, Y) File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 252, in _config_axes ticks, ticklabels, offset_string = self._ticker() File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 388, in _ticker b = np.array(locator()) File "/usr/lib/python2.5/site-packages/matplotlib/ticker.py", line 1006, in __call__ vmax = math.log(vmax)/math.log(b) OverflowError: math range error Traceback (most recent call last): File "/home/paoli/public_html/netcdf2png.py", line 128, in <module> colorbar = fig.colorbar(pc) File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 1022, in colorbar cb = cbar.Colorbar(cax, mappable, **kw) File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 616, in __init__ ColorbarBase.__init__(self, ax, **kw) File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 214, in __init__ self.draw_all() File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 225, in draw_all self._config_axes(X, Y) File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 252, in _config_axes ticks, ticklabels, offset_string = self._ticker() File "/usr/lib/python2.5/site-packages/matplotlib/colorbar.py", line 388, in _ticker b = np.array(locator()) File "/usr/lib/python2.5/site-packages/matplotlib/ticker.py", line 1006, in __call__ vmax = math.log(vmax)/math.log(b) OverflowError: math range error Is there any workaround? Thx in advance! -- View this message in context: http://old.nabble.com/OverflowError%3A-math-range-error-tp31423048p31423048.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Muffles <dan...@gm...> - 2011-04-18 09:26:06
|
Hello all, i created some program to read from netcdf files and plot the data, and it seems to work ok. But when i try to run an older file, it just shows this: Traceback (most recent call last): File "netcdf2png.py", line 199, in <module> savefig("range.png") File "/usr/lib/pymodules/python2.6/matplotlib/pyplot.py", line 356, in savefig return fig.savefig(*args, **kwargs) File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 1032, in savefig self.canvas.print_figure(*args, **kwargs) File "/usr/lib/pymodules/python2.6/matplotlib/backend_bases.py", line 1476, in print_figure **kwargs) File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", line 358, in print_png FigureCanvasAgg.draw(self) File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", line 314, in draw self.figure.draw(self.renderer) File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 773, in draw for a in self.axes: a.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 1735, in draw a.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/collections.py", line 704, in draw return Collection.draw(self, renderer) File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib/pymodules/python2.6/matplotlib/collections.py", line 201, in draw self.update_scalarmappable() File "/usr/lib/pymodules/python2.6/matplotlib/collections.py", line 477, in update_scalarmappable self._facecolors = self.to_rgba(self._A, self._alpha) File "/usr/lib/pymodules/python2.6/matplotlib/cm.py", line 166, in to_rgba x = self.norm(x) File "/usr/lib/pymodules/python2.6/matplotlib/colors.py", line 825, in __call__ raise ValueError("minvalue must be less than or equal to maxvalue") ValueError: minvalue must be less than or equal to maxvalue Any ideas? Thx in advance -- View this message in context: http://old.nabble.com/%22minvalue-must-be-less-than-or-equal-to-maxvalue%22-error-tp31422145p31422145.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Eli B. <eb...@gm...> - 2011-04-18 07:08:21
|
Hello, Suppose I create a matplotlib figure and plot things in it. In pylab it would be like: from pylab import * figure(1) plot([1,2,3],[1,2,3],'r*',label='label1') plot([1,2,3],[2,3,4],'r',label='label2') legend(loc='upper right') text(1.2,3,'nice figure') xlabel('xlabel') ylabel('ylabel') show() Now, after creating figure(1), I would like to make figure(2) that is completely identical to figure(1). is this possible? Does anyone know how? Thanks, Eli |
From: <bu...@gm...> - 2011-04-18 04:13:15
|
Hi Eric, Thanks for the quick fix. I can confirm it works for me (on windows with PyQt4.7). The problem reported with TkAgg was possibly a mistake, as I am unable to reproduce it now... Please consider the issue solved. Re: Constrained zoom to x axis broken ? by efiring Apr 17, 2011; 11:14pm :: Rate this Message: - Use ratings to moderate (?) Reply | Print | View Threaded | Show Only this Message On 04/17/2011 07:59 AM, Eric Firing wrote: > On 04/16/2011 08:44 PM, butterw@... wrote: >> > > http://matplotlib.sourceforge.net/users/navigation_toolbar.html >> Constrained zoom to x axis (hold x key + left click zoom icon) is broken >> for me with master. >> Tested with TkAgg, Qt4Agg backend >> features was working on mpl 1.0.0 > It works for me with gtk and Tk, but not with qt4. > Eric ... [show rest of quote] https://github.com/matplotlib/matplotlib/pull/86 Above is a fix for qt4. Eric ------------------------------------------------------------------------------ |
From: jfortiv <jf...@gm...> - 2011-04-18 02:52:45
|
Hello, I'm trying to create a bar chart that looks something like a gannt chart... See the simple example here: http://www.promana.net/making-use-of-gantt-charts/ I'm trying to utilize barh() and fmt_xdata to accomplish this with the following: #~~~~~~~~~~~~~~~~~~~~~~~ date1 = datetime.datetime( 2000, 3, 2) date2 = datetime.datetime( 2000, 3, 6) delta = datetime.timedelta(hours=6) dates = mdates.drange(date1, date2, delta) val = mdates.drange(date1,date2,delta) # the bar lengths pos = range(len(val)) # the bar centers on the y axis height=0.5 # the bar height left=mdates.drange(date1,date2,delta) # the bar starting position fig = plt.figure() ax = fig.add_subplot(111) ax.barh(pos,val,height=height,left=left,align='center',alpha=0.3) ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d %H:%M:%S') #~~~~~~~~~~~~~~~~~~~~~~~ Even with ax.fmt_xdata, I'm simply getting numbers on the x-axis instead of dates. Can anyone offer some pointers? Thanks, James -- View this message in context: http://old.nabble.com/Date-format-the-x-axis-of-a-barh%28%29-plot--tp31420395p31420395.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Paolo Z. <p.z...@ya...> - 2011-04-17 21:17:03
|
Thanks for the reply. I checked in the help...I didn't understand what I must to use. Should you post me the link of the guide of this setting? Thanks! Il 16/04/2011 10:47, Sebastian Berg ha scritto: > Hello, > > check the help ;). you can set aspect='auto' or something fixed. > > Regards, > > Sebastian > > On Sat, 2011-04-16 at 10:43 +0200, Paolo Zaffino wrote: >> Hi at all, >> I have a numpy matrix (an image) and I'd like to show it. >> I thought to use show function, but I have a question. >> I don't want that the pixel have dimension 1x1 unit but I want for >> example 1X1.5 unit (I don't want a square but a rectangle). >> How can I do this? >> Thanks in advance. >> Paolo >> >> ------------------------------------------------------------------------------ >> Benefiting from Server Virtualization: Beyond Initial Workload >> Consolidation -- Increasing the use of server virtualization is a top >> priority.Virtualization can reduce costs, simplify management, and improve >> application availability and disaster protection. Learn more about boosting >> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Adam M. <ram...@gm...> - 2011-04-17 15:07:18
|
Hi On the homepage, http://matplotlib.sourceforge.net, matplotlib-1.0.0 is still being listed as the latest available version in the News sidebar. Is there any reason why 1.0.1 is not listed here? Cheers Adam |