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
(11) |
2
(1) |
|
3
(5) |
4
(25) |
5
(14) |
6
(36) |
7
(13) |
8
(15) |
9
|
|
10
(5) |
11
(5) |
12
(11) |
13
(15) |
14
(9) |
15
(16) |
16
(3) |
|
17
(13) |
18
(7) |
19
(9) |
20
(12) |
21
(2) |
22
(6) |
23
|
|
24
(2) |
25
(1) |
26
(16) |
27
(7) |
28
(11) |
29
(8) |
30
(1) |
|
From: John H. <jdh...@ac...> - 2006-09-04 16:25:40
|
>>>>> ">" == <nbi...@sy...> writes:
>> line 154, in draw_image image64 = base64.b64encode
>> (imfile.read()) AttributeError: 'module' object has no
>> attribute 'b64encode'
>> Is there something I'm missing ?
It looks like the svg module was written assuming the python2.4 version
of the base64 standard library -- the b64encode method does not appear
to be available in python2.3. I replaced this with base64.encodestring
which appears to work under python2.3 and 2.4. If you have access to
svn, you can simply update. Otherwise replace "b64encode" with
"encodestring" in backend_svg.
JDH
|
|
From: Kevin H. <kho...@ro...> - 2006-09-04 15:34:25
|
On 4 Sep 2006, at 10:54, John Hunter wrote: >>>>>> "Kevin" == Kevin Horton <kho...@ro...> writes: > Kevin> subplot accepts a tuple in other places, so I would have > Kevin> expected the same behaviour here. Is this a bug that is > Kevin> fixed in a newer matplotlib version, in which case I will > Kevin> try to upgrade. Or, is there some other way to do my code > Kevin> that will work? > > You need to either do > > subplot(10,1,1) > > or > > tup = 10,1,1 > subplot(*tup) > > subplot does not accept a tuple: it either accepts and integer, eg > > num = 311 > subplot(num) > > or three args: numrows, numcols, num > > python let's you "unpack" tuple with the "*" operator. That works. Thank you very much. Kevin Horton Ottawa, Canada |
|
From: Benoit D. <do...@in...> - 2006-09-04 15:11:00
|
Dave,
I had the same problem as you. Here is a solution...
Try editing your matplotlib rc file and change these font preferences
font.serif : New Century Schoolbook, Century Schoolbook L,=20
Utopia, ITC Bookman, Bookman, Bitstream Vera Serif, Nimbus Roman No9 L,=20
Times New Roman, Times, Palatino, Charter, serif
font.sans-serif : Lucida Grande, Verdana, Geneva, Lucida,=20
Bitstream Vera Sans, Arial, Helvetica, Avant Garde, sans-serif
font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand,=20
cursive
font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact,=20
Western, fantasy
font.monospace : Andale Mono, Bitstream Vera Sans Mono, Nimbus=20
Mono L, Courier New, Courier, Fixed, Terminal, monospace
by moving the bitstream fonts to the front.
Next, you have to use LaTeX for all the 'text' you include in your plot.=20
Add rc('text', usetex=3DTrue) at the begining of your Python script or=20
modify your matplotlibrc file.
Everything is working fine after that.
Regards.
Benoit
David Andrews a =E9crit :
> Hiya, i'm having a problem getting a valid postscript file produced on =
OS X.
>=20
> Using the example subplot_demo.py, modified to include the line:
>=20
> savefig('subplot_demo')
>=20
> in the place of the show() command, and running it using:
>=20
> python subplot_demo.py -dPS
>=20
> Produces the .ps file (available here for reference:
> http://www.irbdavid.com/misc/subplot_demo.ps ), which can't be opened
> by Preview on os x - says its can't convert it to PDF & cant open the
> file. Checked the permissions etc on the file and they're fine.
>=20
> Its pretty much a default installation of matplotlib etc, and output
> displays fine on screen, using the wxPython / wxAgg thing (I think
> that's what i mean :D )
>=20
> Any suggestions?
>=20
> Regards,
>=20
> Dave
>=20
> -----------------------------------------------------------------------=
--
> Using Tomcat but need to do more? Need to support web services, securit=
y?
> Get stuff done quickly with pre-integrated technology to make your job =
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geron=
imo
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>=20
--=20
Benoit Donnet
Universite Catholique de Louvain
Facultes des Sciences Appliquees - Departement d'Ingenierie Informatique=20
(INGI)
Place Sainte Barbe, 1
1348 Louvain-la-Neuve
phone: +32 10 47 87 18
home page: http://rp.lip6.fr/~donnet
traceroute@home website: http://trhome.sourceforge.net
|
|
From: John H. <jdh...@ac...> - 2006-09-04 15:10:53
|
>>>>> "David" == David Andrews <irb...@gm...> writes:
David> Hiya, i'm having a problem getting a valid postscript file
David> produced on OS X. Using the example subplot_demo.py,
David> modified to include the line:
David> savefig('subplot_demo')
David> in the place of the show() command, and running it using:
David> python subplot_demo.py -dPS
David> Produces the .ps file (available here for reference:
David> http://www.irbdavid.com/misc/subplot_demo.ps ), which can't
David> be opened by Preview on os x - says its can't convert it to
David> PDF & cant open the file. Checked the permissions etc on
David> the file and they're fine.
David> Its pretty much a default installation of matplotlib etc,
David> and output displays fine on screen, using the wxPython /
David> wxAgg thing (I think that's what i mean :D )
We've noticed this on tiger several times. Some default system fault
is causing troubles though we haven't identified which one. The
recommended fix it to put the Vera fonts (which matplotlib ships with)
first in your rc file (http://matplotlib.sf.net/matplotlibrc) and
remove your ~/.matplotlib/ttf.cache before rerunning
Ie, you fonts section of ex should look something like this:
font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif
font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive
font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy
font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace
In future releases of mpl, this will be the default.
JDH
|
|
From: John H. <jdh...@ac...> - 2006-09-04 15:07:21
|
>>>>> "Kevin" == Kevin Horton <kho...@ro...> writes:
Kevin> subplot accepts a tuple in other places, so I would have
Kevin> expected the same behaviour here. Is this a bug that is
Kevin> fixed in a newer matplotlib version, in which case I will
Kevin> try to upgrade. Or, is there some other way to do my code
Kevin> that will work?
You need to either do
subplot(10,1,1)
or
tup = 10,1,1
subplot(*tup)
subplot does not accept a tuple: it either accepts and integer, eg
num = 311
subplot(num)
or three args: numrows, numcols, num
python let's you "unpack" tuple with the "*" operator.
JDH
|
|
From: John H. <jdh...@ac...> - 2006-09-04 15:01:22
|
>>>>> "Michael" == Michael Fitzgerald <mp...@be...> writes:
Michael> Hi all,
Michael> I have a question about zorder and Axis elements. I read
Michael> in the thread titled "zorder not working for grid
Michael> lines??" that since grid lines are Axis elements, they
Michael> don't respect the zorder. It's possible to set grid
Michael> lines below other plot elements with
Michael> Axis.set_axisbelow(). However, I have a case where I
Michael> want grid lines to be below my plot elements, but I want
Michael> the ticks to be above them (test code attached). As it
Michael> stands, they can be either both below or both above.
Michael> Has anyone found a way around this limitation? Is having
Michael> zorder apply to Axis elements on the wishlist?
It would be a cleaner solution if the grid and ticks respected the
zorder property, but it's not trivial to do it that way given the
current design. Instead, as you've noticed, you need to set the
axisbelow property on the axes
ax.set_axisbelow(True)
but this doesn't solve your problem of needing the ticks above and
grid below.... You might try setting both above, but setting the
alpha on the grid so you can at least see through it.
Yes, fixing this is on the list of things to do, but doing it right
would requires a significant refactoring of the way ticks are
handled.
JDH
|
|
From: Jon Roadley-B. <jon...@gm...> - 2006-09-04 14:57:17
|
I have run into a problem with matplotlib, GTK and Threading.
The program basically gets data over RS232 and if a certain command is sent
the data is plotted
So far the program is pretty mature and data can be read via RS232 and
written to RS232 and the
GUI is updated (text-widgets) accordingly
The problem I have with with the non-GUI thread calling the "plot" function.
Within the GTK-GUI class I added a method that basically plots a SINE-wave
when a button is pressed it plots another SINE-wave, basically just
proof-of-concept before I got onto the date via RS232
The thread-code to extract data (for plotting) via RS232 works fine but when
the thread calls a GUI method to update the
graph it locks up
CODE-SNIPPITS
class low_level(threading.Thread):
def __init__(self,Reg,GUI):
super(low_level, self).__init__()
self.timer = threading.Timer(3.0,self.__SetTimerState)
self.Reg = Reg
self.GUI = GUI
self.RUN = True
self.timer_exp = False
self.LOCAL_LIST = []
self.WRITELIST = []
...
def __Capture(self):
DATA = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
self.__Write(self.Reg.MON_Addr,self.Reg.MON[-1])
tmp = [x for x in self.Reg.CAPTURE_REQ if x >0 and x not in
locals()["_[1]"]]
tmp.insert(0,0)
for i in range(int(self.Reg.CAPTURE_SAMPLES)):
self.__Write(127)
for x in tmp:
t = self.__ReadData(self.Reg.MON_MASK[x][1])
if t == '::ERROR::':
print "Plotting data fault!!"
break
DATA[x].append(t)
DAT = [DATA[0]]
for x in self.Reg.CAPTURE_REQ:
if x <1: DAT.append(None)
else: DAT.append(DATA[x])
gtk.threads_enter()#updating GUI section
try:
self.GUI.ThreadGraph(DAT)
finally:
gtk.threads_leave()
self.Reg.CAPTURE = False
...
...
...
gtk.gdk.threads_init()
class appgui(object):
def __init__(self,Reg):
super(appgui, self).__init__()
self.Reg = Reg
self.gladefile=GLADE_FILE
self.windowname='ESC'
self.wTree=gtk.glade.XML (self.gladefile,self.windowname)
dic = {'on_quit_button_clicked' : self.QuitClicked,##callback
dictionary
'on_connect_button_clicked' : self.Connect,
'on_save_conf_clicked' : self.Save,
'on_load_conf_clicked' : self.Load,
'on_upload_clicked' : self.Upload,#GetRW,
'on_capture_clicked' : self.Capture,
'on_startstop_clicked' : self.StartStop,
'on_window_destroy' : (gtk.main_quit)}
self.wTree.signal_autoconnect(dic)
self.f = self.wTree.get_widget
self.GraphData(INIT_G)
...
def GraphData(self,DATA):
COLOUR = ['b','g','r','c','m','y','k']
try:
self.canvas.destroy()
self.toolbar.destroy()
except:pass
self.figure = Figure(figsize=(6,3), dpi=100)#{{{
self.axis = self.figure.add_subplot(111)
self.axis.grid(True)
self.axis.set_xlabel('Time (s)')
for x in range(1,len(DATA)):
if DATA[x] == None: continue
self.axis.plot(DATA[0],DATA[x],COLOUR[x-1],linewidth=2.0)
self.canvas = FigureCanvas(self.figure) # a gtk.DrawingArea
self.canvas.show()
self.graphview = self.wTree.get_widget('vboxgraph')
self.graphview.pack_start(self.canvas, True, True)
self.toolbar = NavigationToolbar(self.canvas,self.wTree.get_widget
('ESC'))
self.graphview.pack_start(self.toolbar, False, False)#}}}
...
if __name__ == '__main__':
Reg = Register()
app=appgui(Reg)
LL = low_level(Reg,app)
LL.start()
gtk.threads_enter()
gtk.main()
gtk.threads_leave()
LL.stop()
As it stands with this locks up, if I change the code such that when I press
the widget that starts the "Capture" fn from the thread, BUT that doesn't
update the plot
and if I add another button and in pressing that (NOTE that button's code
would be part of the GUI-class) calls the GraphData function then it works.
It seems even using the gtk.threads_enter and gtk.threads_leave with a
matplotlib embedded into a GTK windows does not work and any graph
modifications MUST
be called directly from the GUI-Class.
Any idea how to make matplotlib work well with GTK & Threads?
|
|
From: Kevin H. <kho...@ro...> - 2006-09-04 14:40:22
|
I'm a python newbie, using matplotlib 0.87.3. My code works, as long
as I limit myself to 9 subplots. But, I need more than 9.
Relevant parts of the code:
from matplotlib.figure import Figure
import pylab
f = Figure(figsize=(5,4), dpi=100)
plot1 = f.add_subplot((10,1,1), ylabel='Pitch (' + degreeChar + ')')
I get an error like:
Traceback (most recent call last):
File "Flt_Test_Data_Review.py", line 726, in ?
create_mpl_plots()
File "Flt_Test_Data_Review.py", line 246, in create_mpl_plots
plot1 = f.add_subplot((10,1,1), ylabel='Pitch (' + degreeChar +
')')
File "/sw/lib/python2.4/site-packages/matplotlib/figure.py", line
472, in add_subplot
a = Subplot(self, *args, **kwargs)
File "/sw/lib/python2.4/site-packages/matplotlib/axes.py", line
4316, in __init__
SubplotBase.__init__(self, fig, *args)
File "/sw/lib/python2.4/site-packages/matplotlib/axes.py", line
4208, in __init__
raise ValueError('Argument to subplot must be a 3 digits long')
ValueError: Argument to subplot must be a 3 digits long
subplot accepts a tuple in other places, so I would have expected the
same behaviour here. Is this a bug that is fixed in a newer
matplotlib version, in which case I will try to upgrade. Or, is
there some other way to do my code that will work?
Thanks,
Kevin Horton
Ottawa, Canada
|
|
From: PGM <pgm...@gm...> - 2006-09-04 08:37:24
|
On Monday 04 September 2006 05:20, Paul-Michael Agapow wrote: > I'm having some problems installing matplotlib (actually PyLab, see > below). Googling has revealed nothing, perhaps someone might > recognise these symptoms. mmh, you didn't check the mailing list before, did you ;) You didn't precise the version of numpy you were using, I gonna guess that it's at least 1.0b1, right ? MPL 0.87.4 is NOT compatible with this version of numpy. However, the svn version of matplotlib is, and works quite well. Please upgrade MPL, or wait a couple of days for the crew to release 0.87.5. |
|
From: Paul-Michael A. <mp...@ag...> - 2006-09-04 08:23:16
|
I'm having some problems installing matplotlib (actually PyLab, see
below). Googling has revealed nothing, perhaps someone might
recognise these symptoms.
The technical set up: OSX 10.4, MPL 0.87.4, numeric, numarray and
numpy installed.
While I've successfully installed and used MPL before, this is a new
MacBook and so it's the first time it's been installed here. (Caveat:
MPL may have been installed silently in an egg or a package that I
used to install another package, like a SciPy distribution.) I built
and installed MPL as usual. this appears to be fine and `import
matplotlib` works ok. However the problem comes when I go to `import
pylab`. Initially it complains that it cannot import pylab because it
fails on line 74 of `matplotlib/numerix/__init__.py` where `Matrix =
matrix`.
Investigation showed that just above that position, numpy was being
used as the numerical library and the import was thus:
import numpy.oldnumeric as numpy
from numpy.oldnumeric import *
However, oldnumeric doesn't define a term "matrix". Setting MPL to
use Numeric instead of Numpy, this step is passed but I run into the
next error, also at the "import pylab" stage:
21:15:23: Debug: ../src/common/object.cpp(224): assert
"sm_classTable->Get(m_className) == NULL" failed: class already in
RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() twice (may be by
linking some object module(s) twice)?
../src/common/object.cpp(224): assert "sm_classTable->Get
(m_className) == NULL" failed: class already in RTTI table - have you
used IMPLEMENT_DYNAMIC_CLASS() twice (may be by linking some object
module(s) twice)?
Initially I thought that this may have been the result of old
settings hanging around, but I cleaned all vestigaes of MPL & PyLab
from my system and got a fresh copy of the MPL source, before trying
again. Same result.
Any ideas on where I should look next? Apart from a downgrade, I'm at
a loss.
p
--
Dr Paul-Michael Agapow, VieDigitale / Institute of Animal Health
pm...@vi... / pau...@bb...
|
|
From: Zack <za...@gm...> - 2006-09-03 23:09:46
|
Hi, How do I make Ternary plot with Matplotlib? (http://en.wikipedia.org/wiki/Ternary_plot) Or even more common question how it possible to make a plot based on non orthogonal axes? (like on the picture with Miller-Bravais indices http://en.wikipedia.org/wiki/Miller_indices) Thanks, -- Alexey |
|
From: David A. <irb...@gm...> - 2006-09-03 13:55:01
|
Hiya, i'm having a problem getting a valid postscript file produced on OS X.
Using the example subplot_demo.py, modified to include the line:
savefig('subplot_demo')
in the place of the show() command, and running it using:
python subplot_demo.py -dPS
Produces the .ps file (available here for reference:
http://www.irbdavid.com/misc/subplot_demo.ps ), which can't be opened
by Preview on os x - says its can't convert it to PDF & cant open the
file. Checked the permissions etc on the file and they're fine.
Its pretty much a default installation of matplotlib etc, and output
displays fine on screen, using the wxPython / wxAgg thing (I think
that's what i mean :D )
Any suggestions?
Regards,
Dave
|
|
From: Eric F. <ef...@ha...> - 2006-09-03 07:17:52
|
George Nurser wrote: > On 01/09/06, Eric Firing <ef...@ha...> wrote: >> Scott, >> >> This is fixed now in svn. (I will probably go back shortly and make >> another change to improve efficiency.) There was a one-line bug in >> contour.py, but the fundamental problem was that colors.ColorConverter >> (which handles color inputs for collections, among other things) was >> stripping off the alpha value and replacing it with 1.0. > > Eric, > Now that this bug is sorted, will it enable pcolormesh to use alpha = > 0 to not plot missing data? George, Unfortunately not--it is a completely different bug. A while ago I tracked the pcolormesh alpha bug down into the bowels of the quadmesh code, where it is making fairly low-level Agg calls. I didn't write quadmesh, I have never dealt with Agg directly, and I don't think I can afford the time that it would take for me to understand it--assuming I could. So, I've been unable to fix the pcolormesh alpha bug. I think it will require an Agg wizard, preferably one of the original quadmesh authors. Eric |
|
From: George N. <gn...@go...> - 2006-09-03 07:04:03
|
On 01/09/06, Eric Firing <ef...@ha...> wrote: > Scott, > > This is fixed now in svn. (I will probably go back shortly and make > another change to improve efficiency.) There was a one-line bug in > contour.py, but the fundamental problem was that colors.ColorConverter > (which handles color inputs for collections, among other things) was > stripping off the alpha value and replacing it with 1.0. Eric, Now that this bug is sorted, will it enable pcolormesh to use alpha = 0 to not plot missing data? --George. |
|
From: Michael F. <mp...@be...> - 2006-09-03 04:24:49
|
Hi all, I have a question about zorder and Axis elements. I read in the thread titled "zorder not working for grid lines??" that since grid lines are Axis elements, they don't respect the zorder. It's possible to set grid lines below other plot elements with Axis.set_axisbelow(). However, I have a case where I want grid lines to be below my plot elements, but I want the ticks to be above them (test code attached). As it stands, they can be either both below or both above. Has anyone found a way around this limitation? Is having zorder apply to Axis elements on the wishlist? Thanks for any info, Mike |
|
From: Darren D. <dd...@co...> - 2006-09-02 12:51:58
|
On Friday 01 September 2006 5:19 pm, Kenny Ortmann wrote: > hey guys i got the subversion from the site and I am trying to install it > on windows. It is strongly discouraged to try to build matplotlib from source on windows. Setting up your windows environment to build the source is difficult and time consuming. Please use the windows installers at the download site instead. Darren |
|
From: <nbi...@sy...> - 2006-09-01 22:29:01
|
Hi, I have a script witch saves to graphs to SVG. The script works on 2 of my computer (ArchLinux and Gentoo) but the SVG saves doesn't on Fedora Core 3. The 3 uses matplotlib v0.87.4. The error I get is : > Traceback (most recent call last): > File "src/affichage/affichage_E.py", line 1091, in ? > main() > File "src/affichage/affichage_E.py", line 262, in main > updatefig() > File "src/affichage/affichage_E.py", line 427, in updatefig > p.savefig(filename, dpi=100) > File "/home/bigaouette/fichiers/programmes/bin/python/matplotlib/pylab.py", line 811, in savefig > return fig.savefig(*args, **kwargs) > File "/home/bigaouette/fichiers/programmes/bin/python/matplotlib/figure.py", line 661, in savefig > self.canvas.print_figure(*args, **kwargs) > File "/home/bigaouette/fichiers/programmes/bin/python/matplotlib/backends/backend_gtkagg.py", line 113, in print_figure > orientation, **kwargs) > File "/home/bigaouette/fichiers/programmes/bin/python/matplotlib/backends/backend_agg.py", line 481, in print_figure > orientation, **kwargs) > File "/home/bigaouette/fichiers/programmes/bin/python/matplotlib/backends/backend_svg.py", line 289, in print_figure > self.figure.draw(renderer) > File "/home/bigaouette/fichiers/programmes/bin/python/matplotlib/figure.py", line 532, in draw > for a in self.axes: a.draw(renderer) > File "/home/bigaouette/fichiers/programmes/bin/python/matplotlib/axes.py", line 1045, in draw > a.draw(renderer) > File "/home/bigaouette/fichiers/programmes/bin/python/matplotlib/image.py", line 189, in draw > renderer.draw_image(l, b, im, self.axes.bbox) > File "/home/bigaouette/fichiers/programmes/bin/python/matplotlib/backends/backend_svg.py", line 154, in draw_image > image64 = base64.b64encode (imfile.read()) > AttributeError: 'module' object has no attribute 'b64encode' Is there something I'm missing ? Thank you. |
|
From: Kenny O. <ya...@em...> - 2006-09-01 21:19:27
|
hey guys i got the subversion from the site and I am trying to install it on windows. I changed dir into the matplotlib dir that includes the setup.py file. run python setup.py install, and im getting a wierd error. i left the topmost lines along with the error. has anyone seen anything like this before? building 'matplotlib.enthought.traits.ctraits' extension creating build\temp.win32-2.4\Release\lib creating build\temp.win32-2.4\Release\lib\matplotlib creating build\temp.win32-2.4\Release\lib\matplotlib\enthought creating build\temp.win32-2.4\Release\lib\matplotlib\enthought\traits C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Ic:\Python24\include -Ic:\Python24\PC /Tclib/matplotlib/e nthought/traits/ctraits.c /Fobuild\temp.win32-2.4\Release\lib/matplotlib/enthoug ht/traits/ctraits.obj C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\Python24\libs /LIBPATH:c:\Python24\PCBuild /EXPORT: initctraits build\temp.win32-2.4\Release\lib/matplotlib/enthought/traits/ctraits .obj /OUT:build\lib.win32-2.4\matplotlib\enthought\traits\ctraits.pyd /IMPLIB:bu ild\temp.win32-2.4\Release\lib/matplotlib/enthought/traits\ctraits.lib building 'matplotlib.backends._tkagg' extension C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static/include/tcl84 -I. -Isrc -Iswig -Iagg23/incl ude -I. -I. -Iwin32_static/include/tcl84\freetype2 -I.\freetype2 -Isrc\freetype2 -Iswig\freetype2 -Iagg23/include\freetype2 -I.\freetype2 -I.\freetype2 -Ic:\Pyt hon24\include -Ic:\Python24\PC /Tpsrc/_tkagg.cpp /Fobuild\temp.win32-2.4\Release \src/_tkagg.obj _tkagg.cpp src\_tkagg.cpp(28) : fatal error C1083: Cannot open include file: 'tk.h': No suc h file or directory error: Command ""C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.e xe" /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iwin32_static/include/tcl84 -I. -Isrc - Iswig -Iagg23/include -I. -I. -Iwin32_static/include/tcl84\freetype2 -I.\freetyp e2 -Isrc\freetype2 -Iswig\freetype2 -Iagg23/include\freetype2 -I.\freetype2 -I.\ freetype2 -Ic:\Python24\include -Ic:\Python24\PC /Tpsrc/_tkagg.cpp /Fobuild\temp .win32-2.4\Release\src/_tkagg.obj" failed with exit status 2 |
|
From: Gerald J. M. M. <Ger...@jp...> - 2006-09-01 15:56:07
|
You're right, Jeff. When I use numpy in the test script, I don't see the leak. Alternatively, moving the basemap object creation outside of the loop (even with Numeric 24.2) makes it faster and doesn't produce the leak. Thanks for showing me the way. Gerald Jeff Whitaker wrote: > Gerald John M. Manipon wrote: >> Hi all, >> >> I'm trying to generate a plot that contains 3 subplots: >> 2 line plots and a basemap plot showing location. I'm >> generating about 200 such plots however my script >> doesn't get to complete because it encounters a MemoryError. >> >> I found the test script at >> http://matplotlib.sourceforge.net/faq.html#LEAKS (which >> BTW generates a plot with 4 subplots) and it succeeded >> beautifully with no memory issues. However I changed the >> last subplot to be a basemap plot and I was able to see >> the memory leak. Below is the modified leak test script >> I used and the abbreviated output from it. I would truly >> appreciate any help on this. >> >> Thanks, >> >> Gerald >> >> ################################################ >> #memory leak test >> ################################################ >> import os, sys, time >> import matplotlib >> matplotlib.use('Agg') >> from pylab import * >> from matplotlib.toolkits.basemap import Basemap >> >> def report_memory(i): >> pid = os.getpid() >> a2 = os.popen('ps -p %d -o rss,sz' % pid).readlines() >> print i, ' ', a2[1], >> return int(a2[1].split()[1]) >> >> >> >> # take a memory snapshot on indStart and compare it with indEnd >> indStart, indEnd = 30, 150 >> for i in range(indEnd): >> ind = arange(100) >> xx = rand(len(ind)) >> >> figure(1) >> subplot(221) >> plot(ind, xx) >> >> subplot(222) >> X = rand(50,50) >> >> imshow(X) >> subplot(223) >> scatter(rand(50), rand(50)) >> subplot(224) >> #pcolor(10*rand(50,50)) >> m = Basemap(0, -85, 360, 85) >> m.plot((50,), (20,), 'ro', markersize=12, label='gps') >> m.drawcoastlines() >> >> savefig('tmp%d' % i, dpi = 75) >> close(1) >> >> >> val = report_memory(i) >> # wait a few cycles for memory usage to stabilize >> if i==indStart: start = val >> >> end = val >> print 'Average memory consumed per loop: %1.4fk bytes ' % \ >> ((end-start)/float(indEnd-indStart)) >> >> >> ################################################ >> #abbreviated results >> ################################################ >> 0 42724 12739 >> 1 65068 18359 >> 2 83036 22924 >> 3 100980 27463 >> 4 118928 32027 >> 5 136872 36577 >> 6 154828 41129 >> 7 172784 45681 >> 8 190736 50156 >> 9 208692 54711 >> 10 226644 59272 >> 11 244592 63824 >> 12 262548 68375 >> 13 280496 72926 >> 14 298440 77478 >> 15 316392 81964 >> . >> . >> . >> 143 1771824 663458 >> 144 1788924 668010 >> 145 1791316 672561 >> 146 1771104 677112 >> 147 1775644 681599 >> 148 1787288 686166 >> 149 1791604 690718 >> Average memory consumed per loop: 4505.0833k bytes >> > > Gerald: One way to workaround the memory leak with Numeric is to move > the Basemap instance creation > > m = Basemap(0, -85, 360, 85) > > outside the loop. There's no need to recreate it each time. > > As a bonus, the script runs many times faster too. > > -Jeff > |
|
From: John H. <jdh...@ac...> - 2006-09-01 14:41:23
|
>>>>> "Esdras" == Esdras Caleb <ach...@gm...> writes:
Esdras> I have esperimental data here and i want plot them to do a
Esdras> grafic and cut the poits who are too out but whem i use
Esdras> plot(Array1,Array2,+) i obtaim a perfect line and i do it
Esdras> in gnu plot and see the ploted points arent a perfect
Esdras> line, someone can tell me how I can simple draw the points
Esdras> in the grafic using mathplot?
Try using a mask, eg examples/masked_demo.py. Using nan should work
as well
from pylab import figure, show, nx
x = nx.arange(0.0, 10.0)
y = x**2
x[3] = nx.nan
fig = figure()
ax = fig.add_subplot(111)
ax.plot(x, y)
show()
JDH
|
|
From: David H. <dav...@gm...> - 2006-09-01 14:21:55
|
Hi, It's pretty hard to figure out exactly what your problem is without more info. Did you check that the scaling was identical in gnuplot and matplotlib ? matplotlib will set the axes so that all data are included in the figure, so if you have large outliers, the scaling will be too large and its probable that your data will look like a perfect line. Try modifying the scaling of the graph, using ylim(y1, y2) or xlim(x1, x2). David 2006/9/1, Esdras Caleb <ach...@gm...>: > > I have esperimental data here and i want plot them to do a grafic and cut > the poits who are too out but whem i use plot(Array1,Array2,+) i obtaim a > perfect line and i do it in gnu plot and see the ploted points arent a > perfect line, someone can tell me how I can simple draw the points in the > grafic using mathplot? > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > |
|
From: Esdras C. <ach...@gm...> - 2006-09-01 13:05:53
|
I have esperimental data here and i want plot them to do a grafic and cut the poits who are too out but whem i use plot(Array1,Array2,+) i obtaim a perfect line and i do it in gnu plot and see the ploted points arent a perfect line, someone can tell me how I can simple draw the points in the grafic using mathplot? |
|
From: Samuel G. <sg...@ol...> - 2006-09-01 08:12:23
|
Hello, I am writing a little GUI with PyQT4 and matplotlib. So it is embeded. I want that feature for the user : he can decided after ploting some data to synchronize 2 graph with the x axis for the zoom. So this method would be very useful for me. Maybe I can write it. Do you have a idea of all the variables involved in the sharex feature ? Thank you Samuel Eric Firing wrote: > Samuel, > > Trying to manipulate variables with leading underscores is > discouraged--that is the meaning of the leading underscores. > > Changing the shared status of axes involves changes in additional > variables. This could be encapsulated in a single method. It might be > very easy, or complexities and gotchas might turn up. How important is > it? What is the problem with setting the shared status when you make > the axes, as in your first example? > > Eric > > Samuel GARCIA wrote: > >> Hi all, >> is there a possibility to change the sharex and sharey after creating a >> axes ? >> >> For example this perfectitly work : >> >> import pylab >> fig = pylab.figure() >> ax1 = fig.add_subplot(121) >> ax2 = fig.add_subplot(122, sharex=ax1) >> ax1.plot(rand(5)) >> ax2.plot(rand(5)) >> pylab.show() >> >> But when I try naively to change _sharex and _masterx after creating >> the axes it doesn't work : >> >> >> import pylab >> fig = pylab.figure() >> ax1 = fig.add_subplot(121) >> ax2 = fig.add_subplot(122) >> ax1.plot(rand(5)) >> ax2.plot(rand(5)) >> ax2._sharex = ax1 >> ax1._masterx = True >> pylab.show() >> >> What 's the solution ? >> thank you >> >> Samuel >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jeff W. <js...@fa...> - 2006-09-01 03:41:15
|
Gerald John M. Manipon wrote: > Hi all, > > I'm trying to generate a plot that contains 3 subplots: > 2 line plots and a basemap plot showing location. I'm > generating about 200 such plots however my script > doesn't get to complete because it encounters a MemoryError. > > I found the test script at > http://matplotlib.sourceforge.net/faq.html#LEAKS (which > BTW generates a plot with 4 subplots) and it succeeded > beautifully with no memory issues. However I changed the > last subplot to be a basemap plot and I was able to see > the memory leak. Below is the modified leak test script > I used and the abbreviated output from it. I would truly > appreciate any help on this. > > Thanks, > > Gerald > > ################################################ > #memory leak test > ################################################ > import os, sys, time > import matplotlib > matplotlib.use('Agg') > from pylab import * > from matplotlib.toolkits.basemap import Basemap > > def report_memory(i): > pid = os.getpid() > a2 = os.popen('ps -p %d -o rss,sz' % pid).readlines() > print i, ' ', a2[1], > return int(a2[1].split()[1]) > > > > # take a memory snapshot on indStart and compare it with indEnd > indStart, indEnd = 30, 150 > for i in range(indEnd): > ind = arange(100) > xx = rand(len(ind)) > > figure(1) > subplot(221) > plot(ind, xx) > > subplot(222) > X = rand(50,50) > > imshow(X) > subplot(223) > scatter(rand(50), rand(50)) > subplot(224) > #pcolor(10*rand(50,50)) > m = Basemap(0, -85, 360, 85) > m.plot((50,), (20,), 'ro', markersize=12, label='gps') > m.drawcoastlines() > > savefig('tmp%d' % i, dpi = 75) > close(1) > > > val = report_memory(i) > # wait a few cycles for memory usage to stabilize > if i==indStart: start = val > > end = val > print 'Average memory consumed per loop: %1.4fk bytes ' % \ > ((end-start)/float(indEnd-indStart)) > > > ################################################ > #abbreviated results > ################################################ > 0 42724 12739 > 1 65068 18359 > 2 83036 22924 > 3 100980 27463 > 4 118928 32027 > 5 136872 36577 > 6 154828 41129 > 7 172784 45681 > 8 190736 50156 > 9 208692 54711 > 10 226644 59272 > 11 244592 63824 > 12 262548 68375 > 13 280496 72926 > 14 298440 77478 > 15 316392 81964 > . > . > . > 143 1771824 663458 > 144 1788924 668010 > 145 1791316 672561 > 146 1771104 677112 > 147 1775644 681599 > 148 1787288 686166 > 149 1791604 690718 > Average memory consumed per loop: 4505.0833k bytes > Gerald: One way to workaround the memory leak with Numeric is to move the Basemap instance creation m = Basemap(0, -85, 360, 85) outside the loop. There's no need to recreate it each time. As a bonus, the script runs many times faster too. -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: Jeff W. <js...@fa...> - 2006-09-01 01:52:38
|
Gerald John M. Manipon wrote: > Hi all, > > I'm trying to generate a plot that contains 3 subplots: > 2 line plots and a basemap plot showing location. I'm > generating about 200 such plots however my script > doesn't get to complete because it encounters a MemoryError. > > I found the test script at > http://matplotlib.sourceforge.net/faq.html#LEAKS (which > BTW generates a plot with 4 subplots) and it succeeded > beautifully with no memory issues. However I changed the > last subplot to be a basemap plot and I was able to see > the memory leak. Below is the modified leak test script > I used and the abbreviated output from it. I would truly > appreciate any help on this. > > Thanks, > > Gerald > > ################################################ > #memory leak test > ################################################ > import os, sys, time > import matplotlib > matplotlib.use('Agg') > from pylab import * > from matplotlib.toolkits.basemap import Basemap > > def report_memory(i): > pid = os.getpid() > a2 = os.popen('ps -p %d -o rss,sz' % pid).readlines() > print i, ' ', a2[1], > return int(a2[1].split()[1]) > > > > # take a memory snapshot on indStart and compare it with indEnd > indStart, indEnd = 30, 150 > for i in range(indEnd): > ind = arange(100) > xx = rand(len(ind)) > > figure(1) > subplot(221) > plot(ind, xx) > > subplot(222) > X = rand(50,50) > > imshow(X) > subplot(223) > scatter(rand(50), rand(50)) > subplot(224) > #pcolor(10*rand(50,50)) > m = Basemap(0, -85, 360, 85) > m.plot((50,), (20,), 'ro', markersize=12, label='gps') > m.drawcoastlines() > > savefig('tmp%d' % i, dpi = 75) > close(1) > > > val = report_memory(i) > # wait a few cycles for memory usage to stabilize > if i==indStart: start = val > > end = val > print 'Average memory consumed per loop: %1.4fk bytes ' % \ > ((end-start)/float(indEnd-indStart)) > > > ################################################ > #abbreviated results > ################################################ > 0 42724 12739 > 1 65068 18359 > 2 83036 22924 > 3 100980 27463 > 4 118928 32027 > 5 136872 36577 > 6 154828 41129 > 7 172784 45681 > 8 190736 50156 > 9 208692 54711 > 10 226644 59272 > 11 244592 63824 > 12 262548 68375 > 13 280496 72926 > 14 298440 77478 > 15 316392 81964 > . > . > . > 143 1771824 663458 > 144 1788924 668010 > 145 1791316 672561 > 146 1771104 677112 > 147 1775644 681599 > 148 1787288 686166 > 149 1791604 690718 > Average memory consumed per loop: 4505.0833k bytes > Gerald: No leak here [jsw@Macintosh:/Users/jsw/python] python memleak.py 0 27856 89672 1 32672 92620 2 33200 92620 3 33200 92620 4 33168 92612 5 33196 92620 6 33196 92620 7 33164 92616 8 33200 92620 9 33184 92616 10 33196 92620 11 33184 92616 12 33176 92616 13 33204 92620 MacOS 10.4.7, matplotlib 0.87.4, basemap latest svn, numpy 1.0b2. However, if I use Numeric 24.2 [jsw@Macintosh:/Users/jsw/python] python memleak.py --Numeric 0 44472 102496 1 67140 123932 2 85376 141308 3 103200 159728 4 120992 177104 5 138800 194496 it leaks! No idea why - but I doubt it has much to do with basemap. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 |