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

Showing results of 398

<< < 1 .. 11 12 13 14 15 16 > >> (Page 13 of 16)
Hi Gary,
What python ide are you using ? The interactive usage of matplotlib
only works for certain editors, and it depends on what backend you
use. The editor that most (I think) people use on this list is
ipython, which has been designed to work with matplotlib and has a
number of very useful features. From what I understand, executing
ipython with the -pylab flag tells ipython to import pylab and tells
it how to deal with figure windows popping out.
If you don't want to use Ipython, you could change the backend to Agg,
which is non interactive (figures won't pop up), save figures to a
file and open it with a viewer. For instance, the following should
work from any ide.
from pylab import *
plot([1,2,3])
title('test')
savefig('test')
To use the interactive mode, you'll have to use an editor supporting
matplotlib. This is discussed in the user's guide.
Good luck
David
2006年3月8日, Mitchell, Gary (Gary) <gm...@ag...>:
> Hello,
> I have installed python 2.4.2 with numpy and scipy installed and when I t=
ry to import pylab, I get:
> python.exe has encountered a problem and needs to close. We are sorry for=
 the inconvenience.
>
> Has any one seen this issue? I just started using python so am not sure =
what to do. I installed pygtk and freetype and set the matplotlibrc file t=
o:
>
> #### CONFIGURATION BEGINS HERE
> # the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg
> # Agg Cairo GD GDK Paint PS SVG Template
> backend : GTKAgg
> numerix : numpy # numpy, Numeric or numarray
>
> I really would like to use matplotlib but need help solving this problem =
if any one can help it sure would be great!
>
> Regards
>
> Gary Mitchell
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting langua=
ge
> that extends applications into web and mobile media. Attend the live webc=
ast
> and join the prime developer group breaking into this new coding territor=
y!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid1720ドル&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>>>>> "Mitchell," == Mitchell, Gary (Gary) <gm...@ag...> writes:
 Mitchell,> I have installed the following versions of packages
 Mitchell,> matplotlib 0.87.1 numpy 0.9.5 scipy 0.4.6 GTK-
 Mitchell,> Runtime-Environment-2.2.4-3 pygtk-2.8.4-1 and python
 Mitchell,> does not exit but I had to go get
 Mitchell,> libglib-2.0-0.dll,iconv.dll and intl.dll when I try to
 Mitchell,> use GTKAgg backend. It still gets an error stating the
 Mitchell,> procedure entry point g_assert_warning could not be
 Mitchell,> located in the dynamic link library libglib-2.0-0.dll.
 Mitchell,> So I seem to be getting further but... does anybody
 Mitchell,> know why python could not find the above dll's and how
 Mitchell,> to they get installed? It would seem I need another
 Mitchell,> package?? Regards Gary
Did you set your PATH to point to the gtk lib and bin subdirs as
described on the gtk installation section of
http://matplotlib.sourceforge.net/backends.html (see the "Windows GTK
Quickstart" section)
Also, this FAQ may help
 http://matplotlib.sourceforge.net/faq.html#GTKPATH
If you get it working, consider posting a short entry in the
matplotlib wiki.
Let us know if you have nay other questions...
JDH
Hey Gary,
I haven't used matplotlib in windows for awhile, but when I did, I had
good success with the TkAgg and WXAgg backends. I don't remember if
the TkAgg had other things I needed to install, but I think if you
have wxPython already installed, then WXAgg works well out-of-the-box
(but my memory could be flaky or things could have changed).
Ryan
On 3/8/06, Mitchell, Gary (Gary) <gm...@ag...> wrote:
> I have installed the following versions of packages
>
> matplotlib 0.87.1
> numpy 0.9.5
> scipy 0.4.6
> GTK- Runtime-Environment-2.2.4-3
> pygtk-2.8.4-1 and python does not exit but I had to go get libglib-2.0-0.=
dll,iconv.dll and intl.dll when I try to use GTKAgg backend. It still gets=
 an error stating the procedure entry point g_assert_warning could not be l=
ocated in the dynamic link library libglib-2.0-0.dll.
> So I seem to be getting further but... does anybody know why python coul=
d not find the above dll's and how to they get installed? It would seem I =
need another package??
> Regards
> Gary
>
>
> ________________________________
>
> From: Mitchell, Gary (Gary)
> Sent: Wed 3/8/2006 10:02 AM
> To: mat...@li...
> Subject: I can not get matplotlib to work on a windows xp professional ma=
chine
>
>
> Hello,
> I have installed python 2.4.2 with numpy and scipy installed and when I t=
ry to import pylab, I get:
> python.exe has encountered a problem and needs to close. We are sorry for=
 the inconvenience.
>
> Has any one seen this issue? I just started using python so am not sure =
what to do. I installed pygtk and freetype and set the matplotlibrc file t=
o:
>
> #### CONFIGURATION BEGINS HERE
> # the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg
> # Agg Cairo GD GDK Paint PS SVG Template
> backend : GTKAgg
> numerix : numpy # numpy, Numeric or numarray
>
> I really would like to use matplotlib but need help solving this problem =
if any one can help it sure would be great!
>
> Regards
>
> Gary Mitchell
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting langua=
ge
> that extends applications into web and mobile media. Attend the live webc=
ast
> and join the prime developer group breaking into this new coding territor=
y!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid1720ドル&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Mitchell, G. \(Gary\) <gm...@ag...> - 2006年03月08日 18:31:52
I have installed the following versions of packages
=20
matplotlib 0.87.1
numpy 0.9.5
scipy 0.4.6
GTK- Runtime-Environment-2.2.4-3
pygtk-2.8.4-1 and python does not exit but I had to go get =
libglib-2.0-0.dll,iconv.dll and intl.dll when I try to use GTKAgg =
backend. It still gets an error stating the procedure entry point =
g_assert_warning could not be located in the dynamic link library =
libglib-2.0-0.dll.
So I seem to be getting further but... does anybody know why python =
could not find the above dll's and how to they get installed? It would =
seem I need another package??
Regards
Gary
=20
________________________________
From: Mitchell, Gary (Gary)
Sent: Wed 3/8/2006 10:02 AM
To: mat...@li...
Subject: I can not get matplotlib to work on a windows xp professional =
machine
Hello,
I have installed python 2.4.2 with numpy and scipy installed and when I =
try to import pylab, I get:=20
python.exe has encountered a problem and needs to close. We are sorry =
for the inconvenience.
Has any one seen this issue? I just started using python so am not sure =
what to do. I installed pygtk and freetype and set the matplotlibrc =
file to:
#### CONFIGURATION BEGINS HERE
# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg=20
# Agg Cairo GD GDK Paint PS SVG Template
backend : GTKAgg=20
numerix : numpy # numpy, Numeric or numarray
I really would like to use matplotlib but need help solving this problem =
if any one can help it sure would be great!
Regards
Gary Mitchell
=20
From: Eric F. <ef...@ha...> - 2006年03月08日 18:11:13
John,
John Hunter wrote:
>>>>>>"Darren" == Darren Dale <dd...@co...> writes:
> 
> Darren> Thank you for the suggestion. How is it compatible with
> Darren> Python-2.3? Do you mean we would include the source for
> Darren> that module in mpl?
> 
> Yep, just as we include pyparsing, et al.
> 
> JDH
What about Python-2.2? Do we still need to stay compatible with that? 
I would be happy to see that go, and officially move the requirement up 
to 2.3, if this has not already been done.
Eric
From: Gary <pa...@in...> - 2006年03月08日 17:19:39
Ryan, does it make any sense to send me your code offline?
In return, I'll send you something I have that uses Tkinter, vpython, 
and threading (but no MPL). We might not be able to crack each 
other's logic, but we both might learn something.
Hmm... I might have some stuff left over from when I was trying to use 
vpython and MPL for realtime plotting. IIRC, it worked but was slow.
BTW, I ended up using Pmw.Blt for reatime plotting. It works ok and 
is fast, but is a bit scary because development has been moribund (some 
recent signs of activity).
-Gary
Ryan Krauss wrote:
>I am trying to combine matplotlib and vpython (the visual module) and
>I am running into a threading issue (I think that is the issue). I am
>basically trying to create a virtual demo for a feedback controls
>course. I show an animation of a pendulum with different controls (P,
>PD, PID, ...) and then after a few seconds of demo, the visual
>animation loop calls a function that plots the step response of the
>system with pylab. This all works great the first time, and after I
>close the pylab window, the animation starts back up again as I think
>it should. But I can't get additional plot windows to work correctly.
> At first I just called show() at the end of the plot loop. When I
>did that, the first time plotting worked correctly, the second time
>did nothing and the third showed an empty plot (I manually closed the
>plot window each time to resume the annimation thread). Later I added
>a pylab.close('all') after pylab.show() as an attempt to clean up
>after the window closing. Now the first plot is still good, but all
>the rest don't seem to do anything.
>
>Does anyone have any experience making vpython/visual play well with matplotlib?
>
>I am using the TkAgg backend.
>
>Thanks,
>
>Ryan
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by xPML, a groundbreaking scripting language
>that extends applications into web and mobile media. Attend the live webcast
>and join the prime developer group breaking into this new coding territory!
>http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid1720ドル&dat1642
>_______________________________________________
>Matplotlib-users mailing list
>Mat...@li...
>https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> 
>
From: Andrew S. <str...@as...> - 2006年03月08日 17:18:25
Darren Dale wrote:
>On Wednesday 08 March 2006 12:07, you wrote:
> 
>
>>Hi Darren,
>>
>> 
>>
>>>Does anyone know how to catch exit status using os.popen and friends?
>>> 
>>>
>>You may want to switch to subprocess.py. It comes with Python 2.4, but
>>it's backwards compatible with Python2.3 (maybe older). 
>> 
>>
>
>Thank you for the suggestion. How is it compatible with Python-2.3? Do you 
>mean we would include the source for that module in mpl?
> 
>
Yes, exactly.
From: John H. <jdh...@ac...> - 2006年03月08日 17:17:48
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
 Darren> Thank you for the suggestion. How is it compatible with
 Darren> Python-2.3? Do you mean we would include the source for
 Darren> that module in mpl?
Yep, just as we include pyparsing, et al.
JDH
From: Darren D. <dd...@co...> - 2006年03月08日 17:15:21
On Wednesday 08 March 2006 12:07, you wrote:
> Hi Darren,
>
> >Does anyone know how to catch exit status using os.popen and friends?
>
> You may want to switch to subprocess.py. It comes with Python 2.4, but
> it's backwards compatible with Python2.3 (maybe older). 
Thank you for the suggestion. How is it compatible with Python-2.3? Do you 
mean we would include the source for that module in mpl?
From: Christopher B. <Chr...@no...> - 2006年03月08日 17:12:17
John Hunter wrote:
> The downside of having to use kwargs like this is that you have to
> know about them in advance.
Quite true.
> We could support
> 
> ax.xlim = 0,1
> 
> Simply by defining the appropriate __getattr__ and __setattr__
> functions with the existing code base in just a few lines of code.
> If you want to take a stab at this, I think it would be preferable
> to writing "another interface". Better to improve the OO interface we
> have....
I totally agree. The few things that might be nice would be some of 
pylab's figure, etc. management, with an OO style, but at the moment, 
I'm not even sure what those would be. I guess I need to wait until I 
find I need something, and then worry about it.
My goal had been to write another interface, with the idea that, if you 
liked it, it could get rolled into the main code, but as you seem to be 
interested, there's no reason not to just start rolling it in now.
> The heavy reliance on setters and getters dates to the fact that I was
> a C++ programmer before I was a python programmer
I suspected as much ;-)
Indeed, I've used a fair number of set_this() methods myself, even 
though Python is my first OO language. I'm changing my style more after 
reading "Python is not Java"
> Since there
> is a lot of code built around them at this point (particularly for
> those doing a lot of OO matplotlib including yours truly) I am
> hesitant to completely break it. 
Of course. A major refactor is not the least bit necessary.
> My inclination at this point is to take the path of least resistance
> and simply make properties out of the existing setters and getters.
That sounds good to me. I'm still unclear on what traits buys you. maybe 
I need to look at it again.
> think we could use python properties for this or do our own
> getattr/setattr magic.
I'd just go with properties -- that's what they are for, and it would 
take very little code.
At some point I need to just shut up and write some code (and some 
docs). But there are so many things I want to do!
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Andrew S. <str...@as...> - 2006年03月08日 17:07:25
Hi Darren,
>Does anyone know how to catch exit status using os.popen and friends?
>
You may want to switch to subprocess.py. It comes with Python 2.4, but
it's backwards compatible with Python2.3 (maybe older). We could just
include it alongside the modules that want to use it. It's pretty easy
to use and is meant to unify all the various ways of executing a subprocess.
Here's an example from some other code of mine (a recursive build tool
that seeks out directories with setup.py and builds them with
setuptools). It should be a good example of using subprocess.
 args = [sys.executable,'-c',"import setuptools; execfile('setup.py')"]
 args.extend(commands)
 
 print dir,':',' '.join(args)
 sub = subprocess.Popen(args,
 cwd=dir,
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE,
 )
 sub.wait()
 if sub.returncode != 0:
 print '-='*20
 print '*** The following call failed:'
 print args
 stdout = sub.stdout.read()
 if len(stdout):
 print '*** stdout was:'
 print stdout
 stderr = sub.stderr.read()
 if len(stderr):
 print '*** stderr was:'
 print stderr
 print '-='*20
 sys.exit( sub.returncode )
From: Mitchell, G. \(Gary\) <gm...@ag...> - 2006年03月08日 17:04:10
Hello,
I have installed python 2.4.2 with numpy and scipy installed and when I =
try to import pylab, I get:=20
python.exe has encountered a problem and needs to close. We are sorry =
for the inconvenience.
Has any one seen this issue? I just started using python so am not sure =
what to do. I installed pygtk and freetype and set the matplotlibrc =
file to:
#### CONFIGURATION BEGINS HERE
# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg=20
# Agg Cairo GD GDK Paint PS SVG Template
backend : GTKAgg=20
numerix : numpy # numpy, Numeric or numarray
I really would like to use matplotlib but need help solving this problem =
if any one can help it sure would be great!
Regards
Gary Mitchell
=20
From: Ryan K. <rya...@gm...> - 2006年03月08日 16:49:41
Switching to the GTKAgg backend seems to fix this problem. Does that
make sense? Can this be made to work with the TkAgg backend or should
I just plan to use a different backend for this kind of thing?=20
(obviously that isn't a big deal if I just drop a matplotlibrc file in
the animation directory.)
Thanks,
Ryan
On 3/8/06, Ryan Krauss <rya...@gm...> wrote:
> I am trying to combine matplotlib and vpython (the visual module) and
> I am running into a threading issue (I think that is the issue). I am
> basically trying to create a virtual demo for a feedback controls
> course. I show an animation of a pendulum with different controls (P,
> PD, PID, ...) and then after a few seconds of demo, the visual
> animation loop calls a function that plots the step response of the
> system with pylab. This all works great the first time, and after I
> close the pylab window, the animation starts back up again as I think
> it should. But I can't get additional plot windows to work correctly.
> At first I just called show() at the end of the plot loop. When I
> did that, the first time plotting worked correctly, the second time
> did nothing and the third showed an empty plot (I manually closed the
> plot window each time to resume the annimation thread). Later I added
> a pylab.close('all') after pylab.show() as an attempt to clean up
> after the window closing. Now the first plot is still good, but all
> the rest don't seem to do anything.
>
> Does anyone have any experience making vpython/visual play well with matp=
lotlib?
>
> I am using the TkAgg backend.
>
> Thanks,
>
> Ryan
>
From: Ryan K. <rya...@gm...> - 2006年03月08日 16:44:54
I am trying to combine matplotlib and vpython (the visual module) and
I am running into a threading issue (I think that is the issue). I am
basically trying to create a virtual demo for a feedback controls
course. I show an animation of a pendulum with different controls (P,
PD, PID, ...) and then after a few seconds of demo, the visual
animation loop calls a function that plots the step response of the
system with pylab. This all works great the first time, and after I
close the pylab window, the animation starts back up again as I think
it should. But I can't get additional plot windows to work correctly.
 At first I just called show() at the end of the plot loop. When I
did that, the first time plotting worked correctly, the second time
did nothing and the third showed an empty plot (I manually closed the
plot window each time to resume the annimation thread). Later I added
a pylab.close('all') after pylab.show() as an attempt to clean up
after the window closing. Now the first plot is still good, but all
the rest don't seem to do anything.
Does anyone have any experience making vpython/visual play well with matplo=
tlib?
I am using the TkAgg backend.
Thanks,
Ryan
From: David H. <dav...@gm...> - 2006年03月08日 14:57:19
Try giving a numpy array for the facecolor argument :
>>> ..., c =3D numpy.array(faceColor), ...
The scatter function seems to need a numpy array, not just any python seque=
nce.
David
2006年3月8日, Jeff Peery <jef...@ya...>:
> Hello, I am using scatter to plot simple arrays. It seems to crash when I
> scatter an array of length 3. any other length works fine. I'm not savvy
> enough to know how to track this bug down. here is my code, and below tha=
t I
> pasted the error message the IDLE gave me. what might be the problem?
> thanks.
>
> My code:
> from pylab import *
>
>
> array =3D [2,3,4]
> faceColor =3D (1,1,1)
> scatter(range(len(array)),
> array,
> marker=3D'o',
> c=3DfaceColor,
> edgecolor=3D'k',
> linewidth=3D1,
> alpha=3D0.5,
> s=3D50,
> label=3D'hi')
> show()
>
>
> the error message:
> Traceback (most recent call last):
> File "C:/Documents and Settings/TEMP/Desktop/test.py", line 15, in
> -toplevel-
> label=3D'hi')
> File
> "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line
> 2192, in scatter
> ret =3D gca().scatter(*args, **kwargs)
> File "C:\Python24\lib\site-packages\matplotlib\axes.py",
> line 3082, in scatter
> collection.set_array(c)
> File "C:\Python24\Lib\site-packages\matplotlib\cm.py",
> line 60, in set_array
> self._A =3D A.astype(nx.Float32)
> AttributeError: 'tuple' object has no attribute 'astype'
> >>>
>
>
>
>
>
> ________________________________
> Yahoo! Mail
> Bring photos to life! New PhotoMail makes sharing a breeze.
>
>
From: Ryan K. <rya...@gm...> - 2006年03月08日 13:43:04
I think I got it. I had to play around a bit with a couple different
approaches. Part of the trick is that you have to run latex with
-interaction=3Dnonstopmode, otherwise the child process never completes
and it seems like most of python's tools for capturing the errors and
outputs just hang.
Here is what I did:
import popen2
In [8]: latexcmd3=3Dpopen2.Popen3('latex -interaction=3Dnonstopmode bad.tex=
')
In [9]: latexcmd3.wait()
Out[9]: 256
In [10]: latexcmd4=3Dpopen2.Popen3('latex -interaction=3Dnonstopmode good.t=
ex')
In [11]: latexcmd4.wait()
Out[11]: 0
where bad.tex and good.tex basically have just headers and
\frac{1}{\theta} with and without $$ around it. If I just use
os.popen3, the stderr object returned is empty in both cases:
In [14]: r,w,e=3Dos.popen3('latex -interaction=3Dnonstopmode good.tex')
In [15]: e.readlines()
Out[15]: []
In [16]: r,w,e=3Dos.popen3('latex -interaction=3Dnonstopmode bad.tex')
In [17]: e.readlines()
Out[17]: []
and to know there was a problem, you would have to parse w.readlines()
- and in this case it doesn't even say there is an error, it mentions
something about a missing $.
But it seems like creating your own Popen3 object and executing it
through the wait() command, returns 0 on a clean exit or 256 on the
bad ones (at least for this error). I have compiled one other good
file from my hard drive and it also returns 0.
Hope this helps,
Ryan
On 3/8/06, Darren Dale <dd...@co...> wrote:
> >> On Wednesday 08 March 2006 5:06 am, Nils Wagner wrote:
> >>
> >>> Hi all,
> >>>
> >>> How do I use \frac{a}{b} within labels ?
> >>>
> >>> from pylab import *
> >>> from scipy import *
> >>> x =3D linspace(0,pi,20)
> >>> plot(x,sin(x))
> >>> title(r'\frac{\Theta}{2\pi}')
> >>> xlabel(r'\frac{\Theta}{2\pi}') # The output is not o.k.
> >>> show()
> >>>
> >>> Am I missing something or is it a bug ?
> >>>
> >>
> >> What does "The output is not o.k." mean?
> >>
> > The output is somewhat like \Theta \frac{}{2\pi}
> > If I use
> > xlabel(r'$\frac{\Theta}{2\pi}$')
> >
> > it works fine.
>
> This is not a bug. Please keep in mind that usetex is really only an inte=
rface
> to latex. For problems specific to LaTeX, it would be best to consult the
> appropriate sources or lists. As it happens, \frac is only allowed in mat=
h
> mode. That it produced any output at outside of mathmode is a case of fai=
ling
> silently.
>
> Does anyone know how to catch exit status using os.popen and friends? LaT=
eX
> would have returned an exit status of 1 for this example, which could be =
used
> to raise a warning.
>
> Darren
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting langua=
ge
> that extends applications into web and mobile media. Attend the live webc=
ast
> and join the prime developer group breaking into this new coding territor=
y!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid1720ドル&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jouni K S. <jk...@ik...> - 2006年03月08日 13:42:22
Darren Dale <dd...@co...> writes:
> Does anyone know how to catch exit status using os.popen and
> friends? LaTeX would have returned an exit status of 1 for this
> example, which could be used to raise a warning.
I think you should get the exit status from the close() method, and 
http://docs.python.org/lib/os-newstreams.html
seems to confirm this. Strangely, popen2 etc do not allow you to get
the exit status.
-- 
Jouni
From: Darren D. <dd...@co...> - 2006年03月08日 12:28:42
>> On Wednesday 08 March 2006 5:06 am, Nils Wagner wrote:
>> =A0=20
>>> Hi all,
>>>
>>> How do I use \frac{a}{b} within labels ?
>>>
>>> from pylab import *
>>> from scipy import *
>>> x =3D linspace(0,pi,20)
>>> plot(x,sin(x))
>>> title(r'\frac{\Theta}{2\pi}')
>>> xlabel(r'\frac{\Theta}{2\pi}') =A0# The output is not o.k.
>>> show()
>>>
>>> Am I missing something or is it a bug ?
>>> =A0 =A0=20
>>
>> What does "The output is not o.k." mean?
>> =A0=20
> The output is somewhat like \Theta \frac{}{2\pi}
> If I use
> xlabel(r'$\frac{\Theta}{2\pi}$')
>
> it works fine.
This is not a bug. Please keep in mind that usetex is really only an interf=
ace=20
to latex. For problems specific to LaTeX, it would be best to consult the=20
appropriate sources or lists. As it happens, \frac is only allowed in math=
=20
mode. That it produced any output at outside of mathmode is a case of faili=
ng=20
silently.
Does anyone know how to catch exit status using os.popen and friends? LaTeX=
=20
would have returned an exit status of 1 for this example, which could be us=
ed=20
to raise a warning.
Darren
From: Christian M. <mee...@un...> - 2006年03月08日 12:22:43
Hoi,
On Wednesday 08 March 2006 11:06, Nils Wagner wrote:
> title(r'\frac{\Theta}{2\pi}')
> xlabel(r'\frac{\Theta}{2\pi}') # The output is not o.k.
And the writing the title is working? Try
 xlabel(r'$\frac{\Theta}{2\pi}$')
instead.
Hope this helps.
Christian
From: Randewijk P-J <pjr...@su...> - 2006年03月08日 12:22:31
For the pstoeps function,
def pstoeps(tmpfile, bbox):
"""
Use ghostscript's bbox device to determine the
bounding box, then convert
the postscript to encapsulated postscript. This
function is only needed for
the usetex option.
"""
The following needs to be changed/added to make it work
on a win32 platform
if sys.platform =3D=3D 'win32': gs_exe =3D 'gswin32c'
else: gs_exe =3D 'gs'
command =3D '%s -dBATCH -dNOPAUSE -sDEVICE=3Dbbox "%s"'
% (gs_exe, tmpfile)
see SVN patch to backend_ps.py rev. 2131 @
http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1445612&grou=
p_i
d=3D80706&atid=3D560722
PJR
PS: To the patch administrator (JDH ?), please delete Request ID:
1445611 & 1445604, had some problems uploading the patch (forgot tot
check the checkbox)
From: Nils W. <nw...@me...> - 2006年03月08日 10:07:11
Hi all,
How do I use \frac{a}{b} within labels ?
from pylab import *
from scipy import *
x = linspace(0,pi,20)
plot(x,sin(x))
title(r'\frac{\Theta}{2\pi}')
xlabel(r'\frac{\Theta}{2\pi}') # The output is not o.k.
show()
Am I missing something or is it a bug ?
matplotlib data path /usr/lib64/python2.4/site-packages/matplotlib/mpl-data
$HOME=/home/nwagner
CONFIGDIR=/home/nwagner/.matplotlib
ghostscript-8.15 found. ghostscript-8.16 or later is recommended for use
with the text.usetex option.
loaded rc file /home/nwagner/.matplotlib/matplotlibrc
matplotlib version 0.87.1
verbose.level helpful
interactive is False
platform is linux2
numerix numpy 0.9.6.2206
font search path ['/usr/lib64/python2.4/site-packages/matplotlib/mpl-data']
loaded ttfcache file /home/nwagner/.matplotlib/ttffont.cache
backend GTKAgg version 2.8.0
Nils
From: Jeff P. <jef...@ya...> - 2006年03月08日 05:36:19
Hello, I am using scatter to plot simple arrays. It seems to crash when I scatter an array of length 3. any other length works fine. I'm not savvy enough to know how to track this bug down. here is my code, and below that I pasted the error message the IDLE gave me. what might be the problem? thanks.
 
 My code:
 from pylab import *
 
 
 array = [2,3,4]
 faceColor = (1,1,1)
 scatter(range(len(array)),
 array,
 marker='o', 
 c=faceColor,
 edgecolor='k',
 linewidth=1,
 alpha=0.5,
 s=50,
 label='hi')
 show()
 
 
 the error message:
 Traceback (most recent call last):
 File "C:/Documents and Settings/TEMP/Desktop/test.py", line 15, in -toplevel-
 label='hi')
 File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 2192, in scatter
 ret = gca().scatter(*args, **kwargs)
 File "C:\Python24\lib\site-packages\matplotlib\axes.py", line 3082, in scatter
 collection.set_array(c)
 File "C:\Python24\Lib\site-packages\matplotlib\cm.py", line 60, in set_array
 self._A = A.astype(nx.Float32)
 AttributeError: 'tuple' object has no attribute 'astype'
 >>> 
 
 
 
 
		
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze. 
>>>>> "Chris" == Chris Seberino <seb...@sp...> writes:
 Chris> Matplotlib PNGs by default has a nice white background.
 Chris> What if you want to put the PNGs in a blue web page?
 Chris> Is there a way to make PNGs inherit background colors of
 Chris> web pages?
You can set the alpha property of any matplotlib figure element. The
two entities of interest here are the figure patch (rectangle
background) and axes patch (ditto)
 #0 is transparent, 1 is opaque
 fig.figurePatch.set_alpha(0.5)
 ax.axesPatch.set_alpha(0.5)
JDH
Matplotlib PNGs by default has a nice white background.
What if you want to put the PNGs in a blue web page?
Is there a way to make PNGs inherit background colors of web pages?
Chris
From: John H. <jdh...@ac...> - 2006年03月08日 00:30:36
>>>>> "Gerald" == Gerald John M Manipon <Ger...@jp...> writes:
 Gerald> Hello, Is there a way to specify that a legend show its
 Gerald> items horizontally instead of vertically, i.e.:
Hi Gerald,
There is no way to do this currently, but it shouldn't be *too* hard
to extend the Legend class to deal with this. The legend code is a
bit hairy, though...
JDH
5 messages has been excluded from this view by a project administrator.

Showing results of 398

<< < 1 .. 11 12 13 14 15 16 > >> (Page 13 of 16)
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 によって変換されたページ (->オリジナル) /