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




Showing results of 352

1 2 3 .. 15 > >> (Page 1 of 15)
From: Christopher B. <Chr...@no...> - 2006年01月31日 22:49:29
Eric Firing wrote:
>> I'm having problems with the data limits when I use a LineCollection
>>
>> Here is the relevant code. A VectorLinecollection is a subclass of 
>> LineCollection. ax is an Axes instance.
>>
>> ax.clear()
>> VLC = VectorLineCollection(t, y, theta, self.Figure, ax)
>> ax.add_collection(VLC)
>> ax.plot(t, y, 'o')
>> print "The lines are:", ax.get_lines()
>> print "AutoScaleOn:", ax._autoscaleon
>> print ax.dataLim.intervaly()
>> print ax.dataLim.intervaly().get_bounds()
>> ax.autoscale_view()
>>
> It is not entirely clear to me what you mean by "call it again...",
Sorry about that. this code is in a method, and when I call that method 
again, it gets re-run, but with different data. What I want to happen is 
for the axis to auto-scale to the new data.
> but 
> note that autoscale_view() updates the viewLim from the dataLim; it does 
> not update the dataLim.
exactly. That's why I've printed ax.dataLim.intervaly().get_bounds(). 
dataLim is not getting updated each time this code is run.
> That is done by add_line, which is called by 
> plot,
It looks like it should first get updated by the axes,.clear() call, 
then updated again each time you add something to the axes.
> but it is not done by add_collection, as far as I can see.
except that it works fine the first time this code is run: 
add_collection seems to update dataLim, but the clear call doesn't clear 
it out again.
In this case, the problem is that I run this code with large data, the 
axis limits get set to large values. then I run it again with smaller 
values data, and the axis limits stay large, even after calling clear() 
and autoscale_view().
> axes methods for updating dataLim are:
I saw those, but I don't know where they are getting called. most 
importantly, I don't know what is happening to dataLim in a clear() 
call, but it doesn't seem to be working right.
Maybe I'll try to make a small sample that demonstrates the issue. stay 
tuned.
-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: Curtis C. <cu...@lp...> - 2006年01月31日 21:37:02
> What OS are you using? I just printed your pdf file from kpdf on a RHEL4
> machine, and it looks fine.
>
I'm using the "testing" distribution of Debian Linux, i386 architecture.
I'm using version 0.3.9 of GNU ghostscript and acroread 7.0.0 dated
03/11/2005 (C) Adobe Systems.
From: Darren D. <dd...@co...> - 2006年01月31日 21:18:24
> Hi Darren,
>
> Thanks for your reply. I am sending you a postscript figure from my
> upcoming Astrophysical Journal paper and the barebones Python/Pylab code
> used to generate it.
>
> I do not normally use the psdistiller or usetex options. I have changed
> my rc settings by letting numerix = numarray. Otherwise, they are the
> same as the default in all fields.
>
> I am using matplotlib CVS (current as of yesterday). My operating system
> is Debian "testing," which by default uses Python 2.3 (not 2.4). I always
> just use Python 2.3 per the Debian default. The packages are current.
>
> For the paper itself, I use Latex2e (AASTEX just has Latex macros to
> help typeset papers for ApJ). But the problem shows up when I do ps2pdf
> on the fig.ps file as well as ps2pdf on the whole paper. So I don't think
> that's the issue.
>
> I'm using GPL (not Aladdin) Ghostscript for the ps2pdf. Although fig.pdf
> displays correctly in acroread and xpdf, it does not print correctly (when
> I go print... in acroread 7). Using epstopdf produces the same thing: an
> apparently fine pdf file of the figure that doesn't print properly.
What OS are you using? I just printed your pdf file from kpdf on a RHEL4
machine, and it looks fine.
From: Eric F. <ef...@ha...> - 2006年01月31日 21:16:43
Chris,
Christopher Barker wrote:
> Hi all,
> 
> I'm having problems with the data limits when I use a LineCollection
> 
> Here is the relevant code. A VectorLinecollection is a subclass of 
> LineCollection. ax is an Axes instance.
> 
> ax.clear()
> VLC = VectorLineCollection(t, y, theta, self.Figure, ax)
> ax.add_collection(VLC)
> ax.plot(t, y, 'o')
> print "The lines are:", ax.get_lines()
> print "AutoScaleOn:", ax._autoscaleon
> print ax.dataLim.intervaly()
> print ax.dataLim.intervaly().get_bounds()
> ax.autoscale_view()
> 
> 
> This all works fine when I call it the first time, but when I call it 
> again, with a new LineCollection, dataLim is not re-set. If I comment 
> out the add_collection call, and just do the plot, then dataLim does get 
> reset when clear is called, so autoscale_view obviously doesn't work.
> 
> any ideas what's wrong? How would I force a re-set of dataLim?
It is not entirely clear to me what you mean by "call it again...", but 
note that autoscale_view() updates the viewLim from the dataLim; it does 
not update the dataLim. That is done by add_line, which is called by 
plot, but it is not done by add_collection, as far as I can see. The 
axes methods for updating dataLim are:
 def update_datalim(self, xys):
 'Update the data lim bbox with seq of xy tups'
 # if no data is set currently, the bbox will ignore it's
 # limits and set the bound to be the bounds of the xydata.
 # Otherwise, it will compute the bounds of it's current data
 # and the data in xydata
 self.dataLim.update(xys, not self.has_data())
 def update_datalim_numerix(self, x, y):
 'Update the data lim bbox with seq of xy tups'
 # if no data is set currently, the bbox will ignore it's
 # limits and set the bound to be the bounds of the xydata.
 # Otherwise, it will compute the bounds of it's current data
 # and the data in xydata
 #print type(x), type(y)
 self.dataLim.update_numerix(x, y, not self.has_data())
Eric
From: Curtis C. <cu...@lp...> - 2006年01月31日 19:56:18
Attachments: T_formula.py fig.ps fig.pdf
Hi Darren,
Thanks for your reply. I am sending you a postscript figure from my
upcoming Astrophysical Journal paper and the barebones Python/Pylab code
used to generate it.
I do not normally use the psdistiller or usetex options. I have changed
my rc settings by letting numerix = numarray. Otherwise, they are the
same as the default in all fields.
I am using matplotlib CVS (current as of yesterday). My operating system
is Debian "testing," which by default uses Python 2.3 (not 2.4). I always
just use Python 2.3 per the Debian default. The packages are current.
For the paper itself, I use Latex2e (AASTEX just has Latex macros to
help typeset papers for ApJ). But the problem shows up when I do ps2pdf
on the fig.ps file as well as ps2pdf on the whole paper. So I don't think
that's the issue.
I'm using GPL (not Aladdin) Ghostscript for the ps2pdf. Although fig.pdf
displays correctly in acroread and xpdf, it does not print correctly (when
I go print... in acroread 7). Using epstopdf produces the same thing: an
apparently fine pdf file of the figure that doesn't print properly.
Thanks,
Curtis
From: Christopher B. <Chr...@no...> - 2006年01月31日 19:49:29
Hi all,
I'm having problems with the data limits when I use a LineCollection
Here is the relevant code. A VectorLinecollection is a subclass of 
LineCollection. ax is an Axes instance.
 ax.clear()
 VLC = VectorLineCollection(t, y, theta, self.Figure, ax)
 ax.add_collection(VLC)
 ax.plot(t, y, 'o')
 print "The lines are:", ax.get_lines()
 print "AutoScaleOn:", ax._autoscaleon
 print ax.dataLim.intervaly()
 print ax.dataLim.intervaly().get_bounds()
 ax.autoscale_view()
This all works fine when I call it the first time, but when I call it 
again, with a new LineCollection, dataLim is not re-set. If I comment 
out the add_collection call, and just do the plot, then dataLim does get 
reset when clear is called, so autoscale_view obviously doesn't work.
any ideas what's wrong? How would I force a re-set of dataLim?
This is buried in a wxmpl based program, but if I need to, I'll make a 
small stand-alone script that demonstrates the problem.
-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: Fernando P. <Fer...@co...> - 2006年01月31日 19:10:53
Travis E. Oliphant wrote:
> At SciPy 2005, I thought I saw John show some examples of simple 3d 
> surface plots in matplotlib. Is this code available?
> 
> Once you can draw points and lines on the screen, it's just a coordinate 
> transform to make simple 3d plots (o.k. there are some hidden-line 
> calculations too ;-) ).
> 
> The gist (in old scipy.xplt) package does simple 3d using just the 2d 
> primitives.
I'm attaching it here, it was sent a while ago to the list, but things have 
been dormant on this front since.
The demo3d only has one demo, if you edit mplot3d, there's 3 more tests in it 
which you can see.
Cheers,
f
From: Panos K. <pk...@in...> - 2006年01月31日 18:08:24
Hello everybody,
I would like to use a solid line to plot a pulse. In other words let's 
say I have a number of zeros and ones
and I would like to connect them like this with solid lines:
-------	 +-------
	+	+	+
	+	+	+
	+	+	+
	+-------	----------
Of course when I use the plot() function with the formater "-" , it 
connects the points differently. Is there a
way to override this default action? Thank you very much.
						Panos
From: Clovis G. <cl...@pe...> - 2006年01月31日 17:56:50
The example is (under Windows XP, Matplotlib 0.86.2, using Tkinter after 
making a "clean" matplotlib installation):
from pylab import *
rcParams['ps.useafm']=True
a=arange(0,10)
figure(1)
plot(a,2*a)
show()
Until now everything is OK.
When I press SaveFigure button in the NavigationToolbar the error 
messages are:
Exception in Tkinter callback
Traceback (most recent call last):
 File "D:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
 return self.func(*args)
 File 
"D:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", 
line 637, in save_figure
 self.canvas.print_figure(fname)
 File 
"D:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", 
line 183, in print_figure
 agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
 File 
"D:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line 
479, in print_figure
 ps.print_figure(filename, dpi, facecolor, edgecolor, orientation)
 File 
"D:\Python24\Lib\site-packages\matplotlib\backends\backend_ps.py", line 
1048, in print_figure
 self.figure.draw(renderer)
 File "D:\Python24\Lib\site-packages\matplotlib\figure.py", line 524, 
in draw
 for a in self.axes: a.draw(renderer)
 File "D:\Python24\Lib\site-packages\matplotlib\axes.py", line 1438, in 
draw
 self.xaxis.draw(renderer)
 File "D:\Python24\Lib\site-packages\matplotlib\axis.py", line 562, in draw
 tick.draw(renderer)
 File "D:\Python24\Lib\site-packages\matplotlib\axis.py", line 161, in draw
 if self.label1On: self.label1.draw(renderer)
 File "D:\Python24\Lib\site-packages\matplotlib\text.py", line 858, in draw
 self._mytext.draw(renderer)
 File "D:\Python24\Lib\site-packages\matplotlib\text.py", line 338, in draw
 bbox, info = self._get_layout(renderer)
 File "D:\Python24\Lib\site-packages\matplotlib\text.py", line 181, in 
_get_layout
 tmp, heightt = renderer.get_text_width_height(
 File 
"D:\Python24\Lib\site-packages\matplotlib\backends\backend_ps.py", line 
274, in get_text_width_height
 font = self._get_font_afm(prop)
 File 
"D:\Python24\Lib\site-packages\matplotlib\backends\backend_ps.py", line 
298, in _get_font_afm
 font = AFM(file(fontManager.findfont(prop, fontext='afm')))
IOError: [Errno 2] No such file or directory: 
'D:\\Python24\\share\\matplotlib\\phvr8a.afm'
Obviously, there are no "*.afm" files in the 
"D:\python24\share\matplotlib\" directory.
To be exact, there isn't even a "D:\python24\share\matplotlib\" directory!
The same script runs fine when rcParams['ps.useafm']=False
The same bug (?) seemed to exist in Matplotlib 0.86.1.
Thanks for the support,
Clovis Goldemberg
From: John H. <jdh...@ac...> - 2006年01月31日 16:12:40
>>>>> ""Strauss" == "Strauss JM <jst...@su...>" <jst...@su...> writes:
 "Strauss> I just started Boa after performing the actions
 "Strauss> explained in my previous email. The application
 "Strauss> executed without any problems. I can see my plots using
 "Strauss> wxmpl again.
 "Strauss> Thanks for helping. I do suggest though that someone
 "Strauss> should check the errors that I explained in the previous
 "Strauss> e-mail and also, why I encountered the original error
 "Strauss> when I substituted my entire mpl with the files from
 "Strauss> CVS.
If boa was still running after reinstalling matplotlib, it may be that
the python code was reloaded and the extension code was not. If
restarting boa fixed your problems, I suspect it's a non-issue.
Thanks for the report.
JDH
From: Ted D. <ted...@jp...> - 2006年01月31日 16:10:53
Panos,
Ordinal in this context is the y values. It's not the length of the y 
array, it's the values in the array. Dates are days past some epoch and 
dates before the epoch are not allowed. Maybe you're getting a date value 
that's < 1 which is what is causing the problem. Are you plotting dates on 
the y axis anywhere?
Or maybe there's a bug in the error message and it should say abscissa (X)?
Ted
At 01:44 AM 1/31/2006, Panos Kassianidis wrote:
>Hello all,
>
>I am using matplotlib for a web application to create trend charts from 
>measurements stored in a database.
>Specifically I use plot_date to plot the values vs their timestamps.
>Occasionally and without any obvious to me reason, plot_date raises the 
>exception
>
>"ordinal must be >= 1"
>
>I check that both the x and y value sequences are not empty and their 
>length is certainly above 1.
>Does anybody know where this "ordinal" refers to and what might be causing 
>this error?
>Thank you very much
>
> Panos
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>for problems? Stop! Download the new AJAX search engine that makes
>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
>_______________________________________________
>Matplotlib-users mailing list
>Mat...@li...
>https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Travis E. O. <oli...@ie...> - 2006年01月31日 16:07:22
At SciPy 2005, I thought I saw John show some examples of simple 3d 
surface plots in matplotlib. Is this code available?
Once you can draw points and lines on the screen, it's just a coordinate 
transform to make simple 3d plots (o.k. there are some hidden-line 
calculations too ;-) ).
The gist (in old scipy.xplt) package does simple 3d using just the 2d 
primitives.
-Travis
From: Strauss JM <jst...@su...> - 2006年01月31日 14:58:39
I just started Boa after performing the actions explained in my previous
email. The application executed without any problems. I can see my
plots using wxmpl again.
Thanks for helping. I do suggest though that someone should check the
errors that I explained in the previous e-mail and also, why I
encountered the original error when I substituted my entire mpl with the
files from CVS.
Regards
Johann Strauss
From: Charlie M. <cw...@gm...> - 2006年01月31日 14:55:44
On 1/31/06, Strauss JM <jst...@su...> <jst...@su...> wrote:
> Here is what I did:
>
> I firstly downloaded the example "quadmesh_demo.py".
>
> Then I reinstalled the latest mpl (0.86.2). When I tried to run the
> example I got the following error message:
>
> Traceback (most recent call last):
> File "C:\My
> Leerkabinet\Installs\Python\Sandbox\Matplotlib\matplotlib\examples\quadm
> esh_demo.py", line 3, in ?
> from pylab import figure,show
> File "C:\Program Files\Python24\Lib\site-packages\pylab.py", line 1,
> in ?
> from matplotlib.pylab import *
> File "C:\Program
> Files\Python24\Lib\site-packages\matplotlib\pylab.py", line 217, in ?
> new_figure_manager, draw_if_interactive, show =3D pylab_setup()
> File "C:\Program
> Files\Python24\Lib\site-packages\matplotlib\backends\__init__.py", line
> 24, in pylab_setup
> globals(),locals(),[backend_name])
> File "C:\Program
> Files\Python24\Lib\site-packages\matplotlib\backends\backend_gtkagg.py",
> line 10, in ?
> from backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\
> File "C:\Program
> Files\Python24\Lib\site-packages\matplotlib\backends\backend_gtk.py",
> line 6, in ?
> import gobject
> ImportError: No module named gobject
>
> I then went on and changed the backend in matplotlibrc from GTKAgg to
> WXAgg. Running the example resulted in the following error message:
>
> Traceback (most recent call last):
> File "C:\My
> Leerkabinet\Installs\Python\Sandbox\Matplotlib\matplotlib\examples\quadm
> esh_demo.py", line 15, in ?
> ax =3D fig.add_subplot(111)
> File "C:\Program
> Files\Python24\Lib\site-packages\matplotlib\figure.py", line 465, in
> add_subplot
> a =3D Subplot(self, *args, **kwargs)
> File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axes.py",
> line 3974, in __init__
> Axes.__init__(self, fig, [self.figLeft, self.figBottom,
> File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axes.py",
> line 331, in __init__
> self._init_axis()
> File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axes.py",
> line 360, in _init_axis
> self.xaxis =3D XAxis(self)
> File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
> line 501, in __init__
> self.cla()
> File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
> line 524, in cla
> self.majorTicks.extend([self._get_tick(major=3DTrue) for i in
> range(1)])
> File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
> line 834, in _get_tick
> return XTick(self.axes, 0, '', major=3Dmajor)
> File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
> line 100, in __init__
> self.tick1line =3D self._get_tick1line(loc)
> File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
> line 276, in _get_tick1line
> markersize=3Dself._size,
> File "C:\Program
> Files\Python24\Lib\site-packages\matplotlib\lines.py", line 211, in
> __init__
> self.set_data(xdata, ydata)
> File "C:\Program
> Files\Python24\Lib\site-packages\matplotlib\lines.py", line 282, in
> set_data
> self._segments =3D unmasked_index_ranges(mask)
> File "C:\Program
> Files\Python24\Lib\site-packages\matplotlib\lines.py", line 69, in
> unmasked_index_ranges
> m =3D concatenate(((1,), mask, (1,)))
> ValueError: arrays must have same number of dimensions
>
> This problem I have encountered this morning. Through a quick search I
> came upon advice by Travis Oliphant to obtain mpl out of CVS. I only
> substituted my installed lines.py with the lines.py obtained from CVS
> and here is the results after running the example again:
>
> Traceback (most recent call last):
> File "C:\My
> Leerkabinet\Installs\Python\Sandbox\Matplotlib\matplotlib\examples\quadm
> esh_demo.py", line 16, in ?
> ax.pcolormesh(Qx,Qz,Z)
> AttributeError: Subplot instance has no attribute 'pcolormesh'
>
> It seems that we got passed ax =3D fig.add_subplot(111) in the example,
> but I am not sure whether the problem is solved.
I can't reproduce unfortunately. This is an attribute for subplot
with my version. Try print matplotlib.__version__ to ensure you are
not picking up on older files somehow. Or try printing
matplotlib.axes.__file__ as well.
From: Strauss JM <jst...@su...> - 2006年01月31日 14:49:33
Here is what I did:
I firstly downloaded the example "quadmesh_demo.py".
Then I reinstalled the latest mpl (0.86.2). When I tried to run the
example I got the following error message:
Traceback (most recent call last):
 File "C:\My
Leerkabinet\Installs\Python\Sandbox\Matplotlib\matplotlib\examples\quadm
esh_demo.py", line 3, in ?
 from pylab import figure,show
 File "C:\Program Files\Python24\Lib\site-packages\pylab.py", line 1,
in ?
 from matplotlib.pylab import *
 File "C:\Program
Files\Python24\Lib\site-packages\matplotlib\pylab.py", line 217, in ?
 new_figure_manager, draw_if_interactive, show =3D pylab_setup()
 File "C:\Program
Files\Python24\Lib\site-packages\matplotlib\backends\__init__.py", line
24, in pylab_setup
 globals(),locals(),[backend_name])
 File "C:\Program
Files\Python24\Lib\site-packages\matplotlib\backends\backend_gtkagg.py",
line 10, in ?
 from backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\
 File "C:\Program
Files\Python24\Lib\site-packages\matplotlib\backends\backend_gtk.py",
line 6, in ?
 import gobject
ImportError: No module named gobject
I then went on and changed the backend in matplotlibrc from GTKAgg to
WXAgg. Running the example resulted in the following error message:
Traceback (most recent call last):
 File "C:\My
Leerkabinet\Installs\Python\Sandbox\Matplotlib\matplotlib\examples\quadm
esh_demo.py", line 15, in ?
 ax =3D fig.add_subplot(111)
 File "C:\Program
Files\Python24\Lib\site-packages\matplotlib\figure.py", line 465, in
add_subplot
 a =3D Subplot(self, *args, **kwargs)
 File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axes.py",
line 3974, in __init__
 Axes.__init__(self, fig, [self.figLeft, self.figBottom,
 File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axes.py",
line 331, in __init__
 self._init_axis()
 File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axes.py",
line 360, in _init_axis
 self.xaxis =3D XAxis(self)
 File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
line 501, in __init__
 self.cla()
 File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
line 524, in cla
 self.majorTicks.extend([self._get_tick(major=3DTrue) for i in
range(1)])
 File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
line 834, in _get_tick
 return XTick(self.axes, 0, '', major=3Dmajor)
 File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
line 100, in __init__
 self.tick1line =3D self._get_tick1line(loc)
 File "C:\Program Files\Python24\Lib\site-packages\matplotlib\axis.py",
line 276, in _get_tick1line
 markersize=3Dself._size,
 File "C:\Program
Files\Python24\Lib\site-packages\matplotlib\lines.py", line 211, in
__init__
 self.set_data(xdata, ydata)
 File "C:\Program
Files\Python24\Lib\site-packages\matplotlib\lines.py", line 282, in
set_data
 self._segments =3D unmasked_index_ranges(mask)
 File "C:\Program
Files\Python24\Lib\site-packages\matplotlib\lines.py", line 69, in
unmasked_index_ranges
 m =3D concatenate(((1,), mask, (1,)))
ValueError: arrays must have same number of dimensions
This problem I have encountered this morning. Through a quick search I
came upon advice by Travis Oliphant to obtain mpl out of CVS. I only
substituted my installed lines.py with the lines.py obtained from CVS
and here is the results after running the example again:
Traceback (most recent call last):
 File "C:\My
Leerkabinet\Installs\Python\Sandbox\Matplotlib\matplotlib\examples\quadm
esh_demo.py", line 16, in ?
 ax.pcolormesh(Qx,Qz,Z)
AttributeError: Subplot instance has no attribute 'pcolormesh'
It seems that we got passed ax =3D fig.add_subplot(111) in the example,
but I am not sure whether the problem is solved.
I hope the info is helpful.
Regards
Johann Strauss
=20
-----Original Message-----
From: Charlie Moad [mailto:cw...@gm...]=20
Sent: 31 Januarie 2006 04:00 nm
To: Strauss JM <jst...@su...>
Cc: mat...@li...
Subject: Re: [Matplotlib-users] backend_agg attribute error
> File "C:\Program
> Files\Python24\lib\site-packages\matplotlib\backends\backend_agg.py",
> line 124, in __init__
>
> self.draw_quad_mesh =3D self._renderer.draw_quad_mesh
>
> AttributeError: draw_quad_mesh
This was added to the agg (which affects wxagg) backend between 0.86.1
and 0.86.2. This error is probably not coming from wxmpl/boa. See if
you can run the examples/quadmesh_demo.py which uses this new
functionality, after reinstalling the latest mpl.
From: John H. <jdh...@ac...> - 2006年01月31日 14:14:55
>>>>> "Panos" == Panos Kassianidis <pk...@in...> writes:
 Panos> Hello all, I am using matplotlib for a web application to
 Panos> create trend charts from measurements stored in a database.
 Panos> Specifically I use plot_date to plot the values vs their
 Panos> timestamps. Occasionally and without any obvious to me
 Panos> reason, plot_date raises the exception
 Panos> "ordinal must be >= 1"
 Panos> I check that both the x and y value sequences are not empty
 Panos> and their length is certainly above 1. Does anybody know
 Panos> where this "ordinal" refers to and what might be causing
 Panos> this error? Thank you very much
I sometimes see this when a date graph is open in a GUI window and I
am moving my mouse. The mouse as is passes off the axes can return
invalid dates to the matplotlib date conversion routine. I think I
added some guards against this in the last release (0.86.2). What
version are you using.
In a nutshell, it likely means that somewhere in the pipeline
matplotlib is getting an illegal date value.
Next time you get the error, lease post version info and a complete
traceback.
JDH
From: Charlie M. <cw...@gm...> - 2006年01月31日 13:59:39
> File "C:\Program
> Files\Python24\lib\site-packages\matplotlib\backends\backend_agg.py",
> line 124, in __init__
>
> self.draw_quad_mesh =3D self._renderer.draw_quad_mesh
>
> AttributeError: draw_quad_mesh
This was added to the agg (which affects wxagg) backend between 0.86.1
and 0.86.2. This error is probably not coming from wxmpl/boa. See if
you can run the examples/quadmesh_demo.py which uses this new
functionality, after reinstalling the latest mpl.
From: Strauss JM <jst...@su...> - 2006年01月31日 13:14:49
Hi list members
=20
I have been trying to upgrade my Python version to 2.4 from 2.3. With
that I removed numarray and Numeric and installed numpy. My Matplotlib,
Scipy and wxPython was also upgraded to comply with Python 2.4. In the
process I encountered a few problems and all but one I managed to
overcome by using CVS versions of Matplotlib.
=20
With the last problem I am bit clueless. I use Boa Cocstructor to write
the application that I am busy with and for embedded plotting I am using
wxmpl (although Ken McIver said that it has not been tested for Python
2.4). After I run the application and try to plot, nothing shows except
the crosshair when I move accross the area where the axes is suppose to
be and Boa returns the following error message:
=20
Traceback (most recent call last):
File "C:\Program Files\Python24\Lib\site-packages\wxmpl.py", line 1067,
in _onPaint
FigureCanvasWxAgg._onPaint(self, evt)
File "C:\Program
Files\Python24\lib\site-packages\matplotlib\backends\backend_wx.py",
line 1048, in _onPaint
self.draw(repaint=3DFalse)
File "C:\Program Files\Python24\Lib\site-packages\wxmpl.py", line 1124,
in draw
FigureCanvasWxAgg.draw(self, repaint)
File "C:\Program
Files\Python24\lib\site-packages\matplotlib\backends\backend_wxagg.py",
line 60, in draw
FigureCanvasAgg.draw(self)
File "C:\Program
Files\Python24\lib\site-packages\matplotlib\backends\backend_agg.py",
line 385, in draw
renderer =3D self.get_renderer()
File "C:\Program
Files\Python24\lib\site-packages\matplotlib\backends\backend_agg.py",
line 396, in get_renderer
self.renderer =3D RendererAgg(w, h, self.figure.dpi)
File "C:\Program
Files\Python24\lib\site-packages\matplotlib\backends\backend_agg.py",
line 124, in __init__
self.draw_quad_mesh =3D self._renderer.draw_quad_mesh
AttributeError: draw_quad_mesh
Any suggestions? I did get some similar problems when I tried to run
the embedded examples embedding_in_wx2.py, embedding_in_wx3.py and
embedding_in_wx4.py that I downloaded with my previous Matplotlib
version.
=20
Regards
=20
Johann Strauss
From: Panos K. <pk...@in...> - 2006年01月31日 09:44:26
Hello all,
I am using matplotlib for a web application to create trend charts 
from measurements stored in a database.
Specifically I use plot_date to plot the values vs their timestamps.
Occasionally and without any obvious to me reason, plot_date raises 
the exception
"ordinal must be >= 1"
I check that both the x and y value sequences are not empty and their 
length is certainly above 1.
Does anybody know where this "ordinal" refers to and what might be 
causing this error?
Thank you very much
				Panos
From: Curtis C. <cu...@lp...> - 2006年01月31日 02:09:20
Greetings,
I am having trouble using the figures created by Matplotlib in my research
article because they don't print correctly after I do 'ps2pdf' on the PS
file generated by AASTEX. The math text doesn't render properly. It does
print fine, however, as a PS file. But the PDF is a more compact, easier
to read file. So, it would be nice if the figures still printed OK after
ps2pdf.
Thanks,
Curtis
 * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Curtis S. Cooper, Graduate Research Assistant *
 * Lunar and Planetary Laboratory, University of Arizona *
 * http://www.lpl.arizona.edu/~curtis/		 *
 * Kuiper Space Sciences, Rm. 318 *
 * 1629 E. University Blvd., *
 * Tucson, AZ 85721 * * * * * * * * * * * * * * *
 * Wk: (520) 621-1471 *
 * * * * * * * * * * * *
From: Charlie M. <cw...@gm...> - 2006年01月30日 13:15:36
a =3D subplot(221)
b =3D subplot(222)
c =3D subplot(212)
On 1/30/06, and...@ti... <and...@ti...> wrote:
> Hello John & NG,
>
> thank you very much for your answer. BTW, I have
> another (small) question about matplotlib (and I am still sorry for my
> ignorance ;-) ). Is there a way to make a subplot spanning 2 columns
> (or 2 rows)? Something like:
>
> |--------------------------------|
> | | |
> |
> | |
> | | |
> | | |
> |--------------------------------|
> | |
> | |
> | |
> | |
> |--------------------------------|
>
> Thanks in advance.
>
> Andrea.
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=
=3D121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: <and...@ti...> - 2006年01月30日 13:11:31
Hello John & NG,
 thank you very much for your answer. BTW, I have 
another (small) question about matplotlib (and I am still sorry for my 
ignorance ;-) ). Is there a way to make a subplot spanning 2 columns 
(or 2 rows)? Something like:
|--------------------------------|
| | |
| 
| |
| | |
| | |
|--------------------------------|
| |
| |
| |
| |
|--------------------------------|
Thanks in advance.
Andrea.
From: Arnd B. <arn...@we...> - 2006年01月30日 08:11:06
Hi,
to add one more piece of information to this:
On 2006年1月25日, Ryan Krauss wrote:
> This is a threading problem. As I understand it, you have two options:
> 1. Stick with TkAgg.
I just re-installed an old matplotlib.__version__: '0.82'.
Here GTKAgg works fine with redrawing for the example below!
So this looks to me more like some double buffering issue?
Remarks:
- GTK: here only the graph axes are redrawn, but not the plot curve itself
 (wrong bitmap in double buffer?)
- WXAgg: the redraw also does not work (ie the same as with a recent MPL).
- with TkAgg even zooming works
 (I think this is because of the
 different way the main-loop works for Tk ....)
I don't understand the details of MPL well enough,
but if it used to work with GTKAgg at some point, it would be
great if it could be made working again...
Best,
Arnd
> 2. Run the demo under iPython.
>
> Otherwise the user has to close the plot window to keep the thread going.
>
> On 1/25/06, Arnd Baecker <arn...@we...> wrote:
> > Hi,
> >
> > I need help for the conversion from scipy.xplt to matplotlib:
> >
> > We have several cases where one plot is shown after another,
> > separated via
> > raw_input("press <enter> for the next plot")
> >
> > However, while waiting for <enter> the redraw of the plot window
> > does not work (e.g if it gets behind some other window).
> >
> > This example, run as a script, demonstrates the problem:
> >
> > #---------------------------------------------------------
> > from pylab import *
> > ion() # interactive mode
> > x = arange(10)
> > plot(x,x*x) # add something to the plot
> > draw()
> > raw_input("press <enter> for the next plot")
> > clf() # another plot
> > plot(x,x**3)
> > draw()
> > raw_input("press <enter> for end")
> > #---------------------------------------------------------
> >
> > This does work for TkAgg but not for GTK, GTKAgg and WX.
> >
> > Best, Arnd
From: Fernando P. <Fer...@co...> - 2006年01月29日 21:11:43
Darren Dale wrote:
> Earlier this morning I changed the wiki page to explain this detail. Is it 
> still unclear?
mmh. Perhaps a little summary table of the kind
font.family || font.latex.package || resulting font
-------------------------------------------------------
serif || various options
serif
sans
sans
etc.
Might help the dense amongst us make sense of the various possible results 
without having to think, something at least I am not very good at.
Cheers,
f
From: Darren D. <dd...@co...> - 2006年01月29日 21:01:43
On Sunday 29 January 2006 3:58 pm, you wrote:
> Darren Dale wrote:
> > The cache string included the latex font package, but this is not
> > necessarily enough. pslatex, for example, will load the adobe fonts, but
> > the output still depends on whether font.family is set to serif (times)
> > or sans-serif (helvetica). I just added the font.family info to the cache
> > string, that seems to take care of it.
>
> If I can make a suggestion: in
>
> http://new.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
>
> it might be worth clarifying exactly how font.family interacts with the
> various latex package options. I think in particular the combination of
> serif/sans vs. the font.latex.package choice (helvet/typec1m/...) is a
> little bit confusing.
Earlier this morning I changed the wiki page to explain this detail. Is it 
still unclear?

Showing results of 352

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





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

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

More information about our ad policies

Ad destination/click URL:

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