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 13 results of 13

From: Philip A. <pa...@eo...> - 2006年01月09日 19:56:40
Vincent Favre-Nicolin writes:
 > I was going to blame hp, but my brother printer (HL5170DN) does not print 
 > it either - all I get is a postscript error:
 > ERROR NAME;
 > invalidfont
 > COMMAND;
 > stringwidth
 > OPERAND STACK
 > --stringtype--
Thanks for that. I found my printer manual and toggled error
printing. I get a simalr message:
ERROR: invalidfont
OFFENDING COMMAND: stringwidth
STACK:
(psmarker0)
From: Bowen, B. M <bm...@sa...> - 2006年01月09日 19:49:26
I was able to get it to work by doing something similar. However, the x
coordinate does not show up in the lower right corner of the plot. I am
thinking this might be part of the underlying problem.
Thanks for your help,
Brian=20
-----Original Message-----
From: mat...@li...
[mailto:mat...@li...] On Behalf Of
Darren Dale
Sent: Monday, January 09, 2006 12:33 PM
To: mat...@li...
Subject: Re: [Matplotlib-users] setp/xticklabel problem
On Monday 09 January 2006 14:24, Bowen, Brian M wrote:
> The value of 'pos' is 'None'. See the output:
Ok, what happens if you replace line 177 with this:
if (pos=3D=3DNone) or (pos>=3Dlen(self.seq)): return ''
> pos =3D None
> Traceback (most recent call last):
> File
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> line 188, in motion_notify_event
> FigureCanvasBase.motion_notify_event(self, x, y)
> File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> line 797, in motion_notify_event
> func(event)
> File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> line 1085, in mouse_move
> try: s =3D event.inaxes.format_coord(event.xdata, event.ydata)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line=20
> 611, in format_coord
> xs =3D self.format_xdata(x)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line=20
> 593, in format_xdata
> val =3D func(x)
> File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line=20
> 152, in format_data
> return self.__call__(value)
> File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line=20
> 179, in __call__
> else: return self.seq[pos]
> TypeError: list indices must be integers
>
> Brian
>
> -----Original Message-----
> From: mat...@li...
> [mailto:mat...@li...] On Behalf Of=20
> Darren Dale
> Sent: Monday, January 09, 2006 10:32 AM
> To: mat...@li...
> Subject: Re: [Matplotlib-users] setp/xticklabel problem
>
> On Monday 09 January 2006 12:02, Bowen, Brian M wrote:
> > Matplotlib-users,
> >
> > I am stuck on a problem in trying to label the xaxis for some plots.
> > I
> >
> > am trying to do something similar to the following:
> >
> > plot([1,2,3,4], [1,4,9,16])
> > labels =3D setp(gca(), 'xticklabels', ['one', 'two', 'three', =
'four'])
> > set(labels, 'rotation', 'vertical')
> > show()
> >
> >
> > Once the plot is displayed, moving the mouse causes the following=20
> > stack
> > trace:
> >
> > TypeError: list indices must be integers Traceback (most recent call
> > last):
> > File
> > "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py
> > ",
> > line 188, in motion_notify_event
> > FigureCanvasBase.motion_notify_event(self, x, y)
> > File=20
> > "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> > line 797, in motion_notify_event
> > func(event)
> > File=20
> > "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> > line 1085, in mouse_move
> > try: s =3D event.inaxes.format_coord(event.xdata, event.ydata)
> > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line=20
> > 611, in format_coord
> > xs =3D self.format_xdata(x)
> > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line=20
> > 593, in format_xdata
> > val =3D func(x)
> > File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
> > 152, in format_data
> > return self.__call__(value)
> > File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
> > 178, in __call__
> > else: return self.seq[pos]
> >
> >
> > Line 3 of the code seems to be the culprit. Does anyone have any=20
> > idea on how I might be able to workaround this? I have seen posts=20
> > describing issues that seem to be related to the same problem, but I
> > have not seen a solution.
>
> That doesnt make any sense to me. Line 152 calls self.__call__ with=20
> only one argument, which means the pos argument is initialized to=20
> none, and an empty string should be returned. We need to know what the
> value of pos is, please replace line 178 with this:
>
> else:
> print pos
> return self.seq[pos]
>
> and post the result.
>
> Darren
>
>
> -------------------------------------------------------
> 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=20
> makes searching your log files as easy as surfing the web. DOWNLOAD=20
> SPLUNK!
> http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
> -------------------------------------------------------
> 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=20
> makes searching your log files as easy as surfing the web. DOWNLOAD
SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3DClick
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853
dd...@co...
office: (607) 255-9894
fax: (607) 255-9001
-------------------------------------------------------
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://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Darren D. <dd...@co...> - 2006年01月09日 19:33:03
On Monday 09 January 2006 14:24, Bowen, Brian M wrote:
> The value of 'pos' is 'None'. See the output:
Ok, what happens if you replace line 177 with this:
if (pos==None) or (pos>=len(self.seq)): return ''
> pos = None
> Traceback (most recent call last):
> File
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> line 188, in motion_notify_event
> FigureCanvasBase.motion_notify_event(self, x, y)
> File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> line 797, in motion_notify_event
> func(event)
> File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> line 1085, in mouse_move
> try: s = event.inaxes.format_coord(event.xdata, event.ydata)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 611,
> in format_coord
> xs = self.format_xdata(x)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 593,
> in format_xdata
> val = func(x)
> File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
> 152, in format_data
> return self.__call__(value)
> File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
> 179, in __call__
> else: return self.seq[pos]
> TypeError: list indices must be integers
>
> Brian
>
> -----Original Message-----
> From: mat...@li...
> [mailto:mat...@li...] On Behalf Of
> Darren Dale
> Sent: Monday, January 09, 2006 10:32 AM
> To: mat...@li...
> Subject: Re: [Matplotlib-users] setp/xticklabel problem
>
> On Monday 09 January 2006 12:02, Bowen, Brian M wrote:
> > Matplotlib-users,
> >
> > I am stuck on a problem in trying to label the xaxis for some plots. I
> >
> > am trying to do something similar to the following:
> >
> > plot([1,2,3,4], [1,4,9,16])
> > labels = setp(gca(), 'xticklabels', ['one', 'two', 'three', 'four'])
> > set(labels, 'rotation', 'vertical')
> > show()
> >
> >
> > Once the plot is displayed, moving the mouse causes the following
> > stack
> > trace:
> >
> > TypeError: list indices must be integers Traceback (most recent call
> > last):
> > File
> > "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> > line 188, in motion_notify_event
> > FigureCanvasBase.motion_notify_event(self, x, y)
> > File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> > line 797, in motion_notify_event
> > func(event)
> > File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> > line 1085, in mouse_move
> > try: s = event.inaxes.format_coord(event.xdata, event.ydata)
> > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > 611, in format_coord
> > xs = self.format_xdata(x)
> > File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
> > 593, in format_xdata
> > val = func(x)
> > File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
> > 152, in format_data
> > return self.__call__(value)
> > File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
> > 178, in __call__
> > else: return self.seq[pos]
> >
> >
> > Line 3 of the code seems to be the culprit. Does anyone have any idea
> > on how I might be able to workaround this? I have seen posts
> > describing issues that seem to be related to the same problem, but I
> > have not seen a solution.
>
> That doesnt make any sense to me. Line 152 calls self.__call__ with only
> one argument, which means the pos argument is initialized to none, and
> an empty string should be returned. We need to know what the value of
> pos is, please replace line 178 with this:
>
> else:
> print pos
> return self.seq[pos]
>
> and post the result.
>
> Darren
>
>
> -------------------------------------------------------
> 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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
> -------------------------------------------------------
> 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://ads.osdn.com/?ad_idv37&alloc_id865&op=Click
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853
dd...@co...
office: (607) 255-9894
fax: (607) 255-9001
From: Bowen, B. M <bm...@sa...> - 2006年01月09日 19:24:56
The value of 'pos' is 'None'. See the output:
pos =3D None
Traceback (most recent call last):
 File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
line 188, in motion_notify_event
 FigureCanvasBase.motion_notify_event(self, x, y)
 File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
line 797, in motion_notify_event
 func(event)
 File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
line 1085, in mouse_move
 try: s =3D event.inaxes.format_coord(event.xdata, event.ydata)
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 611,
in format_coord
 xs =3D self.format_xdata(x)
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 593,
in format_xdata
 val =3D func(x)
 File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
152, in format_data
 return self.__call__(value)
 File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
179, in __call__
 else: return self.seq[pos]
TypeError: list indices must be integers
Brian=20
-----Original Message-----
From: mat...@li...
[mailto:mat...@li...] On Behalf Of
Darren Dale
Sent: Monday, January 09, 2006 10:32 AM
To: mat...@li...
Subject: Re: [Matplotlib-users] setp/xticklabel problem
On Monday 09 January 2006 12:02, Bowen, Brian M wrote:
> Matplotlib-users,
>
> I am stuck on a problem in trying to label the xaxis for some plots. I
> am trying to do something similar to the following:
>
> plot([1,2,3,4], [1,4,9,16])
> labels =3D setp(gca(), 'xticklabels', ['one', 'two', 'three', 'four']) =
> set(labels, 'rotation', 'vertical')
> show()
>
>
> Once the plot is displayed, moving the mouse causes the following=20
> stack
> trace:
>
> TypeError: list indices must be integers Traceback (most recent call
> last):
> File
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> line 188, in motion_notify_event
> FigureCanvasBase.motion_notify_event(self, x, y)
> File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> line 797, in motion_notify_event
> func(event)
> File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> line 1085, in mouse_move
> try: s =3D event.inaxes.format_coord(event.xdata, event.ydata)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line=20
> 611, in format_coord
> xs =3D self.format_xdata(x)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line=20
> 593, in format_xdata
> val =3D func(x)
> File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line=20
> 152, in format_data
> return self.__call__(value)
> File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line=20
> 178, in __call__
> else: return self.seq[pos]
>
>
> Line 3 of the code seems to be the culprit. Does anyone have any idea=20
> on how I might be able to workaround this? I have seen posts=20
> describing issues that seem to be related to the same problem, but I=20
> have not seen a solution.
That doesnt make any sense to me. Line 152 calls self.__call__ with only
one argument, which means the pos argument is initialized to none, and
an empty string should be returned. We need to know what the value of
pos is, please replace line 178 with this:
 else:=20
 print pos
 return self.seq[pos]
and post the result.
Darren
-------------------------------------------------------
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://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Ryan K. <rya...@gm...> - 2006年01月09日 18:40:08
You can scale the PNG by setting the dpi keyword argument in savefig.=20
You can also adjust the size of a plot using the set_figsize_inches
method of the figure:
In [31]: t=3Darange(0,1,0.01)
In [32]: y=3Dsin(2*pi*t)
In [33]: temp=3Dfigure(1)
In [34]: temp.set_figsize_inches((2,10),forward=3DTrue)
In [35]: plot(t,y)
Out[35]: [<matplotlib.lines.Line2D instance at 0xb4a9196c>]
In [36]: savefig('test.png',dpi=3D50)
In [37]:
On 1/9/06, Christian Seberino <seb...@sp...> wrote:
> Is there an easy way to stretch/shrink dimensions of PNG
> generated by savefig to ANYTHING you want in addition
> to 800 x 600 pixels?
>
> e.g. can you make 704 x 1107?
> 120 x 1020?
> 4008 x 3653?
>
> Chris
>
>
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iQEVAwUAQ8Kh8MXAD6FzhZH3AQKESgf/TgzuvMobvVPcXqf6R3fLjtZxBB2q8qRV
> yMOMn5KSw4+R/t0ZOJ/hCB89ZJ+7gNbJtMHIu+HRdVKZvVv6Z0Aww5jjKrOaHocP
> d7LmqemMYmbaxfPrDnDo79Idyg1XCSNNkI5kml06633f5HqpvQ8rE7XlVNn+DtJY
> b25fSA2gLRukI92BSBozCbDadXmejFBd9aAG13JcxuOLwLp7ZqDbNib7KU9u6SpN
> I7xIZaNceHMWwbRqR0Op4MSRIMeAovDOjEq1kGI6piCR0mmge8ARGXwxRDxy5WZ4
> 4Z86sqG89w4nGo6r2mKwbNsvwI2xkoscECN7JttZfjZlKpnoy0t8pA=3D=3D
> =3D/rpn
> -----END PGP SIGNATURE-----
>
>
>
From: Christopher B. <Chr...@no...> - 2006年01月09日 18:33:28
Christian Seberino wrote:
> Is there an easy way to stretch/shrink dimensions of PNG
> generated by savefig to ANYTHING you want in addition
> to 800 x 600 pixels?
Yes:
http://www.scipy.org/wikis/topical_software/AdjustingImageSize
-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: Christian S. <seb...@sp...> - 2006年01月09日 17:48:37
Is there an easy way to stretch/shrink dimensions of PNG
generated by savefig to ANYTHING you want in addition
to 800 x 600 pixels?
e.g. can you make 704 x 1107?=20
 120 x 1020?=20
	 4008 x 3653?
Chris
From: Darren D. <dd...@co...> - 2006年01月09日 17:32:34
On Monday 09 January 2006 12:02, Bowen, Brian M wrote:
> Matplotlib-users,
>
> I am stuck on a problem in trying to label the xaxis for some plots. I
> am trying to do something similar to the following:
>
> plot([1,2,3,4], [1,4,9,16])
> labels = setp(gca(), 'xticklabels', ['one', 'two', 'three', 'four'])
> set(labels, 'rotation', 'vertical')
> show()
>
>
> Once the plot is displayed, moving the mouse causes the following stack
> trace:
>
> TypeError: list indices must be integers Traceback (most recent call
> last):
> File
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> line 188, in motion_notify_event
> FigureCanvasBase.motion_notify_event(self, x, y)
> File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> line 797, in motion_notify_event
> func(event)
> File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
> line 1085, in mouse_move
> try: s = event.inaxes.format_coord(event.xdata, event.ydata)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 611,
> in format_coord
> xs = self.format_xdata(x)
> File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 593,
> in format_xdata
> val = func(x)
> File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
> 152, in format_data
> return self.__call__(value)
> File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
> 178, in __call__
> else: return self.seq[pos]
>
>
> Line 3 of the code seems to be the culprit. Does anyone have any idea on
> how I might be able to workaround this? I have seen posts describing
> issues that seem to be related to the same problem, but I have not seen
> a solution.
That doesnt make any sense to me. Line 152 calls self.__call__ with only one 
argument, which means the pos argument is initialized to none, and an empty 
string should be returned. We need to know what the value of pos is, please 
replace line 178 with this:
 else: 
 print pos
 return self.seq[pos]
and post the result.
Darren
From: Bowen, B. M <bm...@sa...> - 2006年01月09日 17:03:48
Matplotlib-users,=20
I am stuck on a problem in trying to label the xaxis for some plots. I
am trying to do something similar to the following:
plot([1,2,3,4], [1,4,9,16])
labels =3D setp(gca(), 'xticklabels', ['one', 'two', 'three', 'four'])
set(labels, 'rotation', 'vertical')
show()=20
Once the plot is displayed, moving the mouse causes the following stack
trace:
TypeError: list indices must be integers Traceback (most recent call
last):
 File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
line 188, in motion_notify_event
 FigureCanvasBase.motion_notify_event(self, x, y)
 File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
line 797, in motion_notify_event
 func(event)
 File "/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py",
line 1085, in mouse_move
 try: s =3D event.inaxes.format_coord(event.xdata, event.ydata)
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 611,
in format_coord
 xs =3D self.format_xdata(x)
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 593,
in format_xdata
 val =3D func(x)
 File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
152, in format_data
 return self.__call__(value)
 File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
178, in __call__
 else: return self.seq[pos]
Line 3 of the code seems to be the culprit. Does anyone have any idea on
how I might be able to workaround this? I have seen posts describing
issues that seem to be related to the same problem, but I have not seen
a solution.
Thanks,
Brian Bowen
From: Charlie M. <cw...@gm...> - 2006年01月09日 15:06:09
There is support for numpy in the latest release we are trying to push
now. You can download the source here:
http://cheeseshop.python.org/pypi/matplotlib/0.86
- Charlie
On 1/9/06, Christopher Fonnesbeck <ch...@tr...> wrote:
> I am trying to use numpy as the backend for matplotlib (I see now
> that you can specify it in setup.py). But the matplotlib/numerix/fft/
> __init__.py still appears to be out of date:
>
> 1 from matplotlib.numerix import which
> 2
> 3 if which[0] =3D=3D "numarray":
> 4 from numarray.fft import *
> 5 elif which[0] =3D=3D "numeric":
> 6 from FFT import *
> 7 elif which[0] =3D=3D "scipy":
> 8 from scipy import *
> 9 inverse_fft =3D ifft
> 10 from scipy.basic.fft import *
> 11 from scipy.corefft import *
> 12 else:
> 13 raise RuntimeError("invalid numerix selector")
>
> If this is changed to numpy, should one expect the numpy backend to
> work?
>
>
> Thanks.
>
> --
> Christopher J. Fonnesbeck
>
> Population Ecologist, Marine Mammal Section
> Fish & Wildlife Research Institute (FWC)
> St. Petersburg, FL
>
> Adjunct Assistant Professor
> Warnell School of Forest Resources
> University of Georgia
> Athens, GA
>
> T: 727.235.5570
> E: chris at trichech.us
>
>
>
>
>
From: Christopher F. <ch...@tr...> - 2006年01月09日 15:02:35
Attachments: smime.p7s
I am trying to use numpy as the backend for matplotlib (I see now 
that you can specify it in setup.py). But the matplotlib/numerix/fft/ 
__init__.py still appears to be out of date:
 1 from matplotlib.numerix import which
 2
 3 if which[0] == "numarray":
 4 from numarray.fft import *
 5 elif which[0] == "numeric":
 6 from FFT import *
 7 elif which[0] == "scipy":
 8 from scipy import *
 9 inverse_fft = ifft
 10 from scipy.basic.fft import *
 11 from scipy.corefft import *
 12 else:
 13 raise RuntimeError("invalid numerix selector")
If this is changed to numpy, should one expect the numpy backend to 
work?
Thanks.
--
Christopher J. Fonnesbeck
Population Ecologist, Marine Mammal Section
Fish & Wildlife Research Institute (FWC)
St. Petersburg, FL
Adjunct Assistant Professor
Warnell School of Forest Resources
University of Georgia
Athens, GA
T: 727.235.5570
E: chris at trichech.us
From: Philip A. <pa...@eo...> - 2006年01月09日 02:20:26
This behavior has to be idiosyncratic to my system (Fedora Core 3,
HP LaserJet 4050N), 
but I'd appreciate any suggestions about how to debug it. 
Specifically, when I
run the following script:
==> bugreport.py <==
from pylab import *
fig1=figure(1)
plot([0,1],[0,1])
savefig('file1.ps')
The resulting file1.ps looks fine with ghostview
(ggv-2.8.0-1). 
Printing with either ggv or lpr using
cups-libs-1.1.22-0.rc1.8.7) does nothing
(no response, nothing queued).
When I run ps2pdf (Aladin 8.53) on the file
> ps2pdf file1.ps file1_ps2pdf.pdf
the resulting file1_ps2pdf.pdf looks find under xpdf, but once
again won't print.
It also looks fine with Adobe Reader 7.0, and will print.
If I then produce a roundtrip postscript file with:
acroread -toPostScript -pairs file1_ps2pdf.pdf file1_roundtrip.ps
The resulting file1_roundtrip.ps does print.
On the off chance that anyone has a clue about what could be going on,
I've put file1.ps, file1_ps2pdf.pdf and file1_roundtrip.ps in
http://clouds.eos.ubc.ca/~phil/matplotlib_postscript
python bugreport.py --verbose-helpful
matplotlib data path /home/phil/usr24/share/matplotlib
$HOME=/home/phil
CONFIGDIR=/home/phil/.matplotlib
loaded rc file /home/phil/.matplotlib/matplotlibrc
matplotlib version 0.85.1.cvs
verbose.level helpful
interactive is False
platform is linux2
numerix Numeric 24.2
font search path ['/home/phil/usr24/share/matplotlib']
loaded ttfcache file /home/phil/.matplotlib/ttffont.cache
backend PS version Level II
This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
' TeX output 2006年01月08日:1818' -> 1367d6d32a9c3bf965ed7bd8deb2e91a.ps
<texc.pro><psfrag.pro><texps.pro><special.pro><color.pro>. <cmr10.pfb>[1
<1367d6d32a9c3bf965ed7bd8deb2e91a.eps>] 
Thanks, Phil
From: Philip A. <pa...@eo...> - 2006年01月09日 01:19:53
The following script:
_________________________
from pylab import *
fig1=figure(1)
plot([0,1],[0,1])
xlabel(r'$c_p \overline{w^\prime,円\theta_v^\prime}\ \mathrm{(W,円m^{-2})$')
#xlabel(r'$c_p \overline{w^\prime,円\theta_v^\prime}$')
savefig('bug.ps')
_________________________
fails for me with the popup message:
"Failed to save
Error message: [Errno 2] No such file or directory: 
'aa457a9c63ca3a79b3754ed98a30c2ba.ps'"
(although the figure window is plotted correctly).
The script works when I switch to the second xlabel statement,
or change the savefig output to png.
My setup:
~/teaching/atsc500/finalcode phil@owl% python bugreport.py --verbose-helpful
matplotlib data path /home/phil/usr24/share/matplotlib
$HOME=/home/phil
CONFIGDIR=/home/phil/.matplotlib
loaded rc file /home/phil/.matplotlib/matplotlibrc
matplotlib version 0.85.1.cvs
verbose.level helpful
interactive is True
platform is linux2
numerix Numeric 24.2
font search path ['/home/phil/usr24/share/matplotlib']
loaded ttfcache file /home/phil/.matplotlib/ttffont.cache
backend GTKAgg version 2.4.1
This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com)
dvips: ! DVI file can't be opened.
thanks, Phil Austin

Showing 13 results of 13

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 によって変換されたページ (->オリジナル) /