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





Showing results of 331

<< < 1 2 3 4 5 .. 14 > >> (Page 3 of 14)
From: Peter-Jan R. <pjr...@su...> - 2007年12月18日 15:55:53
Darren,
Thanks for the quick reply... It works like a charm... Somehow I 
missed the post in the userslist...
Kind regards,
Peter-Jan
Op 2007年12月18日 17:25, het Darren Dale die volgende geskryf:
> Somebody reported it right after 0.91.1 was released. It has been fixed in 
> svn. To hold you over until the next release, I think you just need to update 
> your matplotlib/__init__.py and matplotlib/rcsetup.py.
>
> On Tuesday 18 December 2007 10:07:28 am Peter-Jan Randewijk wrote:
> 
>> Dear Darren,
>>
>> I know "text.latex.preamble" is not supported, but since I upgraded to
>> Matplotlib 0.91.1 my latex preamble code which was working perfectly
>> well in 0.90.1, now gives my the follow errors (both on openSUSE & XP):
>>
>> In [1]: run overlap_vs_concentrated.py
>> C:\Python\lib\site-packages\matplotlib\__init__.py:606: UserWarning: Bad
>> val "\u
>> sepackage[cmex10]{amsmath},\usepackage{helvet},\usepackage{sansserifmath}"
>> on li
>> ne #128
>> "text.latex.preamble :
>> \usepackage[cmex10]{amsmath},\usepackage{he
>> lvet},\usepackage{sansserifmath}
>> "
>> in file "c:\My Documents\My
>> Publications\PEDS-2007\Paper_I\Presentation\
>> python\matplotlibrc"
>> global name 'verbose' is not defined
>> "%s"\n\t%s' % (val, cnt, line, fname, msg))
>>
>> Has the syntax changed... or is this a bug...?
>>
>> I also get this error message w.r.t. to "verbose" which isn't critical
>> but annoying...
>>
>> Kind regards,
>>
>> Peter-Jan
>>
>> Op 2007年05月18日 18:05, het Alexander Schmolck die volgende geskryf:
>> 
>>> Darren Dale <dd...@co...> writes:
>>> 
>>>>> Well, if ever there was a compelling use-case for an
>>>>> undocumented/unsupported feature it would be this one, I think.
>>>>> 
>>>> Alright, svn 3277 lets you add additional commands to the preamble:
>>>>
>>>> text.latex.preamble : \usepackage{bm},\renewcommand{etc...}
>>>>
>>>> See the default matplotlibrc file for more information.
>>>>
>>>> THIS FEATURE IS NOT SUPPORTED. Please don't report problems on the mpl
>>>> mailing lists without submitting a patch to fix them.
>>>>
>>>> Alex, please give this a spin. Tell me if it meets your needs, and if it
>>>> doesnt, send a patch.
>>>> 
>>> Great! Thanks for incorporating this! It fits my needs, but I sent a
>>> (mostly unreleated) patch anyway (against 3278) :)
>>>
>>> cheers,
>>>
>>> 'as
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>> 
From: Darren D. <dar...@co...> - 2007年12月18日 15:25:48
Somebody reported it right after 0.91.1 was released. It has been fixed in 
svn. To hold you over until the next release, I think you just need to update 
your matplotlib/__init__.py and matplotlib/rcsetup.py.
On Tuesday 18 December 2007 10:07:28 am Peter-Jan Randewijk wrote:
> Dear Darren,
>
> I know "text.latex.preamble" is not supported, but since I upgraded to
> Matplotlib 0.91.1 my latex preamble code which was working perfectly
> well in 0.90.1, now gives my the follow errors (both on openSUSE & XP):
>
> In [1]: run overlap_vs_concentrated.py
> C:\Python\lib\site-packages\matplotlib\__init__.py:606: UserWarning: Bad
> val "\u
> sepackage[cmex10]{amsmath},\usepackage{helvet},\usepackage{sansserifmath}"
> on li
> ne #128
> "text.latex.preamble :
> \usepackage[cmex10]{amsmath},\usepackage{he
> lvet},\usepackage{sansserifmath}
> "
> in file "c:\My Documents\My
> Publications\PEDS-2007\Paper_I\Presentation\
> python\matplotlibrc"
> global name 'verbose' is not defined
> "%s"\n\t%s' % (val, cnt, line, fname, msg))
>
> Has the syntax changed... or is this a bug...?
>
> I also get this error message w.r.t. to "verbose" which isn't critical
> but annoying...
>
> Kind regards,
>
> Peter-Jan
>
> Op 2007年05月18日 18:05, het Alexander Schmolck die volgende geskryf:
> > Darren Dale <dd...@co...> writes:
> >>> Well, if ever there was a compelling use-case for an
> >>> undocumented/unsupported feature it would be this one, I think.
> >>
> >> Alright, svn 3277 lets you add additional commands to the preamble:
> >>
> >> text.latex.preamble : \usepackage{bm},\renewcommand{etc...}
> >>
> >> See the default matplotlibrc file for more information.
> >>
> >> THIS FEATURE IS NOT SUPPORTED. Please don't report problems on the mpl
> >> mailing lists without submitting a patch to fix them.
> >>
> >> Alex, please give this a spin. Tell me if it meets your needs, and if it
> >> doesnt, send a patch.
> >
> > Great! Thanks for incorporating this! It fits my needs, but I sent a
> > (mostly unreleated) patch anyway (against 3278) :)
> >
> > cheers,
> >
> > 'as
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
Darren S. Dale, Ph.D.
Staff Scientist
Cornell High Energy Synchrotron Source
Cornell University
275 Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853
dar...@co...
office: (607) 255-3819
fax: (607) 255-9001
http://www.chess.cornell.edu
From: Peter-Jan R. <pjr...@su...> - 2007年12月18日 15:07:51
Dear Darren,
I know "text.latex.preamble" is not supported, but since I upgraded to 
Matplotlib 0.91.1 my latex preamble code which was working perfectly 
well in 0.90.1, now gives my the follow errors (both on openSUSE & XP):
In [1]: run overlap_vs_concentrated.py
C:\Python\lib\site-packages\matplotlib\__init__.py:606: UserWarning: Bad 
val "\u
sepackage[cmex10]{amsmath},\usepackage{helvet},\usepackage{sansserifmath}" 
on li
ne #128
 "text.latex.preamble : 
\usepackage[cmex10]{amsmath},\usepackage{he
lvet},\usepackage{sansserifmath}
"
 in file "c:\My Documents\My 
Publications\PEDS-2007\Paper_I\Presentation\
python\matplotlibrc"
 global name 'verbose' is not defined
 "%s"\n\t%s' % (val, cnt, line, fname, msg))
Has the syntax changed... or is this a bug...?
I also get this error message w.r.t. to "verbose" which isn't critical 
but annoying...
Kind regards,
Peter-Jan
Op 2007年05月18日 18:05, het Alexander Schmolck die volgende geskryf:
> Darren Dale <dd...@co...> writes:
>
> 
>>> Well, if ever there was a compelling use-case for an
>>> undocumented/unsupported feature it would be this one, I think.
>>> 
>> Alright, svn 3277 lets you add additional commands to the preamble:
>>
>> text.latex.preamble : \usepackage{bm},\renewcommand{etc...}
>>
>> See the default matplotlibrc file for more information.
>>
>> THIS FEATURE IS NOT SUPPORTED. Please don't report problems on the mpl mailing 
>> lists without submitting a patch to fix them. 
>>
>> Alex, please give this a spin. Tell me if it meets your needs, and if it 
>> doesnt, send a patch.
>> 
>
> Great! Thanks for incorporating this! It fits my needs, but I sent a (mostly
> unreleated) patch anyway (against 3278) :)
>
> cheers,
>
> 'as
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> 
From: Emmanuel <man...@gm...> - 2007年12月18日 12:29:10
Yes, I think strpdate2num is based on dateutil.parser.parse thast's why I
tried dayfirst=3DTrue which is used with dateutil.parser.parse.
It would be funny if from a list of string, it could be automatically try t=
o
decide between day/month/year, month/day/year format... (it=B4s a joke)
From: Lionel R. <lro...@li...> - 2007年12月18日 08:17:51
Hi Emmanuel,
look at dateutil.parser.parse, there is exactly what you search.
Le mardi 18 d=C3=A9cembre 2007, Emmanuel a =C3=A9crit=C2=A0:
> Ok, thank you!
>
> I'm missing an option to (easily) use date that start with the day
> day/month/year (it is the case in Brazil and France for example)
>
> I'm using something like tha
> date_Ymd=3D"%s/%s/%s" % (datedayfirst.split('/')[2],datedayfirst.split
> ('/')[1],datedayfirst.split ('/')[0])
>
> I was lookigng for sometinh like that :
>
> datestr2num(a,dayfirst=3DTrue)
> or
> datestr2num(a,fmt=3D"%d/%m/%Y")
>
> On Dec 11, 2007 11:16 AM, John Hunter <jd...@gm...> wrote:
> > On Dec 11, 2007 6:00 AM, Emmanuel <emm...@fa...> wrote:
> > > Hi,
> > >
> > > I've a little problem with date conversion. I have a csv file which
> >
> > looks
> >
> > > like :
> > > "Data","Valor"
> > > "15/01/2007"," 6,700012000"
> > > "12/01/2007"," 6,659903000"
> > >
> > > "11/01/2007"," 6,701586000"
> > >
> > > I try to get date using function strpdate2num in load doing this :
> >
> > Try stripping the double quote characters from you file.
> >
> > JDH
> >
> > -----------------------------------------------------------------------=
=2D-
> > SF.Net email is sponsored by:
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://sourceforge.net/services/buy/index.php
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
=2D-=20
Lionel Roubeyrie - lro...@li...
Charg=C3=A9 d'=C3=A9tudes et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
From: Emmanuel <emm...@fa...> - 2007年12月18日 03:25:29
Ok, thank you!
I'm missing an option to (easily) use date that start with the day
day/month/year (it is the case in Brazil and France for example)
I'm using something like tha
date_Ymd="%s/%s/%s" % (datedayfirst.split('/')[2],datedayfirst.split
('/')[1],datedayfirst.split ('/')[0])
I was lookigng for sometinh like that :
datestr2num(a,dayfirst=True)
or
datestr2num(a,fmt="%d/%m/%Y")
On Dec 11, 2007 11:16 AM, John Hunter <jd...@gm...> wrote:
> On Dec 11, 2007 6:00 AM, Emmanuel <emm...@fa...> wrote:
> > Hi,
> >
> > I've a little problem with date conversion. I have a csv file which
> looks
> > like :
> > "Data","Valor"
> > "15/01/2007"," 6,700012000"
> > "12/01/2007"," 6,659903000"
> >
> > "11/01/2007"," 6,701586000"
> >
> > I try to get date using function strpdate2num in load doing this :
>
> Try stripping the double quote characters from you file.
>
> JDH
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Alan G I. <ai...@am...> - 2007年12月17日 15:54:29
On 2007年12月17日, Michael Droettboom apparently wrote:
> You can generate a PDF file with matplotlib, and then run 
> it through "acroread -toPostScript foo.pdf", and get 
> a reasonably well-optimized Postscript file. 
I did not know that.
Thanks!
Alan
From: Michael D. <md...@st...> - 2007年12月17日 14:51:20
Well, I hate to provide the disappointing answer, but it really doesn't 
work for Postscript. (The name pstricks has perhaps become misleading 
over time...)
It inserts special codes in the Postscript that aren't part of the Ps 
standard, but that ps2pdf14 is able to convert into the correct Pdf 
commands to handle alpha-blending. I don't see any advantage to that 
kind of workflow (with matplotlib) over just going directly to PDF.
There are other tricks to "fake" transparency in Postscript, for 
example, by calculating the polygon intersections, etc., but that is 
significant work, and hard to do in a general way (i.e. anything 
overlapping anything), without writing a full-fledged geometry framework.
Fortunately, Adobe Reader already has such a thing. You can generate a 
PDF file with matplotlib, and then run it through "acroread 
-toPostScript foo.pdf", and get a reasonably well-optimized Postscript 
file. Unfortunately, ghostscript 7.07 doesn't seem to do this -- it can 
convert a pdf to a ps file, but the alphablended stuff appears as a 
raster image. Maybe newer versions (or poppler etc.) are able to do 
this, but I don't have them on my machine. It would be nice to know of 
an open source alternative, but Adobe Reader is at least free-as-in-beer.
Cheers,
Mike
Alan G Isaac wrote:
> On 2007年12月17日, Tom Johnson apparently wrote:
>> pstricks (tex) provides transparency... 
>> http://tug.org/PSTricks/main.cgi?file=Examples/Colors/colors#transparency 
>> http://tug.org/PSTricks/main.cgi?file=pst-plot/3D/examples#coor 
> 
> 
> Impressive. How is it done?
> 
> Cheers,
> Alan Isaac
> 
> 
> 
> 
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> 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: Jonathan K. <ki...@mi...> - 2007年12月17日 13:41:42
Thanks for the reply. I fixed my problem and thought I would post my 
findings. Basically, I never did find out what the problem was with 
those particular version was, but upgrading the packages eventually 
fixed it. Of course, that meant compiling numpy, python, pango, 
cairo.... etc. Took forever, but it did eventually work.
Thanks for all of your advice!
JK
John Hunter wrote:
> On Dec 5, 2007 12:53 PM, Jonathan King <ki...@mi...> wrote:
> 
>> i am having trouble installing matplotlib from source and thought i
>> would post my issue here.
>> i download matplotlib version 0.91.0
>> 
>
> It looks possibly like a numpy problem (you have a pretty old version installed)
>
> 
>> /usr/lib/python2.3/site-packages/numpy/core/include/numpy/ufuncobject.h:9:
>> error: 'intp' has not been declared
>> 
>
> Consider first upgrading to the latest numpy.
>
> JDH
> 
From: Michael D. <md...@st...> - 2007年12月17日 13:17:11
In the interest of fixing this bug for others, I wonder if you wouldn't 
mind testing something for me (since I don't have Windows handy, and 
even if I did, it wouldn't be *your* Windows environment...)
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?
Cheers,
Mike
Orest Kozyar wrote:
>> Not sure if this is your issue but I had problems with fonts until I
>> uncommented the RC file in the fonts section of it. Matplotlib ships with
>> the RC commented out. The file matplotlibrc is found in the
>> matplotlib\mpl-data folder. You can just edit it with Notepad and uncomment
>> the lines regarding fonts and try it again.
> 
> That worked perfectly. Thanks!
> 
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> 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: Alan G I. <ai...@am...> - 2007年12月17日 13:03:30
On 2007年12月17日, Tom Johnson apparently wrote:
> pstricks (tex) provides transparency... 
> http://tug.org/PSTricks/main.cgi?file=Examples/Colors/colors#transparency 
> http://tug.org/PSTricks/main.cgi?file=pst-plot/3D/examples#coor 
Impressive. How is it done?
Cheers,
Alan Isaac
From: Tom J. <tj...@gm...> - 2007年12月17日 09:34:25
Hi all,
I wasn't sure if this should be sent to matplotlib or ipython. I'm
got a number of questions, and any help would be greatly appreciated.
The docstring for draw_if_interactive says:
"""This should be overriden in a windowing environment if drawing
should be done in interactive python mode"""
(there should be two d's in overridden)
First, I'm not quite sure what this means....doesn't 'interactive'
imply 'interactive python mode'? So shouldn't this function always
need overriding (strange that this doesn't have two d's)?
The definition is:
 if matplotlib.is_interactive():
 figManager = Gcf.get_active()
 if figManager is not None:
 figManager.canvas.draw()
Now, when I load with ipython -pylab, the definition is:
 def wrapper(*args,**kw):
 wrapper.called = False
 out = func(*args,**kw)
 wrapper.called = True
 return out
Ipython says the definition is in genutils.py (ipython) but I can't
find it in there, and I don't know what "func" is. This is the
ipython part of my email: What does this function mean/do...and where
can I find where 'func' is defined.
Finally, the real reason for my email. I've been writing functions
which perform more complicated plot commands. In general, I don't
want the substeps to be shown, so I call matplotlib.interactive(False)
and then restore the state at the end of the function. Then I call
pylab.draw_if_interactive(). The first issue is that this doesn't
really work. Essentially this is what I am doing:
$ ipython -pylab
In [1]: ioff()
In [2]: plot(range(10))
In [3]: ion()
In [4]: draw_if_interactive()
On doing this, nothing shows up, unless I call show(). But the
following works without calling show....
$ ipython -pylab
In [1]: plot(range(10))
Why?
Assuming I can get this to work...it seems like a good solution so
long as my functions are called from "ipython -pylab", but I would
also like to be able to call such functions inside a GUI....and I am
concerned with the ramifications of the pylab.draw_if_interactive()
call. The only pylab command in the plot functions is the
draw_if_interactive...and my (wxPython) GUI uses OO matplotlib
throughout. Is this an issue? Do I need to overwrite this function?
If so, what needs to change so that I can use my functions in a GUI
(where I manually call draw) and in ipython. The quickest solution is
to have each function accept an keyword which tells it whether or not
to call draw_if_interactive()...but this is pain...and doesn't seem
very elegant. None of the matplotlib functions call
draw_if_interactive()...so perhaps there is another way to temporarily
turn off interactive mode and then restore the state.
Thanks.
From: Tom J. <tj...@gm...> - 2007年12月17日 08:53:16
On Dec 14, 2007 11:28 AM, Jeff Whitaker <js...@fa...> wrote:
> Mike: Postscript doesn't support alpha transparency. It might work
> with PDF though.
pstricks (tex) provides transparency...
http://tug.org/PSTricks/main.cgi?file=Examples/Colors/colors#transparency
http://tug.org/PSTricks/main.cgi?file=pst-plot/3D/examples#coor
Is there any way to get similar hacks into matplotlib? I'm guessing
this is a lot of work though.
From: John P. <jo...@cu...> - 2007年12月17日 04:12:33
Attachments: test-incid.py incid.csv
Hi Michael,
Thanks for the reply. A standalone example .py file is attached,
including a CSV file that it loads.
The backend is 'GTKAgg', and numerix is 'numpy'; settings for each of
these are all that is in my ~/.matplotlib/matplotlibrc file.
Cheers
JP
Michael Droettboom wrote:
> Can you provide a standalone example that exhibits this problem? I'm
> not able to reproduce this with 0.90.1 and the imshow examples
> (image_demo.py, image_origin.py).
>
> Which backend are you using?
>
> My only wild guess is -- with the Agg backend (possibly others), the
> image is stored flipped from how Agg wants to render it. So, the
> image is flipped (not the data, just the stride), then it is drawn,
> then it is flipped back. If there were an exception in the middle
> there, the number of flips may not remain even. Are there any
> exceptions being output? (These exceptions, since they're inside a
> GUI callback wouldn't necessarily halt the application). Beyond that,
> you could trace calls to im.flipupd_out and make sure they are even in
> number.
>
> Cheers,
> Mike
>
> John Pye wrote:
>> Hi all
>>
>> I have a problem with 'imshow' under matplotlib 0.90.1-2ubuntu1 on
>> ubuntu 7.10. I have an 'incidence matrix' created using the 'imshow'
>> command, and it works well except for the fact that sometimes when
>> resizing my window, the incidence matrix flips upside-down.
>>
>> Can I control this flipping of the incidence matrix? it seems to me to
>> be something that has just happened in a recent release of matplotlib,
>> as my application didn't used to show this problem.
>>
>> FYI The code that I'm using to drive mpl is here:
>> http://ascendcode.cheme.cmu.edu/viewvc.cgi/code/branches/extfn/pygtk/incidencematrix.py?view=markup
>>
>>
>> Cheers
>> JP
>>
>>
>>
>>
>> -------------------------------------------------------------------------
>>
>> SF.Net email is sponsored by:
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services
>> for just about anything Open Source.
>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Orest K. <ore...@gm...> - 2007年12月16日 22:13:52
> Not sure if this is your issue but I had problems with fonts until I
> uncommented the RC file in the fonts section of it. Matplotlib ships with
> the RC commented out. The file matplotlibrc is found in the
> matplotlib\mpl-data folder. You can just edit it with Notepad and uncomment
> the lines regarding fonts and try it again.
That worked perfectly. Thanks!
From: Robert K. <rob...@gm...> - 2007年12月15日 22:39:52
Jeff Whitaker wrote:
> Dave: Perhaps you need to add /usr/local to LD_LIBRARY_PATH?
It would be /usr/local/lib, not /usr/local
-- 
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
 -- Umberto Eco
From: David S. <dav...@rs...> - 2007年12月15日 16:08:38
Hi Jeff,
I just added it, but get the same error. Any other variables I need to set?
Thanks,
Dave
Jeff Whitaker wrote:
> David Simpson wrote:
>> I just tried to install basemap 0.9.8 but when I run simpletest.py 
>> from the examples directory I get:
>>
>> File 
>> "/usr/lib/python2.5/site-packages/matplotlib/toolkits/basemap/basemap.py", 
>> line 31, in <module>
>> import _geos, pupynere
>> ImportError: libgeos_c.so.1: cannot open shared object file: No such 
>> file or directory
>>
>>
>> I had installed the geos stuff to /usr/local following the 
>> instructions in the basemap README, and with export 
>> GEOS_DIR=/usr/local) and the above file seemed to install fine - it 
>> is found in my /usr/local/lib directory. I've tried running python 
>> with and without another explicit export GEOS_DIR statement. Same 
>> problem both ways.
>>
>> I'm running matplotlib 0.90.1 from Ubuntu Gutsy.
>>
>> Dave
>> 
>
> Dave: Perhaps you need to add /usr/local to LD_LIBRARY_PATH?
>
> -Jeff
>
-- 
----------------------------- 
Dr. David Simpson
Assoc. Prof.
EMEP MSC-W
Affiliation: Norwegian Meteorological Inst.
Location: Dept. Radio and Space Science (RSS), Chalmers University of Technology, Hörsalsvg. 11, SE-412 96, Gothenburg,Sweden
Tel: +46 (0) 703 305 691 (work-mobile)
Tel: +46 (0) 31 772 1588 
Fax: +46 (0) 31 772 1884
email: dav...@me...
From: Jeff W. <js...@fa...> - 2007年12月15日 15:52:20
David Simpson wrote:
> I just tried to install basemap 0.9.8 but when I run simpletest.py from 
> the examples directory I get:
>
> File 
> "/usr/lib/python2.5/site-packages/matplotlib/toolkits/basemap/basemap.py", 
> line 31, in <module>
> import _geos, pupynere
> ImportError: libgeos_c.so.1: cannot open shared object file: No such 
> file or directory
>
>
> I had installed the geos stuff to /usr/local following the instructions 
> in the basemap README, and with export GEOS_DIR=/usr/local) and the 
> above file seemed to install fine - it is found in my /usr/local/lib 
> directory. I've tried running python with and without another explicit 
> export GEOS_DIR statement. Same problem both ways.
>
> I'm running matplotlib 0.90.1 from Ubuntu Gutsy.
>
> Dave
> 
Dave: Perhaps you need to add /usr/local to LD_LIBRARY_PATH?
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
From: David S. <dav...@rs...> - 2007年12月15日 15:22:14
I just tried to install basemap 0.9.8 but when I run simpletest.py from 
the examples directory I get:
 File 
"/usr/lib/python2.5/site-packages/matplotlib/toolkits/basemap/basemap.py", 
line 31, in <module>
 import _geos, pupynere
ImportError: libgeos_c.so.1: cannot open shared object file: No such 
file or directory
I had installed the geos stuff to /usr/local following the instructions 
in the basemap README, and with export GEOS_DIR=/usr/local) and the 
above file seemed to install fine - it is found in my /usr/local/lib 
directory. I've tried running python with and without another explicit 
export GEOS_DIR statement. Same problem both ways.
I'm running matplotlib 0.90.1 from Ubuntu Gutsy.
Dave
From: Eric F. <ef...@ha...> - 2007年12月15日 02:09:46
Bryan Fodness wrote:
> I would also like to get the area of the mesh element when I fill the 
> corresponding array element.
> 
> if a[1,0]
> area = 1.0 * 0.01
> 
> if a[30,0]
> area = 0.5 * 0.01
> 
> Is this possible?
I'm sorry, but I don't understand what you are asking. Are you asking 
how to calculate an array of areas corresponding to the grid? You know 
what the delta-Y values are:
dy = numpy.array([1.4] + [1.0]*9 + [0.5]*40 + [1]*9 + [1.4])
Are you looking for
area = dy * 0.01
?
Eric
> On Nov 26, 2007 7:02 PM, Eric Firing <ef...@ha... 
> <mailto:ef...@ha...>> wrote:
> 
> Bryan Fodness wrote:
> > Could someone give me an idea how to get started with this so it
> > coincides with my array of values. I took a look at the
> quadmesh_demo
> > in the examples and do not see a straightforward way to do this
> 
> Maybe the docstrings make it sound more complicated than it really is.
> In your case you have an array of rectangles, not general
> quadrilaterals. All you need are two 1-D arrays, one each for the x
> and
> y grid boundaries. Something like this:
> 
> Z = numpy.random.rand(60,4000)
> X = numpy.arange(4001)
> Y = numpy.array([0, 1.4] + [1.0]*9 + [0.5]*40 + [1]*9 + [1.4]).cumsum()
> pcolor(X, Y, Z)
> 
> pcolormesh should work the same, but when I try it now with svn it
> doesn't; I don't know what is going on with it. If you are using a
> release version of mpl, I expect it will work.
> 
> Eric
> 
> >
> > On Nov 26, 2007 7:52 AM, Michael Droettboom <md...@st...
> <mailto:md...@st...>> wrote:
> >> You can provide mesh coordinates to the pcolor command:
> >>
> >> X and Y, if given, specify the (x,y) coordinates of the colored
> >> quadrilaterals; the quadrilateral for C[i,j] has corners at
> >> (X[i,j],Y[i,j]), (X[i,j+1],Y[i,j+1]), (X[i+1,j],Y[i+1,j]),
> >> (X[i+1,j+1],Y[i+1,j+1]). Ideally the dimensions of X and Y
> >> should be one greater than those of C; if the dimensions are the
> >> same, then the last row and column of C will be ignored.
> >>
> >> Actually generating the mesh is up to you (wink), but hopefully that
> >> allows for what you need to do.
> >>
> >> Cheers,
> >> Mike
> >>
> >>
> >> Bryan Fodness wrote:
> >>> I am wondering if there is a way to view my data with respect
> to the
> >>> physical size of what my array element is suppose to be.
> >>>
> >>> I have an array that is 60 x 4000 where,
> >>> the first row has a height of 1.4
> >>> the next nine has a height of 1
> >>> the next forty has a height of 0.5
> >>> the next nine has a height of 1
> >>> and the last one has a height of 1.4
> >>>
> >>> When viewing this with contourf or pcolor, the image is more narrow
> >>> than it should be. Is there an easy way to view this properly.
> >>>
> >>> Bryan
> >>>
> >> --
> >> Michael Droettboom
> >> Science Software Branch
> >> Operations and Engineering Division
> >> Space Telescope Science Institute
> >> Operated by AURA for NASA
> >>
> >
> >
> >
> 
> 
> 
> 
> -- 
> "The game of science can accurately be described as a never-ending 
> insult to human intelligence." - João Magueijo
From: Bryan F. <bry...@gm...> - 2007年12月15日 01:06:30
I would also like to get the area of the mesh element when I fill the
corresponding array element.
if a[1,0]
 area =3D 1.0 * 0.01
if a[30,0]
 area =3D 0.5 * 0.01
Is this possible?
On Nov 26, 2007 7:02 PM, Eric Firing <ef...@ha...> wrote:
> Bryan Fodness wrote:
> > Could someone give me an idea how to get started with this so it
> > coincides with my array of values. I took a look at the quadmesh_demo
> > in the examples and do not see a straightforward way to do this
>
> Maybe the docstrings make it sound more complicated than it really is.
> In your case you have an array of rectangles, not general
> quadrilaterals. All you need are two 1-D arrays, one each for the x and
> y grid boundaries. Something like this:
>
> Z =3D numpy.random.rand(60,4000)
> X =3D numpy.arange(4001)
> Y =3D numpy.array([0, 1.4] + [1.0]*9 + [0.5]*40 + [1]*9 + [1.4]).cumsum()
> pcolor(X, Y, Z)
>
> pcolormesh should work the same, but when I try it now with svn it
> doesn't; I don't know what is going on with it. If you are using a
> release version of mpl, I expect it will work.
>
> Eric
>
> >
> > On Nov 26, 2007 7:52 AM, Michael Droettboom <md...@st...> wrote:
> >> You can provide mesh coordinates to the pcolor command:
> >>
> >> X and Y, if given, specify the (x,y) coordinates of the colored
> >> quadrilaterals; the quadrilateral for C[i,j] has corners at
> >> (X[i,j],Y[i,j]), (X[i,j+1],Y[i,j+1]), (X[i+1,j],Y[i+1,j]),
> >> (X[i+1,j+1],Y[i+1,j+1]). Ideally the dimensions of X and Y
> >> should be one greater than those of C; if the dimensions are the
> >> same, then the last row and column of C will be ignored.
> >>
> >> Actually generating the mesh is up to you (wink), but hopefully that
> >> allows for what you need to do.
> >>
> >> Cheers,
> >> Mike
> >>
> >>
> >> Bryan Fodness wrote:
> >>> I am wondering if there is a way to view my data with respect to the
> >>> physical size of what my array element is suppose to be.
> >>>
> >>> I have an array that is 60 x 4000 where,
> >>> the first row has a height of 1.4
> >>> the next nine has a height of 1
> >>> the next forty has a height of 0.5
> >>> the next nine has a height of 1
> >>> and the last one has a height of 1.4
> >>>
> >>> When viewing this with contourf or pcolor, the image is more narrow
> >>> than it should be. Is there an easy way to view this properly.
> >>>
> >>> Bryan
> >>>
> >> --
> >> Michael Droettboom
> >> Science Software Branch
> >> Operations and Engineering Division
> >> Space Telescope Science Institute
> >> Operated by AURA for NASA
> >>
> >
> >
> >
>
>
--=20
"The game of science can accurately be described as a never-ending insult t=
o
human intelligence." - Jo=E3o Magueijo
From: Mark B. <ma...@gm...> - 2007年12月14日 23:20:04
I would guess:
CS=contour(A,[50,])
CS.clabel(fmt=FormatFaker('I')) # Labels contour 50 with I
CS=contour(A,[60,])
CS.clabel(fmt=FormatFaker('II')) # Labels contour 60 with II
Or write a loop if you have many values.
Mark
On Dec 14, 2007 11:44 PM, Michael Hearne <mh...@us...> wrote:
> I've seen this, but I'm not clever enough to see how to extend that to
> multiple levels - after all, I don't want to label every line with the same
> string...
> --Mike
> On Dec 14, 2007, at 3:20 PM, Mark Bakker wrote:
>
> Michael -
>
> This trick for replacing contour labels with a string was posted a little
> while back (by someone else):*
> *
>
> class FormatFaker(object):
> def __init__(self, str): self.str = str
> def __mod__(self, stuff): return self.str
>
> A=arange(100).reshape(10,10)
> CS=contour(A,[50,])
> CS.clabel(fmt=FormatFaker('Some String'))
>
>
>
> >
> > From: Michael Hearne <mh...@us... >
> > Subject: [Matplotlib-users] labeling contours with roman numerals
> > To: Matplotlib Users <mat...@li...>
> > Message-ID: < 843...@us...>
> > Content-Type: text/plain; charset="us-ascii"
> >
> > Does a LineCollection generated by contour() have a property that
> > holds the labels? I would like to label my contour lines with roman
> > numerals, and cannot figure out how to get clabel to do that.
> >
> > Thanks,
> >
> > Mike
> >
> >
> >
>
>
>
>
> ------------------------------------------------------
> Michael Hearne
> mh...@us...
> (303) 273-8620
> USGS National Earthquake Information Center
> 1711 Illinois St. Golden CO 80401
> Senior Software Engineer
> Synergetics, Inc.
> ------------------------------------------------------
>
>
>
From: Michael H. <mh...@us...> - 2007年12月14日 22:45:06
I've seen this, but I'm not clever enough to see how to extend that 
to multiple levels - after all, I don't want to label every line with 
the same string...
--Mike
On Dec 14, 2007, at 3:20 PM, Mark Bakker wrote:
> Michael -
> This trick for replacing contour labels with a string was posted a 
> little while back (by someone else):
> class FormatFaker(object):
> def __init__(self, str): self.str = str
> def __mod__(self, stuff): return self.str
>
> A=arange(100).reshape(10,10)
> CS=contour(A,[50,])
> CS.clabel(fmt=FormatFaker('Some String'))
>
>
>
> From: Michael Hearne <mh...@us... >
> Subject: [Matplotlib-users] labeling contours with roman numerals
> To: Matplotlib Users <mat...@li...>
> Message-ID: < 843...@us...>
> Content-Type: text/plain; charset="us-ascii"
>
> Does a LineCollection generated by contour() have a property that
> holds the labels? I would like to label my contour lines with roman
> numerals, and cannot figure out how to get clabel to do that.
>
> Thanks,
>
> Mike
>
>
>
------------------------------------------------------
Michael Hearne
mh...@us...
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
------------------------------------------------------
From: Mark B. <ma...@gm...> - 2007年12月14日 22:20:32
Michael -
This trick for replacing contour labels with a string was posted a little
while back (by someone else):*
*
class FormatFaker(object):
 def __init__(self, str): self.str = str
 def __mod__(self, stuff): return self.str
A=arange(100).reshape(10,10)
CS=contour(A,[50,])
CS.clabel(fmt=FormatFaker('Some String'))
>
> From: Michael Hearne <mh...@us...>
> Subject: [Matplotlib-users] labeling contours with roman numerals
> To: Matplotlib Users <mat...@li...>
> Message-ID: <843...@us...>
> Content-Type: text/plain; charset="us-ascii"
>
> Does a LineCollection generated by contour() have a property that
> holds the labels? I would like to label my contour lines with roman
> numerals, and cannot figure out how to get clabel to do that.
>
> Thanks,
>
> Mike
>
>
>
From: Jeff W. <js...@fa...> - 2007年12月14日 20:48:11
Michael Hearne wrote:
> Jeff - Yes! I'm working on implementing this now for my app...
>
> FYI, I got the following error:
> TypeError: drawmapboundary() got an unexpected keyword argument 
> 'fill_color'
>
>
> and again for 'lake_color' on the fillcontinents() method.
>
> I'm using 0.9.7, which I think is the latest released version...
Mike: Those are new keywords in 0.9.8 (released a few weeks ago).
-Jeff
>
> --Mike
> On Dec 14, 2007, at 1:31 PM, Jeff Whitaker wrote:
>
>> from matplotlib.toolkits.basemap import Basemap
>>
>> import pylab
>>
>> fig = pylab.figure()
>>
>> ax1 = fig.add_axes([0.1,0.1,0.8,0.8])
>>
>> m = Basemap(ax=ax1)
>>
>> m.drawcoastlines(linewidth=0.5)
>>
>> m.fillcontinents()
>>
>> ax2 = fig.add_axes([0.1,0.425,0.15,0.15])
>>
>> m2 = Basemap(projection='ortho',lon_0=-105,lat_0=40,ax=ax2)
>>
>> m2.drawmapboundary(fill_color='aqua')
>>
>> m2.drawcoastlines(linewidth=0.1)
>>
>> m2.fillcontinents(color='coral',lake_color='aqua')
>>
>> pylab.show()
>>
>
>
>
>
> ------------------------------------------------------
> Michael Hearne
> mh...@us... <mailto:mh...@us...>
> (303) 273-8620
> USGS National Earthquake Information Center
> 1711 Illinois St. Golden CO 80401
> Senior Software Engineer
> Synergetics, Inc.
> ------------------------------------------------------
>
>
-- 
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
1 message has been excluded from this view by a project administrator.

Showing results of 331

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