SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(3)
2
(1)
3
(3)
4
(8)
5
(5)
6
(1)
7
(16)
8
(7)
9
(29)
10
(16)
11
(8)
12
(8)
13
(1)
14
(17)
15
(15)
16
(23)
17
(20)
18
(25)
19
(2)
20
(3)
21
(12)
22
(6)
23
(11)
24
(6)
25
(3)
26
27
(2)
28
(4)
29
(19)
30
(5)
31
(33)


Showing results of 310

<< < 1 .. 10 11 12 13 > >> (Page 12 of 13)
From: Rich S. <rsh...@ap...> - 2008年01月07日 22:48:34
On Mon, 7 Jan 2008, John Hunter wrote:
> The function is document
> http://matplotlib.sourceforge.net/matplotlib.pyplot.html#-hold and the
> usage in the "Simple Plots" Section 3.1 of the User's Guide at
> http://matplotlib.sourceforge.net/users_guide_0.91.2svn.pdf . The hold
> functionality is part of the state-machine interface inherited from
> matlab, where plotting commands are targets to the current axes in the
> current figure, and overbplotting is controlled by the "hold" state. Se
> also, "ishold"
 Thank you John and Darren.
Rich
-- 
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
From: Jeff W. <js...@fa...> - 2008年01月07日 22:39:49
John Hunter wrote:
> On Jan 7, 2008 2:15 PM, Jeff Whitaker <js...@fa...> wrote:
>
> 
>> I think namespace packages were being used before, but were removed. I
>> don't remember why.
>> 
>
> We removed the namespace packages support because we were using it
> improperly. To do it correctly would require moving all of the
> functionality out of matplotlib/__init__.py. Since there is currently
> a fair amount of functionality there, adding namespace support would
> require moving it and breaking the current API. In addition, there are
> some ongoing issues with performance and namespace packages. Because
> of this, we had some ambivalence about namespace packages and decided
> to remove the broken support until we could add proper support, if we
> decide to go that route. A good time to do that, if indeed we want
> to, would be when we release Michael's transforms branch, so we can
> break as much as possible at once.
>
> JDH
> 
John: OK, then I can think of two options for basemap in the interim:
1) remove setuptools support, since basemap cannot be installed as an 
egg without namespace packages. This means that python2.3 support would 
have to be dropped. 
2) move the toolkits to basemap_toolkits, as Philip Eby suggested, and 
make matplotlib_toolkits a namespace package. Unfortunately, this may 
break lots of existing code.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: John H. <jd...@gm...> - 2008年01月07日 22:30:39
On Jan 7, 2008 2:15 PM, Jeff Whitaker <js...@fa...> wrote:
> I think namespace packages were being used before, but were removed. I
> don't remember why.
We removed the namespace packages support because we were using it
improperly. To do it correctly would require moving all of the
functionality out of matplotlib/__init__.py. Since there is currently
a fair amount of functionality there, adding namespace support would
require moving it and breaking the current API. In addition, there are
some ongoing issues with performance and namespace packages. Because
of this, we had some ambivalence about namespace packages and decided
to remove the broken support until we could add proper support, if we
decide to go that route. A good time to do that, if indeed we want
to, would be when we release Michael's transforms branch, so we can
break as much as possible at once.
JDH
From: Jeff W. <js...@fa...> - 2008年01月07日 22:23:45
Fought, Richard wrote:
>>> Hi Jeff,
>>>
>>> Thanks for your response. I might be able to upgrade my prototype 
>>> machine to Python 2.4, but I'm not sure about my customer's box.
>>>
>>> Here is the listing from
>>>
>>> 
>> python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686.egg/matp
>> 
>>> lo
>>> tlib/toolkits:
>>>
>>> __init__.py
>>> __init__.pyc
>>>
>>> Regards,
>>> Rich Fought
>>> 
>>> 
>> Rich: That's it? I expected to see a basemap directory 
>> installed there. Can you send me a listing of the basemap 
>> directory in site-packages?
>>
>> -Jeff
>>
>> 
>
> Directory listing of
> python2.3/site-packages/basemap-0.9.9-py2.3-linux-i686.egg :
>
> drwxr-xr-x 4 root root 4096 Jan 4 17:33 dap
> drwxr-xr-x 2 root root 4096 Jan 4 17:33 dbflib
> -rwxr-xr-x 1 root root 258 Jan 4 17:33 dbflibc.py
> -rwxr-xr-x 1 root root 614 Jan 4 17:33 dbflibc.pyc
> -rwxr-xr-x 1 root root 74526 Jan 4 17:33 dbflibc.so
> drwxr-xr-x 2 root root 4096 Jan 4 17:33 EGG-INFO
> -rwxr-xr-x 1 root root 256 Jan 4 17:33 _geos.py
> -rwxr-xr-x 1 root root 608 Jan 4 17:33 _geos.pyc
> -rwxr-xr-x 1 root root 88557 Jan 4 17:33 _geos.so
> drwxr-xr-x 2 root root 4096 Jan 4 17:33 httplib2
> drwxr-xr-x 3 root root 4096 Jan 4 17:33 matplotlib
> drwxr-xr-x 2 root root 4096 Jan 4 17:33 shapelib
> -rwxr-xr-x 1 root root 260 Jan 4 17:33 shapelibc.py
> -rwxr-xr-x 1 root root 620 Jan 4 17:33 shapelibc.pyc
> -rwxr-xr-x 1 root root 92671 Jan 4 17:33 shapelibc.so
> -rwxr-xr-x 1 root root 258 Jan 4 17:33 shptree.py
> -rwxr-xr-x 1 root root 614 Jan 4 17:33 shptree.pyc
> -rwxr-xr-x 1 root root 19958 Jan 4 17:33 shptree.so
>
> As you can see, there is a matplotlib folder here with the following
> structure:
>
> matplotlib
> |_toolkits
> |_basemap
>
> I created a symbolic link to this basemap directory in the
> matplotlib/toolkits directory and simpletest.py works now, though I
> still get the warning message
>
> /usr/lib/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686.e
> gg/pytz/ __init__.py:29: UserWarning: Module matplotlib was already
> imported from /usr/li
> b/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686.egg/matp
> lotlib/_ _init__.pyc, but
> /usr/lib/python2.3/site-packages/basemap-0.9.9-py2.3-linux-i686 .egg is
> being added to sys.path
> from pkg_resources import resource_stream
>
> I guess the basemap installer just installed the toolkit in the wrong
> place.
>
> Regards,
> Rich
> 
Rich: I think this is happening because matplotlib (and the basemap 
toolkit) needs to use namespace packages 
(http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages) 
in order for the basemap stuff to be picked up from the 
matplotlib.toolkits namespace when basemap is installed as an egg. If 
it's installed using distutils (instead of setuptools), the basemap 
stuff just gets written in the matplotlib toolkits directory directly, 
and everything works fine.
I think namespace packages were being used before, but were removed. I 
don't remember why.
Until we get this fixed, I think your symlink trick is the only way to 
get it to work with python2.3. The warning message appears to be harmless.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Jeff W. <js...@fa...> - 2008年01月07日 21:56:22
Fought, Richard wrote:
> 
>
> 
>> -----Original Message-----
>> From: Jeff Whitaker [mailto:js...@fa...] 
>> Sent: Monday, January 07, 2008 1:26 PM
>> To: Fought, Richard
>> Cc: mat...@li...
>> Subject: Re: [Matplotlib-users] Basemap installation question
>>
>> Fought, Richard wrote:
>> 
>>> Hi all,
>>>
>>> I'm trying to set up matplotlib with basemap on CentOS 4.6 
>>> 
>> with python
>> 
>>> 2.3.4
>>>
>>> I installed setuptools 0.6c7, then numpy 1.0.4, then matplotlib 
>>> 0.91.1_r0, then basemap 0.9.9 (building and installing the GEOS 
>>> library from source). When I try to run the example simpletest.py 
>>> script, I get the following message:
>>>
>>>
>>> 
>> /usr/lib/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686
>> 
>>> .e
>>> gg/pytz/__init__.py:29: UserWarning: Module matplotlib was already 
>>> imported from 
>>>
>>> 
>> /usr/lib/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686
>> 
>>> .e
>>> gg/matplotlib/__init__.pyc, but
>>>
>>> 
>> /usr/lib/python2.3/site-packages/basemap-0.9.9-py2.3-linux-i68
>> 6.egg is 
>> 
>>> being added to sys.path
>>> from pkg_resources import resource_stream Traceback (most recent 
>>> call last):
>>> File "simpletest.py", line 1, in ?
>>> from matplotlib.toolkits.basemap import Basemap
>>> ImportError: No module named basemap
>>>
>>> Any ideas what might have gone wrong? I was expecting basemap to 
>>> install under /site-packages/matplotlib/toolkits but it installed 
>>> under a site-package of it's own.
>>>
>>> Thanks,
>>> Rich
>>> 
>>> 
>> Rich: Unfortunately, I've no idea what's wrong and don't 
>> have 2.3 to test on. The install process for 2.3 is a bit 
>> different in that it uses setuptools to substitute for 
>> features in distutils that didn't appear until python 2.4. 
>> Can you easily upgrade to 2.4? If not, can you send a listing 
>> of site-packages/matplotlib/toolkits to me, off-list?
>>
>> -Jeff
>> 
>
> Hi Jeff,
>
> Thanks for your response. I might be able to upgrade my prototype
> machine to Python 2.4, but I'm not sure about my customer's box.
>
> Here is the listing from
> python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686.egg/matplo
> tlib/toolkits:
>
> __init__.py
> __init__.pyc
>
> Regards,
> Rich Fought
> 
Richard: I've confirmed your problem - in fact, it occurs whenever 
setuptools is used (and the package is installed as an egg), This 
happens by default with python2.3, but only if you use setupegg.py for 
python2.4 and python2.5. I haven't figured out why yet - perhaps 
someone on the list who knows more about eggs will chime in.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: John H. <jd...@gm...> - 2008年01月07日 21:54:13
On Jan 7, 2008 1:43 PM, Rich Shepard <rsh...@ap...> wrote:
> On Mon, 7 Jan 2008, Darren Dale wrote:
>
> > you can call hold(True) so each call to plot() adds a new curve to the axes.
>
> Darren,
>
> Excellent! Where is this documented, please? I did not see it when I
> looked in the docs.
The function is document
http://matplotlib.sourceforge.net/matplotlib.pyplot.html#-hold and the
usage in the "Simple Plots" Section 3.1 of the User's Guide at
http://matplotlib.sourceforge.net/users_guide_0.91.2svn.pdf . The
hold functionality is part of the state-machine interface inherited
from matlab, where plotting commands are targets to the current axes
in the current figure, and overbplotting is controlled by the "hold"
state. Se also, "ishold"
JDH
From: Darren D. <dar...@co...> - 2008年01月07日 21:50:00
On Monday 07 January 2008 04:43:26 pm Rich Shepard wrote:
> On Mon, 7 Jan 2008, Darren Dale wrote:
> > you can call hold(True) so each call to plot() adds a new curve to the
> > axes.
>
> Darren,
>
> Excellent! Where is this documented, please? I did not see it when I
> looked in the docs.
See section 3.1 in the users guide: 
http://matplotlib.sourceforge.net/users_guide_0.91.2svn.pdf
From: Rich S. <rsh...@ap...> - 2008年01月07日 21:44:26
On Mon, 7 Jan 2008, Darren Dale wrote:
> you can call hold(True) so each call to plot() adds a new curve to the axes.
Darren,
 Excellent! Where is this documented, please? I did not see it when I
looked in the docs.
> Agg does not produce jpg. Can you live with a png? png are not lossy and
> so they yield much nicer line art than jpgs. Just give your filename a
> .png extension and save will recognize the format.
 Yes, a .png image can be incorporated into a .pdf file as easily as can a
.jpg impage.
Thank you very much,
Rich
-- 
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
From: <jd...@eo...> - 2008年01月07日 21:29:02
Eric Firing wrote:
> thread is a standard python module, part of the basic python
distribution. > I don't know why it is not being found. If you start
python on a command > line, can you import thread?
No, I can't. Apparently whoever installed this version of python (it's on
a cluster I've got time on) didn't compile the thread module. If you
don't use the thread module, there's a drop-in replacement called
dummy_thread instead--I went into the install files and changed every
instance of
import thread
to
try:
 import thread
except:
 import dummy_thread
Then installed and it worked fine. At least, everything I've tried to do
with it so far works fine.
Jordan
From: Darren D. <dar...@co...> - 2008年01月07日 21:20:45
On Monday 07 January 2008 03:05:30 pm Rich Shepard wrote:
> I've looked at all the docs I can find on the matplotlib web site
> without finding the answers to two questions. Pointers to references are
> greatly appreciated.
>
> 1) I want to plot a series of curves on the same set of axes. For
> example, shoulder- and trapezoidal curves:
>
> 	 _______ __________ _______
>
> 	| \ / \ /
> 	| \ / \ /
> 	| \ / \ /
> 	| \ / \ /
> 	| \/ \/
> 	| /\ /\
> 	| / \ / \
> 	| / \ / \
> 	| / \ / \
> 	|_______/________\__________/________\_______
>
> With labels and text, of course. Each curve represents values in a separate
> row of the database table.
>
> How do I specify that subsequent curves are to be plotted on the same
> axes as the first one?
you can call hold(True) so each call to plot() adds a new curve to the axes.
>
> 2) When each plot is created I want to save it as a .jpg file so it can
> be included in a ReportLab report. Do I specify the filename and extension
> in the save() command, or is there a different way?
Agg does not produce jpg. Can you live with a png? png are not lossy and so 
they yield much nicer line art than jpgs. Just give your filename a .png 
extension and save will recognize the format.
Darren
From: Rich S. <rsh...@ap...> - 2008年01月07日 20:06:11
 I've looked at all the docs I can find on the matplotlib web site without
finding the answers to two questions. Pointers to references are greatly
appreciated.
 1) I want to plot a series of curves on the same set of axes. For
example, shoulder- and trapezoidal curves:
 	 _______ __________ _______
 	| \ / \ /
 	| \ / \ /
 	| \ / \ /
 	| \ / \ /
 	| \/ \/
 	| /\ /\
 	| / \ / \
 	| / \ / \
 	| / \ / \
 	|_______/________\__________/________\_______
With labels and text, of course. Each curve represents values in a separate
row of the database table.
 How do I specify that subsequent curves are to be plotted on the same axes
as the first one?
 2) When each plot is created I want to save it as a .jpg file so it can
be included in a ReportLab report. Do I specify the filename and extension
in the save() command, or is there a different way?
Rich
-- 
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
From: Jeff W. <js...@fa...> - 2008年01月07日 19:26:15
Fought, Richard wrote:
> Hi all,
>
> I'm trying to set up matplotlib with basemap on CentOS 4.6 with python
> 2.3.4
>
> I installed setuptools 0.6c7, then numpy 1.0.4, then matplotlib
> 0.91.1_r0, then basemap 0.9.9 (building and installing the GEOS library
> from source). When I try to run the example simpletest.py script, I get
> the following message:
>
> /usr/lib/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686.e
> gg/pytz/__init__.py:29: UserWarning: Module matplotlib was already
> imported from
> /usr/lib/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686.e
> gg/matplotlib/__init__.pyc, but
> /usr/lib/python2.3/site-packages/basemap-0.9.9-py2.3-linux-i686.egg is
> being added to sys.path
> from pkg_resources import resource_stream
> Traceback (most recent call last):
> File "simpletest.py", line 1, in ?
> from matplotlib.toolkits.basemap import Basemap
> ImportError: No module named basemap
>
> Any ideas what might have gone wrong? I was expecting basemap to
> install under /site-packages/matplotlib/toolkits but it installed under
> a site-package of it's own.
>
> Thanks,
> Rich
> 
Rich: Unfortunately, I've no idea what's wrong and don't have 2.3 to 
test on. The install process for 2.3 is a bit different in that it uses 
setuptools to substitute for features in distutils that didn't appear 
until python 2.4. Can you easily upgrade to 2.4? If not, can you send a 
listing of site-packages/matplotlib/toolkits to me, off-list?
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: John H. <jd...@gm...> - 2008年01月07日 18:59:53
We have uploaded source and binary releases of matplotlib-0.91.2 to
http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474&release_id=566411.
Thanks to Charlie Moad for doing the release.
This is a bugfix release and includes several important fixes listed
below.
2008年01月06日 Released 0.91.2 at revision 4802
2007年12月26日 Reduce too-late use of matplotlib.use() to a warning
 instead of an exception, for backwards compatibility - EF
2007年12月25日 Fix bug in errorbar, identified by Noriko Minakawa - EF
2007年12月25日 Changed masked array importing to work with the upcoming
 numpy 1.05 (now the maskedarray branch) as well as with
 earlier versions. - EF
2007年12月16日 rec2csv saves doubles without losing precision. Also, it
 does not close filehandles passed in open. - JDH,ADS
2007年12月13日 Moved rec2gtk to matplotlib.toolkits.gtktools and rec2excel
 to matplotlib.toolkits.exceltools - JDH
2007年12月12日 Support alpha-blended text in the Agg and Svg backends -
 MGD
2007年12月10日 Fix SVG text rendering bug. - MGD
2007年12月10日 Increase accuracy of circle and ellipse drawing by using an
 8-piece bezier approximation, rather than a 4-piece one.
 Fix PDF, SVG and Cairo backends so they can draw paths
 (meaning ellipses as well). - MGD
2007年12月07日 Issue a warning when drawing an image on a non-linear axis. - MGD
2007年12月06日 let widgets.Cursor initialize to the lower x and y bounds
 rather than 0,0, which can cause havoc for dates and other
 transforms - DSD
2007年12月06日 updated references to mpl data directories for py2exe - DSD
2007年12月06日 fixed a bug in rcsetup, see bug 1845057 - DSD
2007年12月05日 Fix how fonts are cached to avoid loading the same one
multiple times.
 (This was a regression since 0.90 caused by the refactoring of
 font_manager.py) - MGD
2007年12月05日 Support arbitrary rotation of usetex text in Agg backend. - MGD
2007年12月04日 Support '|' as a character in mathtext - MGD
From: Fought, R. <ric...@gd...> - 2008年01月07日 16:30:35
Hi all,
I'm trying to set up matplotlib with basemap on CentOS 4.6 with python
2.3.4
I installed setuptools 0.6c7, then numpy 1.0.4, then matplotlib
0.91.1_r0, then basemap 0.9.9 (building and installing the GEOS library
from source). When I try to run the example simpletest.py script, I get
the following message:
/usr/lib/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686.e
gg/pytz/__init__.py:29: UserWarning: Module matplotlib was already
imported from
/usr/lib/python2.3/site-packages/matplotlib-0.91.1_r0-py2.3-linux-i686.e
gg/matplotlib/__init__.pyc, but
/usr/lib/python2.3/site-packages/basemap-0.9.9-py2.3-linux-i686.egg is
being added to sys.path
 from pkg_resources import resource_stream
Traceback (most recent call last):
 File "simpletest.py", line 1, in ?
 from matplotlib.toolkits.basemap import Basemap
ImportError: No module named basemap
Any ideas what might have gone wrong? I was expecting basemap to
install under /site-packages/matplotlib/toolkits but it installed under
a site-package of it's own.
Thanks,
Rich
From: Michael F. <wet...@ya...> - 2008年01月06日 21:26:45
I am trying to generate a separate, large plot, from a click on a single smaller subplot that is one of 8 plots in a figure I generate. I am generating the 8 plots fine and can "capture" event.inaxes and/or event.canvas instances but they only refer to a location. How do I use this location (or something else) to replot the information from the physically small sized subplot to a larger plot that I want the user to be able to see?
Other constraints/issues:
+ I did see a discussion thread on using keys and "f" for a full screen view of??. However, the start of the thread was not clear to me and I was not sure how to get started. Is there an example or method that I can use that would give me such a full screen view from a subplot using "f"? This probably serves my purposes.
+ I am a newbie to python and have a mix of OO code with classes and older procedural code (from my Fortran days). I am still adjusting to how to create classes and use them effectively so if this is the solution path, I may need more specifics than normal. 
+ I prefer to use version 0.90 because of a "new" issues with .91.1 and py2exe I am trying to work out/understand.
 ____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page. 
http://www.yahoo.com/r/hs 
From: John H. <jd...@gm...> - 2008年01月05日 21:36:50
On Jan 5, 2008 2:15 PM, Alan G Isaac <ai...@am...> wrote:
> It appears from the documentation that
> ``prop`` for a legend is the same as
> ``fontproperties`` for a label.
>
> If true, perhaps legend should accept
> ``fontproperties`` and perhaps slowly
> deprecate prop?
Yes they are the same thing, and using the same name makes sense.
After the 0.91.2 release, we can deprecate the prop usage.
From: Alan G I. <ai...@am...> - 2008年01月05日 20:14:27
It appears from the documentation that
``prop`` for a legend is the same as
``fontproperties`` for a label.
If true, perhaps legend should accept
``fontproperties`` and perhaps slowly
deprecate prop?
If false, what's the diff?
Thank you,
Alan Isaac
From: Jack S. <jac...@gm...> - 2008年01月05日 17:47:14
Thanks guys! You can also just skip a step and go:
gca().fmt_xdata = str
gca().fmt_ydata = str
:)
I changed it in Axes.py. It would be cool if there was something in
matplotlibrc, but now that I understand how it works, it's no biggy to
me.
Take care,
Jack
On Jan 4, 2008 9:18 AM, John Hunter <jd...@gm...> wrote:
> On Jan 4, 2008 7:32 AM, Michael Droettboom <md...@st...> wrote:
> > You can also set a custom formatter for each axis without hacking the
> > matplotlib code::
> >
> > def custom_formatter(value):
> > return str(value)
> >
> > gca().fmt_xdata = custom_formatter
> > gca().fmt_ydata = custom_formatter
> >
> > We may want to add a cleaner (more obvious) API for this -- but there
> > might be good reasons that it works this way that I just don't know about.
>
>
> There is no particularly good reason and it is not terribly consistent
> with the rest of the API, which tends to use function calls more than
> attribute settings. It works well enough and there is plenty of code
> (mine for example) that utilizes it. The major problem is that it is
> not easy for users to find.
>
> JDH
>
From: Eric F. <ef...@ha...> - 2008年01月05日 07:49:03
Jordan Dawe wrote:
> Ok, I compiled matplotlib from source, and installed it into my home 
> directory. import matplotlib works fine, but from pylab import * returns
> 
> >>> from pylab import *
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/users/freedryk//lib/python/pylab.py", line 1, in <module>
> from matplotlib.pylab import *
> File "/home/users/freedryk//lib/python/matplotlib/pylab.py", line 208, 
> in <module>
> from matplotlib import mpl # pulls in most modules
> File "/home/users/freedryk//lib/python/matplotlib/mpl.py", line 4, in 
> <module>
> from matplotlib import axes
> File "/home/users/freedryk//lib/python/matplotlib/axes.py", line 18, 
> in <module>
> from matplotlib import dates as mdates
> File "/home/users/freedryk//lib/python/matplotlib/dates.py", line 91, 
> in <module>
> from dateutil.rrule import rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, \
> File "/home/users/freedryk//lib/python/dateutil/rrule.py", line 13, in 
> <module>
> import thread
> ImportError: No module named thread
> 
> Any hints? I have my PYTHONPATH set to /home/users/freedryk/lib/python, 
> do I need another path in there?
Jordan,
thread is a standard python module, part of the basic python 
distribution. I don't know why it is not being found. If you start 
python on a command line, can you import thread?
Eric
From: Jordan D. <jd...@eo...> - 2008年01月05日 00:40:00
Ok, I compiled matplotlib from source, and installed it into my home 
directory. import matplotlib works fine, but from pylab import * returns
 >>> from pylab import *
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/home/users/freedryk//lib/python/pylab.py", line 1, in <module>
 from matplotlib.pylab import *
 File "/home/users/freedryk//lib/python/matplotlib/pylab.py", line 208, 
in <module>
 from matplotlib import mpl # pulls in most modules
 File "/home/users/freedryk//lib/python/matplotlib/mpl.py", line 4, in 
<module>
 from matplotlib import axes
 File "/home/users/freedryk//lib/python/matplotlib/axes.py", line 18, 
in <module>
 from matplotlib import dates as mdates
 File "/home/users/freedryk//lib/python/matplotlib/dates.py", line 91, 
in <module>
 from dateutil.rrule import rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, \
 File "/home/users/freedryk//lib/python/dateutil/rrule.py", line 13, in 
<module>
 import thread
ImportError: No module named thread
Any hints? I have my PYTHONPATH set to /home/users/freedryk/lib/python, 
do I need another path in there?
Jordan
From: Mephisto <dr_...@ho...> - 2008年01月04日 22:33:35
For some simple but effective Python code you can use to create a mask
similar to that provided by the Matlab roipoly function, see 
http://www.ariel.com.au/a/python-point-int-poly.html
http://www.ariel.com.au/a/python-point-int-poly.html . The code seems to be
quite effective.
Venkat Ramanan wrote:
> 
> Hi,
> 
> I'm looking for something analogous to Matlab's ginput() and roipoly().
> 
> ginput() basically displays a crosshair on the current figure and allows 
> us to select points by clicking on it. It returns the x,y coordinates of 
> the points.
> 
> roipoly() allows us to define a polygon by clicking on the figure and 
> returns a logical matrix, where ones represent the insides of the 
> polygon and zeros outside.
> 
> Any pointers are appreciated.
> 
> I recently found matplotlib and started porting some of my Matlab 
> scripts to it.
> 
> Ubuntu feisty (7.04), matplotlib 0.87.7. I can upgrade though.
> 
> Thanks,
> Venkat.
> 
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell. From the desktop to the data center, Linux is going
> mainstream. Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/Cross-hair-and-polygon-drawing-tools.-tp14199642p14626348.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: John H. <jd...@gm...> - 2008年01月04日 15:18:50
On Jan 4, 2008 7:32 AM, Michael Droettboom <md...@st...> wrote:
> You can also set a custom formatter for each axis without hacking the
> matplotlib code::
>
> def custom_formatter(value):
> return str(value)
>
> gca().fmt_xdata = custom_formatter
> gca().fmt_ydata = custom_formatter
>
> We may want to add a cleaner (more obvious) API for this -- but there
> might be good reasons that it works this way that I just don't know about.
There is no particularly good reason and it is not terribly consistent
with the rest of the API, which tends to use function calls more than
attribute settings. It works well enough and there is plenty of code
(mine for example) that utilizes it. The major problem is that it is
not easy for users to find.
JDH
From: Michael D. <md...@st...> - 2008年01月04日 14:32:12
Between 0.90 and 0.91, the SVG backend was changed to store the glyph 
outlines of the characters in the SVG file itself. (This is on by 
default, but can be turned off with the rc parameter 
svg.embed_char_paths). This helps make the SVG files much more 
portable, as the need to install the math fonts has long been a FAQ on 
this list. I've been doing all my testing with Firefox and Inkscape. 
Is there a simple Qt-based SVG viewer I could add to my testing regimen?
I won't pretend to be an expert on the SVG spec, but it does say this:
<http://www.w3.org/TR/SVG/struct.html#Head>
====
To provide some SVG user agents with an opportunity to implement 
efficient implementations in streaming environments, creators of SVG 
content are encouraged to place all elements which are targets of local 
URI references within a 'defs' element which is a direct child of one of 
the ancestors of the referencing element. For example:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="8cm" height="3cm"
 xmlns="http://www.w3.org/2000/svg">
 <desc>Local URI references within ancestor's 'defs' element.</desc>
 <defs>
 <linearGradient id="Gradient01">
 <stop offset="20%" stop-color="#39F" />
 <stop offset="90%" stop-color="#F3F" />
 </linearGradient>
 </defs>
 <rect x="1cm" y="1cm" width="6cm" height="1cm"
 fill="url(#Gradient01)" />
 <!-- Show outline of canvas using 'rect' element -->
 <rect x=".01cm" y=".01cm" width="7.98cm" height="2.98cm"
 fill="none" stroke="blue" stroke-width=".02cm" />
</svg>
View this example as SVG (SVG-enabled browsers only)
In the document above, the linear gradient is defined within a 'defs' 
element which is the direct child of the 'svg' element, which in turn is 
an ancestor of the 'rect' element which references the linear gradient. 
Thus, the above document conforms to the guideline.
====
So we are complying to that part of the spec. The spec doesn't seem to 
say anything about whether the defs must appear before or after their 
use -- but maybe I just can't find the relevant paragraph.
In any case, this should be easy enough to fix on matplotlib's end, and 
certainly won't break compliance with the spec. I'll have a look, and 
may come back to you for help with testing with Qt if you don't mind.
Cheers,
Mike
Christiaan Putter wrote:
> Hi there,
> 
> Just an update regarding the svg problem I was having:
> 
> I simply went back to 0.90 and that's working now.
> 
> Would still be nice to know if the svg output from matplotlib complies 
> with the standard or whether it's Qt that's messing things up.
> 
> Merry x-mass!
> 
> cputter
> 
> 
> 
> On 21/12/2007, *Christiaan Putter* <cep...@go... 
> <mailto:cep...@go...>> wrote:
> 
> Hi guys and girls,
> 
> Quick question regarding matplotlib's svg backend...
> 
> I've embeded pyhton into c++ and Qt's (4.3.3) svg support is having
> some problems with .svg files created by matplotlib. Text isn't
> showing up. Firefox displays the same .svg file correctly though...
> 
> The problem:
> 
> It seems some text stuff is stored in a section called defs at the
> end of the file with stuff linking to this earlier in the file. Qt
> doesn't like that and only displays the normal plot stuff (lines,
> etc.) but not the labels and other text.
> 
> More exact:
> 
> <use xlink:href="#c_7" .....
> 
> references
> 
> <path id="c_7" d="M10.6875 .....
> 
> at the end of the file.
> 
> 
> 
> When I simply cut and paste the defs section to the beginning of the
> file it solves the problem.
> 
> What does the svg standard say about this? I assume Qt's
> implementation is defect...
> 
> Has anybody else encountered this problem? I'll send an e-mail to
> Qt too and ask them about it.
> 
> Hope you're all having a nice day.
> 
> Regards,
> cputter
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <mailto:Mat...@li...>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> <https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Michael D. <md...@st...> - 2008年01月04日 14:15:50
Hmm. Thanks for the info. A real puzzler, then. I'll probably have to 
get my hands on a Windows box to figure this one out.
Cheers,
Mike
Orest Kozyar wrote:
> My apolgies for not responding sooner.
> 
>> The only different between the provided matplotlibrc and the built-in
>> defaults seems to be font.weight. In the matplotlibrc it is "medium",
>> and in the defaults it is "normal". If you uncomment only
>> "font.weight", and leave the others commented out, do things work for you?
> 
> No the above does not. I need to uncomment the fonts.serif,
> fonts.fantasy, fonts.sans-serif, etc lists for this to work. The
> fonts_demo.py example works in this case even when all other options
> (including font.weight) are commented out.
> 
> Hope this helps, and let me know if you'd like me to test anything else.
> 
> Orest
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Michael D. <md...@st...> - 2008年01月04日 14:13:09
Happy New Year to you as well!
I see now where part of the confusion lies -- even though you have 
specified the WxAgg backend, the Wx backend is being used for the 
printing. Though I didn't write this code, I assume this is by design 
-- WxAgg can only generate bitmaps, and we don't want to use those for 
printing. Unfortunately, Wx (non-Agg) has some limitations, as you've 
discovered. (For a list of the limitations, see 
http://matplotlib.sourceforge.net/backends.html). Given all those 
shortcomings, you may be better off generating a Postscript file and 
then send that to lpr. That should work on most modern Linux 
distributions even without a Postscript printer. You can do:
 savefig("foo.ps")
to use the matplotlib built-in Postscript backend.
As for your other questions -->
 1. You cannot set orientation to LANDSCAPE, it seems "SetOrientation" 
does not work.
 2. When you set LANDSCAPE manually, only lower half part will be 
printed.
I can't reproduce this. Your included example seems to produce correct 
LANDSCAPE pages for me. These are my relevant versions -- what are yours?
wxPython: 2.8.6.1
gtk+: 2.10.9
RHEL4
 3. Printing quality is far much worse than Windows's printing.
I can confirm that the Postscript generated by Wx is storing a bitmap, 
and not vector data. This is probably the source of the quality loss. 
I can't quite figure out why this is happening, but I have experienced 
similar problems with another Wx project. Perhaps that's an inherent 
limitation of Wx printing? In any case, it's a little bit below the 
level of matplotlib, so perhaps a question on the wxPython mailing list 
would help...
But my suggested workaround -- generating a Postscript file using 
matplotlib's built-in Postscript support, instead of the Wx printing 
framework -- and then printing that may be a better option for you.
Cheers,
Mike
Johann Cohen-Tanugi wrote:
> hi Mike,
> no it is WxAgg, the code is here:
> -----
> import wx
> import os
> import matplotlib
> matplotlib.use('WxAgg')
> from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as 
> FigCanvas
> from matplotlib.figure import Figure
> import matplotlib.numerix as numpy
> 
> class PlotFrame(wx.Frame):
> def __init__(self):
> wx.Frame.__init__(self, None, -1, "Test Printing with WX Backend")
> self.fig = Figure(None, 100)
> self.canvas= FigCanvas(self, -1, self.fig)
> self.axes = self.fig.add_axes([0.15,0.15,0.75,0.75])
> sizer = wx.BoxSizer(wx.VERTICAL)
> sizer.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW)
> self.Fit()
> self.Plot_Data()
> 
> def Print_Data(self):
> self.canvas.printerData.SetPaperId(wx.PAPER_A4)
> self.canvas.printerData.SetOrientation(wx.LANDSCAPE)
> dpi = self.canvas.figure.dpi.get()
> self.canvas.figure.dpi.set(200)
> self.canvas.Printer_Print()
> self.canvas.figure.dpi.set(dpi)
> self.canvas.draw()
> 
> def Plot_Data(self):
> t = numpy.arange(0.0,5.0,0.01)
> s = numpy.sin(2.0*numpy.pi*t)
> c = numpy.cos(0.4*numpy.pi*t)
> self.axes.plot(t,s)
> self.axes.plot(t,c)
> 
> if __name__ == '__main__':
> app = wx.PySimpleApp()
> fig = PlotFrame()
> fig.Show(True)
> fig.Print_Data()
> app.MainLoop()
> ---------------------
> 
> But you got a point with usetex : I set it to False and then no more 
> traceback, though the preview indicates that LANDSCAPE mode was not 
> applied.
> So : WxAgg seems to have issues with usetex=True, and LANDSCAPE request 
> does not seem to be honored... I am using svn revision 4797.
> 
> best, and happy New Year!
> Johann
> 
> Michael Droettboom wrote:
>> From the traceback, it looks as if you are using the Wx backend, not 
>> the WxAgg backend, and you are using "usetex" (text rendering using 
>> (La)TeX). The Wx backend does not support usetex -- the WxAgg backend 
>> does. Check your matplotlibrc or your matplotlib.use command and make 
>> sure you're selecting the WxAgg backend.
>>
>> Cheers,
>> Mike
>> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
2 messages has been excluded from this view by a project administrator.

Showing results of 310

<< < 1 .. 10 11 12 13 > >> (Page 12 of 13)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /