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




Showing results of 353

<< < 1 2 3 4 5 6 .. 15 > >> (Page 4 of 15)
From: Andrew J. <a.h...@gm...> - 2006年02月23日 23:02:50
Hi-
Thanks for the help. A comment below...
> Andrew Jaffe wrote:
>> Eric (etc)-
>>
>> Sorry, no dice... in fact I was already using the CVS version so 
>> this was the to_rgba() method that failed originally!
>>
>> Any other possibilities? Could the problem be just a coincidental 
>> error elsewhere?
>>
>> Andrew
>>
>>
>
> Andrew and Eric: I apologize, this latest glitch was all my 
> fault. I had made a modification to colors.py to workaround an 
> apparenty bug in numpy masked arrays, and that modification was 
> wrong. It's now fixed in CVS, revision 1.26
>
> Index: colors.py
> ===================================================================
> RCS file: /cvsroot/matplotlib/matplotlib/lib/matplotlib/colors.py,v
> retrieving revision 1.25
> diff -r1.25 colors.py
> 659c659
> < result = (vmax-vmin)/(val-vmin) <-- this is wrong
> ---
> > result = (val-vmin)/(vmax-vmin) <-- this is right
>
> Originally (in 0.87) there was
>
> result = (1.0/(vmax-vmin))*(val-vmin)
>
> which raised an exception when val was a numpy masked array.
However, I expect the original line was like this in case vmax, vmin 
and val are all integers, in which case without 'truedivision' (or 
'from __future__ import division'), result will use integer division 
which probably isn't desired.
So this may need to be fixed to force floating-point division. Not 
sure the robust way to do this with possibly-masked arrays, etc.
Andrew
From: Josh M. <jos...@gm...> - 2006年02月23日 22:39:21
Hi guys,
Just to add to this issue, I have been profiling my own code which 
embeds matplotlib inside a Cocoa app, and uses Agg to draw to an 
NSView. (I posted a howto on this recently to the user list). I am 
drawing a grayscale image (an array with values 0-255), and then 
drawing lines over the top.
I have noticed that most of the time is spend in the ma.asarray(x) 
method (specifically the ma.__init__ method) and discounted this as 
too hard for me to figure on. But these posts point out that this is 
a slow point in the code. Now it is faster for RGB images. I'm 
wondering if there is a way to optimise this method for the (fairly 
common, I imagine) case of using imshow on grayscale, non-masked 
numpy arrays. Can this be done?
Your help is appreciated.
Josh
Eric Firing wrote:
> Jeff,
>
> I really blew it on that one--it looked so simple! OK, I think this
> version is correct; it will land in CVS in a few minutes.
>
> def to_rgba(self, x, alpha=1.0):
> '''Return a normalized rgba array corresponding to x.
> If x is already an rgb or rgba array, return it unchanged.
> '''
> if hasattr(x, 'shape') and len(x.shape)>2: return x
> x = ma.asarray(x)
> x = self.norm(x)
> x = self.cmap(x, alpha)
> return x
> Eric
>
> Jeff Whitaker wrote:
>
>> Eric Firing wrote:
>>
>>
>>> Ray,
>>>
>>> You tripped over a bug in cm.py: when I added masked array 
>>> support, I
>>> put the "x = ma.asarray(x)" too early in the to_rgba() method of
>>> ScalarMappable. It is fixed now in CVS. Thanks for finding the 
>>> problem.
>>>
>>> If you want to try the fix in your version, in place of your
>>> workaround, here is the revised method:
>>>
>>> def to_rgba(self, x, alpha=1.0):
>>> # assume normalized rgb, rgba
>>> if len(x.shape)>2: return x
>>> x = ma.asarray(x)
>>> x = self.norm(x)
>>> x = self.cmap(x, alpha)
>>> return x
>>>
>>> Eric
>>>
>>>
>>
>>
>> Hi Eric: This breaks some of the basemap demos which do this
>>
>> CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k')
>>
>> to draw solid black contour lines. I now get
>>
>> File "/sw/lib/python2.4/site-packages/matplotlib/cm.py", line 52, in
>> to_rgba
>> if len(x.shape)>2: return x
>> AttributeError: 'list' object has no attribute 'shape'
>>
>> It appears that colors now has to be an array?
>>
>> -Jeff
>
From: Jeff W. <js...@fa...> - 2006年02月23日 22:29:57
Andrew Jaffe wrote:
> Eric (etc)-
>
> Sorry, no dice... in fact I was already using the CVS version so this 
> was the to_rgba() method that failed originally!
>
> Any other possibilities? Could the problem be just a coincidental 
> error elsewhere?
>
> Andrew
>
>
Andrew and Eric: I apologize, this latest glitch was all my fault. I 
had made a modification to colors.py to workaround an apparenty bug in 
numpy masked arrays, and that modification was wrong. It's now fixed in 
CVS, revision 1.26
Index: colors.py
===================================================================
RCS file: /cvsroot/matplotlib/matplotlib/lib/matplotlib/colors.py,v
retrieving revision 1.25
diff -r1.25 colors.py
659c659
< result = (vmax-vmin)/(val-vmin) <-- this is wrong
---
 > result = (val-vmin)/(vmax-vmin) <-- this is right
Originally (in 0.87) there was
result = (1.0/(vmax-vmin))*(val-vmin)
which raised an exception when val was a numpy masked array.
Sorry for the screwup.
-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: Andrew J. <a.h...@gm...> - 2006年02月23日 22:00:46
Eric (etc)-
Sorry, no dice... in fact I was already using the CVS version so this 
was the to_rgba() method that failed originally!
Any other possibilities? Could the problem be just a coincidental 
error elsewhere?
Andrew
On 23 Feb 2006, at 17:31, Eric Firing wrote:
> Andrew,
>
> Unfortunately, the 0.87 release was packed up immediately after I 
> made the first of two changes to cm.py, so it contains the bug 
> referred to below. Most likely that is what is wrecking your 
> imshow plots. Please try substituting the revised function in 
> cm.py, and let us know if that solves the problem.
>
> def to_rgba(self, x, alpha=1.0):
> '''Return a normalized rgba array corresponding to x.
> If x is already an rgb or rgba array, return it unchanged.
> '''
> if hasattr(x, 'shape') and len(x.shape)>2: return x
> x = ma.asarray(x)
> x = self.norm(x)
> x = self.cmap(x, alpha)
> return x
>
> Eric
>
> Andrew Jaffe wrote:
>> Jeff Whitaker wrote:
>>> Eric Firing wrote:
>>>
>>>> Jeff,
>>>> I really blew it on that one--it looked so simple! OK, I think 
>>>> this version is correct; it will land in CVS in a few minutes.
>>>>
>>>> def to_rgba(self, x, alpha=1.0):
>> >> [[[ code removed ]]]
>> >>
>>> Eric: Thanks for the quick fix - that seems to have done the job.
>>> -Jeff
>> I don't know if it's related, but as of the latest version, all of 
>> my imshow() commands show a single color, no structure at all.
______________________________________________________________________
Andrew Jaffe a....@im...
Astrophysics Group +44 207 594-7526
Blackett Laboratory, Room 1013 FAX 7541
Imperial College, Prince Consort Road
London SW7 2AZ ENGLAND http://astro.imperial.ac.uk/~jaffe
From: David T. <dav...@gm...> - 2006年02月23日 21:17:13
Could that be because interactive mode was set in your previous install ?
(in .matplotlibrc file)
if I try:
#!/usr/bin/python
import matplotlib
import pylab
matplotlib.interactive(True)
pylab.figure()
pylab.close()
Then it works...
Hope this could help you...
David
2006年2月23日, Emmanuel Pecontal <pec...@ob...>:
>
> Hello,
>
> If I run the following script on my system (SuSE 10.0, matplotlib-0.87 bu=
t
> same behaviour with 0.86):
>
> #!/usr/bin/python
>
> import matplotlib
> import pylab
>
> pylab.figure()
> pylab.close ()
>
> It crashes with the following error message:
>
> Traceback (most recent call last):
> File "./tmp.py", line 8, in ?
> pylab.close()
> File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 768,
> in
> close
> else: _pylab_helpers.Gcf.destroy(figManager.num)
> File "/usr/lib/python2.4/site-packages/matplotlib/_pylab_helpers.py",
> line
> 28, in destroy
> figManager.destroy()
> File
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> line 456, in destroy
> gtk.main_quit()
> RuntimeError: called outside of a mainloop
>
> Does someone has an idea of the problem?
> I didn't have this kind of problem with my SuSE 9.3 and matplotlib-0.85
>
> --
> Emmanuel P=E9contal
>
> CRAL - Observatoire de Lyon
> 9, Av. Charles Andre
> F-69561 Saint Genis Laval Cedex
>
> tel (33) (0)4.78.86.83.76 - fax (33) (0)4.78.86.83.86
>
> email : pec...@ob...
>
From: Emmanuel P. <pec...@ob...> - 2006年02月23日 18:59:39
Hello,
If I run the following script on my system (SuSE 10.0, matplotlib-0.87 but=
=20
same behaviour with 0.86):
#!/usr/bin/python
import matplotlib
import pylab
pylab.figure()
pylab.close()
It crashes with the following error message:
Traceback (most recent call last):
 File "./tmp.py", line 8, in ?
 pylab.close()
 File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 768, in=
=20
close
 else: _pylab_helpers.Gcf.destroy(figManager.num)
 File "/usr/lib/python2.4/site-packages/matplotlib/_pylab_helpers.py", lin=
e=20
28, in destroy
 figManager.destroy()
 File "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py=
",=20
line 456, in destroy
 gtk.main_quit()
RuntimeError: called outside of a mainloop
Does someone has an idea of the problem?
I didn't have this kind of problem with my SuSE 9.3 and matplotlib-0.85
=2D-=20
Emmanuel P=E9contal
CRAL - Observatoire de Lyon
9, Av. Charles Andre
=46-69561 Saint Genis Laval Cedex
tel (33) (0)4.78.86.83.76 - fax (33) (0)4.78.86.83.86
email : pec...@ob...
~
From: Eric F. <ef...@ha...> - 2006年02月23日 17:31:41
Andrew,
Unfortunately, the 0.87 release was packed up immediately after I made 
the first of two changes to cm.py, so it contains the bug referred to 
below. Most likely that is what is wrecking your imshow plots. Please 
try substituting the revised function in cm.py, and let us know if that 
solves the problem.
 def to_rgba(self, x, alpha=1.0):
 '''Return a normalized rgba array corresponding to x.
 If x is already an rgb or rgba array, return it unchanged.
 '''
 if hasattr(x, 'shape') and len(x.shape)>2: return x
 x = ma.asarray(x)
 x = self.norm(x)
 x = self.cmap(x, alpha)
 return x
Eric
Andrew Jaffe wrote:
> Jeff Whitaker wrote:
> 
>> Eric Firing wrote:
>>
>>> Jeff,
>>> I really blew it on that one--it looked so simple! OK, I think this 
>>> version is correct; it will land in CVS in a few minutes.
>>>
>>> def to_rgba(self, x, alpha=1.0):
> 
> >> [[[ code removed ]]]
> >>
> 
>> Eric: Thanks for the quick fix - that seems to have done the job.
>> -Jeff
> 
> 
> I don't know if it's related, but as of the latest version, all of my 
> imshow() commands show a single color, no structure at all.
From: Steve S. <el...@gm...> - 2006年02月23日 16:43:51
Hi
Some time ago I installed (Debian sarge) the mpl 0.82 .debs
(by placing deb http://anakonda.altervista.org/debian packages/ in my 
/etc/apt/sources.list) .
Now I wanted to make a "clean" install of mpl 0.87. So what I did was
	dpkg -l matplot
	dpkg -P <all mpl packages>
	updatedb
	locate matplotlib
and then removing everything found related to mpl (form various other 
from-source-installs).
After that I installed 0.87 as usual (python setup.py build/install).
Now testing my fresh install
	ipython -pylab
	plot([1,2,3])
	xlabel("lala")
I found the xlabel not centered but on the leftmost side of the axis (I 
reported this earlier for 0.86.2 ...)
I remembered that I haven't had this problem if I did *not* uninstall 
the 0.82 .debs before installing a newer version. So I removed 0.87, 
re-installed my 0.82 .debs and *after* that installed 0.87 and there was 
the xlabel, sitting centered where it should be.
Did anyone have similar issues or has an idea as to what might cause 
this?? Is 0.82 writing some (config) files that 0.87 should not read but 
does? Thanks for any hint.
cheers,
steve
-- 
Random number generation is the art of producing pure gibberish as 
quickly as possible.
From: John H. <jdh...@ac...> - 2006年02月23日 15:10:42
>>>>> "Keith" == <kei...@bt...> writes:
 Keith> None of the links at
 Keith> http://matplotlib.sourceforge.net/tutorial.html work.
 Keith> E.g. See the plot
 Keith> <http://matplotlib.sourceforge.net/pylab.html#-plot>
 Keith> documentation
Oops, OK, fixed. 
Thanks,
JDH
From: John H. <jdh...@ac...> - 2006年02月23日 15:03:27
>>>>> "George" == George Nurser <ag...@no...> writes:
 George> The problem had arisen because I had installed matplotlib
 George> to a nonstandard directory with python setup.py install
 George> --home=$PREFIX From the documentation
 George> [http://matplotlib.sourceforge.net/ installing.html] I had
 George> got the impression that MATPLOTLIBDATA also needed to be
 George> set= to the directory on which I wanted to install
 George> matplotlib ... of course this is *not* the data directory.
Oh yeah, I think the docs are out of date since the data dirs were
recently moved into the matplotlib/mpl-data dir and so you no longer
need to set MATPLOTLIBDATA when installing to non-standard locations,
but if you do set it, it will be respected, for better or worse as you
found out.
An update of the web site docs is sorely needed. Moving it OT the top
of the TODO list....
 George> Thanks for your help, & for a really professional piece of
 George> software.
You're welcome -- thanks for the kind words.
JDH
None of the links at http://matplotlib.sourceforge.net/tutorial.html =
work.
E.g. See the plot <http://matplotlib.sourceforge.net/pylab.html#-plot> =
documentation=20
*click*
An error has been encountered in accessing this page.=20
1. Server: matplotlib.sourceforge.net
2. URL path: /pylab.html
3. Error notes: File does not exist: =
/home/groups/m/ma/matplotlib/htdocs/pylab.html
4. Error type: 404
5. Request method: GET
6. Request query string:=20
7. Time: 2006年02月23日 05:31:23 PST (1140701483)
Reporting this problem: The problem you have encountered is with a =
project web site hosted by SourceForge.net. This issue should be =
reported to the SourceForge.net-hosted project (not to SourceForge.net). =
If this is a severe or recurring/persistent problem, please do one of =
the following, and provide the error text (numbered 1 through 7, above): =
1.	Contact the project via their designated support resources =
<http://sourceforge.net/support/prweb-lookup.php?host=3Dmatplotlib.source=
forge.net&support=3D1>.=20
2.	Contact the project administrators of this project via email (see the =
upper right-hand corner of the Project Summary page =
<http://sourceforge.net/support/prweb-lookup.php?host=3Dmatplotlib.source=
forge.net> for their usernames) at use...@us...
If you are a member of the project that maintains this web content, =
please refer to the Site Documentation regarding the project web service =
<https://sourceforge.net/docs/E07/> for further assistance.=20
From: Bruce <ep...@gm...> - 2006年02月23日 13:04:25
After upgrading from MPL 0.82 to 0.87 and tried again, the message
from MPL was that I needed tex version 0.31415 or later. I have
0.3141592 and the reason why MPL didn`t find it is described in bugs
on Sourceforge with the title
"Bug with text.usetex =3D true on WinXP with MiKTeX". So I just edited
__init__.py and latex now seems to work with MPL.
On 2/22/06, Darren Dale <dd...@co...> wrote:
> On Wednesday 22 February 2006 7:32 am, Bruce wrote:
> > Hi group,
> >
> > I wanted to try to usetex for my matplotlib plots, and thought that I
> > had everything neccessary installed, but it doesn`t work. Perhaps
> > someone in the group have some idea what is wrong here? Im using
> > MikTex on xp and have the dvipng-miktex pakage installed. thx
>
> Have you read the wiki? http://www.scipy.org/Wiki/Cookbook/Matplotlib/Usi=
ngTex
>
> An intermediate dvi file is missing, probably because the latex executabl=
e is
> not on your path.
>
> Darren
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=
=3D121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jean-Luc M. <jea...@fr...> - 2006年02月23日 11:58:01
> All the lapack stuff is linked to what you are using for Numerix: 
> Numeric, numarray or NumPy, rather than directly by MPL. It looks like 
> you may have upgraded your atlas install, and not upgraded your numerix 
> package with it. Or you're installed a Numerix binary package that 
> depends on an older lapack.
I have the same problem : with Numeric or numarray and matplotlib-0.82 
(from ubuntu) there is no problem but when I remove matplotlib-0.82 and 
install numpy-0.92-jdh and matplotlib-0.86-cvs-jdh, I have the same 
error (with numerix : numpy in my .matplotlibrc). I don't change 
anything else/
A question : why mpl is looking at "/home/jdhunter/debs/numpy/usr/[..]" ?
Jean-Luc
From: George N. <ag...@no...> - 2006年02月23日 11:57:38
On 22 Feb 2006, at 14:30, John Hunter wrote:
>>>>>> "George" == George Nurser <ag...@no...> writes:
>
> George> I've had various versions of matplotlib from CVS installed
> George> on an Opteron (Red Hat LInux) here for a few weeks now. I
> George> had to modify setupext.py to look for various libraries in
> George> ../lib64 instead of /lib but matplotlib works very nicely
> George> most of the time, and I have started using it for real
> George> work.
>
> George> One cosmetic problem: the buttons at the bottom of the
> George> plot window have their graphics messed up. They just look
> George> like red crosses. The floating xml works, so I know what
> George> the buttons do, and it doesn't inconvenience me --- but it
> George> looks bad.
>
> George> Presumably some library is either out of date, incomplete,
> George> or not linked correctly. I am using the default TkAgg
> George> backend. Any thoughts on what I should look for would be
> George> appreciated.
>
> We used to see something like this on OSX with the WX backend. What
> version of Tk are you using? Could this be a byte order or byte size
> problem?
>
> [snipped]
> Thanks,
> JDH
John,
Sorry to have bothered you about this -- the solution should have 
been obvious to me. The problem was simply that I had specified 
MATPLOTLIBDATA to something different to the matplotlib data 
directory where the button images actually were. This data directory 
seems to be in the default location, so unsetting MATPLOTLIBDATA 
solved the problem.
The problem had arisen because I had installed matplotlib to a 
nonstandard directory with
python setup.py install --home=$PREFIX
 From the documentation [http://matplotlib.sourceforge.net/ 
installing.html] I had got the impression that MATPLOTLIBDATA also 
needed to be set= to the directory on which I wanted to install 
matplotlib ... of course this is *not* the data directory.
Thanks for your help, & for a really professional piece of software.
George.
From: Andrew J. <a.h...@gm...> - 2006年02月23日 11:20:12
Jeff Whitaker wrote:
> Eric Firing wrote:
>> Jeff,
>> I really blew it on that one--it looked so simple! OK, I think this 
>> version is correct; it will land in CVS in a few minutes.
>>
>> def to_rgba(self, x, alpha=1.0):
 >> [[[ code removed ]]]
 >>
> Eric: Thanks for the quick fix - that seems to have done the job.
> -Jeff
I don't know if it's related, but as of the latest version, all of my 
imshow() commands show a single color, no structure at all.
From: John H. <jdh...@ac...> - 2006年02月23日 05:59:42
>>>>> "James" == James Boyle <bo...@ll...> writes:
 James> Running : OS X 10.3.9 - matplotlib 0.86 (Agg backend)
 James> python 2.3 Numeric 23.7
 James> I have the following command sequence:
 James> import Numeric N = Numeric from matplotlib import pylab PL
 James> = pylab
FYI, there is a more elegant way to do this import in python
(unrelated to your original question)
 import Numeric
 N = Numeric
 from matplotlib import pylab
 PL = pylab
rather
 import Numeric as N
 import matplotlib.pylab as PL
more on the other part of your question later :-)
JDH
From: John H. <jdh...@ac...> - 2006年02月23日 05:01:28
>>>>> "Simon" == Simon Burton <si...@ar...> writes:
 Simon> from: http://matplotlib.sourceforge.net/pylab.html
 Simon> An error has been encountered in accessing this page.
Perhaps the site that is linking to matplotlib is broken, rather than
the matplotlib site itself. I think the page you are looking for is
http://matplotlib.sourceforge.net/matplotlib.pylab.html
JDH
From: Simon B. <si...@ar...> - 2006年02月23日 04:37:21
from:
http://matplotlib.sourceforge.net/pylab.html
An error has been encountered in accessing this page.
1. Server: matplotlib.sourceforge.net
2. URL path: /pylab.html
3. Error notes: File does not exist: /home/groups/m/ma/matplotlib/htdocs/pylab.html
4. Error type: 404
5. Request method: GET
6. Request query string:
7. Time: 2006年02月22日 20:34:27 PST (1140669267)
Reporting this problem: The problem you have encountered is with a project web site hosted by SourceForge.net. This issue should be reported to the SourceForge.net-hosted project (not to SourceForge.net).
If this is a severe or recurring/persistent problem, please do one of the following, and provide the error text (numbered 1 through 7, above):
 1. Contact the project via their designated support resources.
 2. Contact the project administrators of this project via email (see the upper right-hand corner of the Project Summary page for their usernames) at use...@us...
If you are a member of the project that maintains this web content, please refer to the Site Documentation regarding the project web service for further assistance. 
Simon.
-- 
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 
From: Charlie M. <cw...@gm...> - 2006年02月23日 00:57:44
A feature I mentioned on the list a few weeks ago is in the 0.87
release that was pushed today. It is
"matplotlib.get_py2exe_datafiles()". You can see it used in the
sample setup.py script below.
Begin setup.py script
---------------------------------------------------------------------------=
-----------
# For py2exe only
"""
 Run with the following command (use py2exe 0.6.2 or higher)
 python.exe -OO setup.py py2exe -b 3 -c -p numarray,pytz -e numpy
"""
import os
from distutils.core import setup
import py2exe
import glob
import matplotlib
setup( version =3D '0.9.1',
 windows =3D ['nlogui.py'],
 data_files =3D [('', ['nlo.gif', '../vtkrotate/NMA.pdb']),
 matplotlib.get_py2exe_datafiles()],
 options=3D{"py2exe":{"optimize":2}},
)
On 2/22/06, Jeff Peery <jef...@ya...> wrote:
> Hi, I'm pretty unfamiliar with py2exe and I had been using it with
> matplotlib and it was working well. I upgraded to 0.86 and now it doesn't
> work. I know this is because the installation directory is different (no
> longer the share folder). I thought I fixed it correctly but I get an er=
ror
> that indicates py2exe "can't find
> lib/site-packages/matplotlib/backends or it is not a
> regular file". I am assuming that it doesn't like 'backends' because it =
is
> a folder and not a file. I changed my setup code to this:
>
> data_files=3D[
> ("matplotlibdata",
> glob.glob(os.path.join(distutils.sysconfig.PREFIX,
> 'lib', 'site-packages','matplotlib', "*")))]
>
> setup(
> options =3D options,
> # The lib directory contains everything except the executab les and =
the
> python dll.
> windows =3D [app],
> data_files =3D data_files,
> # use out build_installer class as extended py2exe build command
> cmdclass =3D {"py2exe": build_installer},
> )
>
> how might I change this to get it working properly? thanks!!
>
> Jeff
>
>
> ________________________________
> Brings words and photos together (easily) with
> PhotoMail - it's free and works with Yahoo! Mail.
>
>
From: Jeff P. <jef...@ya...> - 2006年02月22日 23:50:12
Hi, I'm pretty unfamiliar with py2exe and I had been using it with matplotlib and it was working well. I upgraded to 0.86 and now it doesn't work. I know this is because the installation directory is different (no longer the share folder). I thought I fixed it correctly but I get an error that indicates py2exe "can't find lib/site-packages/matplotlib/backends or it is not a regular file". I am assuming that it doesn't like 'backends' because it is a folder and not a file. I changed my setup code to this:
 
 data_files=[
 ("matplotlibdata",
 glob.glob(os.path.join(distutils.sysconfig.PREFIX, 'lib', 'site-packages','matplotlib', "*")))]
 
 setup(
 options = options,
 # The lib directory contains everything except the executables and the python dll.
 windows = [app],
 data_files = data_files,
 # use out build_installer class as extended py2exe build command
 cmdclass = {"py2exe": build_installer},
 )
 
 how might I change this to get it working properly? thanks!!
 
 Jeff
		
---------------------------------
Brings words and photos together (easily) with
 PhotoMail - it's free and works with Yahoo! Mail.
From: James B. <bo...@ll...> - 2006年02月22日 21:14:21
Running : OS X 10.3.9 - matplotlib 0.86 (Agg backend) python 2.3 
Numeric 23.7
I have the following command sequence:
import Numeric
N = Numeric
from matplotlib import pylab
PL = pylab
x = N.arange(10.)
y = N.arange(10.)
y[-1] = 1.0e18
PL.plot(x,y,'r')
PL.xlim( 0.,7.)
PL.ylim( 0.,7.)
PL.savefig('plot1')
PL.clf()
PL.plot(x,y,'r--')
PL.xlim( 0.,7.)
PL.ylim( 0.,7.)
PL.savefig('plot2')
PL.clf()
Note that the y array has a screwy point - 1.0e18.
What happens is that the first plot ('plot1') looks fine but the code 
hangs on the savefig for the second plot - apparently nothing useful is 
happening - it just hangs.
if I change the upper limits to 9 for plot 1, you can see a red filled 
polygon being drawn on the right hand side of the figure - do not know 
why ? With the limits of 7 all the nasty bits are not seen.
I suspect that the dashed option tries to produce a plot with a huge 
number of line segments and the code is overwhelmed - I am OK with 
overwhelmed but not with the code hanging. Something a bit more 
graceful should be done if possible.
Is there any thing I can check to avoid this situation?
In the actual case in which this occurred I tried to produce a plot 
after a lengthy computation. The computation had an outlier, It was a 
bit annoying to have the plot hang and thus I lost all the results to 
that point.
I could swear that this used to work(produce a plot in the second case) 
in an earlier version of matplotlib. I had actually performed the 
computation and plot before and all went OK. I have the printed copy 
before me.
Thanks for any help.
--Jim
From: Jeff W. <js...@fa...> - 2006年02月22日 20:11:53
Eric Firing wrote:
> Jeff,
>
> I really blew it on that one--it looked so simple! OK, I think this 
> version is correct; it will land in CVS in a few minutes.
>
> def to_rgba(self, x, alpha=1.0):
> '''Return a normalized rgba array corresponding to x.
> If x is already an rgb or rgba array, return it unchanged.
> '''
> if hasattr(x, 'shape') and len(x.shape)>2: return x
> x = ma.asarray(x)
> x = self.norm(x)
> x = self.cmap(x, alpha)
> return x
> Eric
>
Eric: Thanks for the quick fix - that seems to have done the job.
-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: Eric F. <ef...@ha...> - 2006年02月22日 18:16:11
Jeff,
I really blew it on that one--it looked so simple! OK, I think this 
version is correct; it will land in CVS in a few minutes.
 def to_rgba(self, x, alpha=1.0):
 '''Return a normalized rgba array corresponding to x.
 If x is already an rgb or rgba array, return it unchanged.
 '''
 if hasattr(x, 'shape') and len(x.shape)>2: return x
 x = ma.asarray(x)
 x = self.norm(x)
 x = self.cmap(x, alpha)
 return x
Eric
Jeff Whitaker wrote:
> Eric Firing wrote:
> 
>> Ray,
>>
>> You tripped over a bug in cm.py: when I added masked array support, I 
>> put the "x = ma.asarray(x)" too early in the to_rgba() method of 
>> ScalarMappable. It is fixed now in CVS. Thanks for finding the problem.
>>
>> If you want to try the fix in your version, in place of your 
>> workaround, here is the revised method:
>>
>> def to_rgba(self, x, alpha=1.0):
>> # assume normalized rgb, rgba
>> if len(x.shape)>2: return x
>> x = ma.asarray(x)
>> x = self.norm(x)
>> x = self.cmap(x, alpha)
>> return x
>>
>> Eric
>>
> 
> 
> Hi Eric: This breaks some of the basemap demos which do this
> 
> CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k')
> 
> to draw solid black contour lines. I now get
> 
> File "/sw/lib/python2.4/site-packages/matplotlib/cm.py", line 52, in 
> to_rgba
> if len(x.shape)>2: return x
> AttributeError: 'list' object has no attribute 'shape'
> 
> It appears that colors now has to be an array?
> 
> -Jeff
> 
From: Jeff W. <js...@fa...> - 2006年02月22日 17:27:40
Eric Firing wrote:
> Ray,
>
> You tripped over a bug in cm.py: when I added masked array support, I 
> put the "x = ma.asarray(x)" too early in the to_rgba() method of 
> ScalarMappable. It is fixed now in CVS. Thanks for finding the problem.
>
> If you want to try the fix in your version, in place of your 
> workaround, here is the revised method:
>
> def to_rgba(self, x, alpha=1.0):
> # assume normalized rgb, rgba
> if len(x.shape)>2: return x
> x = ma.asarray(x)
> x = self.norm(x)
> x = self.cmap(x, alpha)
> return x
>
> Eric
>
Hi Eric: This breaks some of the basemap demos which do this
CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k')
to draw solid black contour lines. I now get
 File "/sw/lib/python2.4/site-packages/matplotlib/cm.py", line 52, in 
to_rgba
 if len(x.shape)>2: return x
AttributeError: 'list' object has no attribute 'shape'
It appears that colors now has to be an array?
-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: Charlie M. <cw...@gm...> - 2006年02月22日 15:44:11
Notable notes:
 - Built against numpy-0.9.5
 - A wealth of bugfixes
http://sourceforge.net/project/showfiles.php?group_id=3D80706
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
2006年02月22日 Released 0.87
2006年02月21日 Fixed portrait/landscape orientation in postscript backend - DSD
2006年02月21日 fix bug introduced in yesterday's bug fix - SC
2006年02月20日 backend_gtk.py FigureCanvasGTK.draw(): fix bug reported by
 David Tremouilles - SC
2006年02月20日 Remove the "pygtk.require('2.4')" error from
 examples/embedding_in_gtk2.py - SC
2006年02月18日 backend_gtk.py FigureCanvasGTK.draw(): simplify to use (rather t=
han
 duplicate) the expose_event() drawing code - SC
2006年02月12日 Added stagger or waterfall plot capability to LineCollection;
 illustrated in examples/collections.py. - EF
2006年02月11日 Massive cleanup of the usetex code in the postscript
backend. Possibly
 fixed the clipping issue users were reporting with older version=
s of
 ghostscript - DSD
2006年02月11日 Added autolim kwarg to axes.add_collection. Changed
 collection get_verts() methods accordingly. - EF
2006年02月09日 added a temporary rc parameter text.dvipnghack, to allow
Mac users to get nice
 results with the usetex option. - DSD
2006年02月09日 Fixed a bug related to setting font sizes with the usetex
option. - DSD
2006年02月09日 Fixed a bug related to usetex's latex code. - DSD
2006年02月09日 Modified behavior of font.size rc setting. You should
define font.size in pts,
 which will set the "medium" or default fontsize. Special
text sizes like axis
 labels or tick labels can be given relative font sizes like
small, large,
 x-large, etc. and will scale accordingly. - DSD
2006年02月08日 Added py2exe specific datapath check again. Also added new
 py2exe helper function get_py2exe_datafiles for use in py2exe
 setup.py scripts. - CM
2006年02月02日 Added box function to pylab
2006年02月02日 Fixed a problem in setupext.py, tk library formatted in unicode
 caused build problems - DSD
2006年02月01日 Dropped TeX engine support in usetex to focus on LaTeX. - DSD
2006年01月29日 Improved usetex option to respect the serif, sans-serif, monospa=
ce,
 and cursive rc settings. Removed the font.latex.package rc setti=
ng,
 it is no longer required - DSD
2006年01月29日 Fixed tex's caching to include font.family rc information - DSD
2006年01月29日 Fixed subpixel rendering bug in *Agg that was causing
 uneven gridlines - JDH
2006年01月28日 Added fontcmd to backend_ps's RendererPS.draw_tex, to support ot=
her
 font families in eps output - DSD
2006年01月28日 Added MaxNLocator to ticker.py, and changed contour.py to
 use it by default. - EF
2006年01月28日 Added fontcmd to backend_ps's RendererPS.draw_tex, to support ot=
her
 font families in eps output - DSD
2006年01月27日 Buffered reading of matplotlibrc parameters in order to allow
 'verbose' settings to be processed first (allows verbose.report
 during rc validation process) - DSD
2006年01月27日 Removed setuptools support from setup.py and created a
 separate setupegg.py file to replace it. - CM
2006年01月26日 Replaced the ugly datapath logic with a cleaner approach from
 http://wiki.python.org/moin/DistutilsInstallDataScattered.
 Overrides the install_data command. - CM
2006年01月24日 Don't use character typecodes in cntr.c --- changed to use
 defined typenumbers instead. - TEO
2006年01月24日 Fixed some bugs in usetex's and ps.usedistiller's dependency
2006年01月24日 Added masked array support to scatter - EF
2006年01月24日 Fixed some bugs in usetex's and ps.usedistiller's dependency
 checking - DSD
5 messages has been excluded from this view by a project administrator.

Showing results of 353

<< < 1 2 3 4 5 6 .. 15 > >> (Page 4 of 15)
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 によって変換されたページ (->オリジナル) /