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

Showing results of 203

<< < 1 2 3 4 5 6 .. 9 > >> (Page 4 of 9)
From: Charlie M. <cw...@gm...> - 2005年12月13日 17:38:21
I am trying to animate a plot with a circle that will be moved around.
c =3D Circle((0,0))
a =3D gca()
a.add_artist(c)
draw() # This works
c.set_transform(matplotlib.transforms.translation_transform(0.1, 0.1))
draw() # SEGFAULT
How do I update the transform?
Thanks,
- Charlie
From: Ken M. <mc...@ii...> - 2005年12月13日 17:36:15
On 12/12/05 10:46, Christian Kristukat wrote:
> I posted this some weeks ago however no solution was found at that time.
I'm sorry, I was under the impression that the problem was caused by some kind 
of True-Type font weirdness. Reviewing the exchange, it appears that someone 
else reproduced the segfault and tracked it down to the presence of a 
particular font.
> Since matplotlib 0.84 - now I'm using mpl from cvs - the WXAgg backend
> crashes with a segfault after calling pylab.show().
Please try disabling the WXAgg accelerator to see if that's where the segfault 
is coming from. Stick the following lines at the beginning of your script:
	import matplotlib.backends.backend_wxagg
	matplotlib.backends.backend_wxagg._use_accelerator(False)
A short script that consistently reproduces the problem would be helpful, as 
would the output whith verbose.level set to debug-annoying.
> I use mpl through the OO interface in a larger wxPython application and
> temporarily switched to the WX backend. However it seems that recently the tex
> support was dropped. I get a NotImplementedError when I set rcParams['usetex'] =
> True. It would be nice to have at least the tex support back, solving the
> segfault problem is possibly harder.
To the best of my knowledge, the WX backend has never supported rendering text 
with TeX. My understanding is that you have to be using a backend that 
renders the figure with Agg (e.g. WXAgg) OR the PS backend to get TeX support.
If the segfault is being cause by the WXAgg accelerator you can switch back to 
the WXAgg backend and disable the accelerator, which would allow you to use 
TeX again.
> Btw. I can't find any agg libraries on my system which I could update. Are they
> part of mpl?
The most current version of Agg (2.3) is included with the matplotlib source 
distribution. Matplotlib compiles the parts of Agg it needs into each Python 
extension instead of linking to a shared library, which is probably why you 
couldn't find any Agg libraries on your system.
Ken
From: Jiri P. <po...@ph...> - 2005年12月13日 16:05:45
 Hallo,
I have array (ut) of numbers represents unix time (number of seconds
from 1. 1. 1970) of some evenets:
 ...
 1127164705
 1127199439
 1127199439
 1127199494
 1127199640
 1127199651
 ...
I want to plot histogram of this events. I used:
 from pylab import *
 n, bins, patches = hist( ut, 50 )
 setp(patches, 'facecolor', 'g', 'alpha', 0.75)
 axis([ 0.9999*amin(ut), 1.0001*amax(ut), 0, 1.1*amax(n) ])
 show()
But I want to display labels on x-axis's tics as a date human readable
date (for example "Dec 13").
Can anybody help me?
--
JP
From: Hugo G. <hg...@gm...> - 2005年12月13日 14:40:14
Hi to all,
I'm interessed in having an interactive plotting window where one of the
subplots would be for console output.
For example I would like to print in a subplot (similar to a console output=
)
the several computed values of a selecetd span from some other subplot.
Does anyone needed a similar feature?
Thanks in advance for your help.
From: Paul B. <peb...@gm...> - 2005年12月13日 13:24:14
Yes, it would definitely be nice if a better reference is forthcoming. One
with John as lead author, instead of mine. The current situation makes me
feel like a thief.
 -- Paul
On 12/13/05, Darren Dale <dd...@co...> wrote:
>
> Hi Nils,
>
> On Tuesday 13 December 2005 4:51 am, Nils Wagner wrote:
> > Hi all,
> >
> > I found the following message
> >
> > http://www.nabble.com/Publication-reference-to-matplotlib--t331264.html
> >
> > but is there a more general way to cite matplotlib in publications e.g.
> > similar to
> > http://www.scipy.org/documentation/citingscipy.html
>
> John gave this answer a while back:
>
> > Perhaps it would be a good idea for you and others who publish with
> > mpl to cite it in the methods section (eg "figures x, y,and z were
> > generated using matplotlib") with a reference pointing to the web
> > site. Promotion and publicity is always a good thing. Some journals
> > don't allow links in the citations, in which case you could use
> >
> > @InProceedings{BarrettEtal2004,
> > Author =3D {Barrett, P. and Hunter, J.D. and Greenfield, P.},
> > Title =3D {Matplotlib - {A} Portable {Python} Plotting
> Package},
> > BookTitle =3D {Astronomical Data Analysis Software \& Systems
> {XIV}.},
> > year =3D 2004
> > }
>
> I am also working on a couple papers, and was wondering if being mentione=
d
> in
> the acknowledgments would be acceptable. At any rate, I think it would be
> best if the mpl homepage had a "citing matplotlib" link.
>
> 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
>
--
Paul Barrett, PhD Johns Hopkins University
Assoc. Research Scientist Dept of Physics and Astronomy
Phone: 410-516-5190 Baltimore, MD 21218
From: Darren D. <dd...@co...> - 2005年12月13日 11:24:23
Hi Nils,
On Tuesday 13 December 2005 4:51 am, Nils Wagner wrote:
> Hi all,
>
> I found the following message
>
> http://www.nabble.com/Publication-reference-to-matplotlib--t331264.html
>
> but is there a more general way to cite matplotlib in publications e.g.
> similar to
> http://www.scipy.org/documentation/citingscipy.html
John gave this answer a while back:
> Perhaps it would be a good idea for you and others who publish with
> mpl to cite it in the methods section (eg "figures x, y,and z were
> generated using matplotlib") with a reference pointing to the web 
> site. Promotion and publicity is always a good thing. Some journals
> don't allow links in the citations, in which case you could use
> 
> @InProceedings{BarrettEtal2004,
> Author = {Barrett, P. and Hunter, J.D. and Greenfield, P.},
> Title = {Matplotlib - {A} Portable {Python} Plotting Package},
> BookTitle = {Astronomical Data Analysis Software \& Systems {XIV}.},
> year = 2004
> }
I am also working on a couple papers, and was wondering if being mentioned in 
the acknowledgments would be acceptable. At any rate, I think it would be 
best if the mpl homepage had a "citing matplotlib" link.
Darren
From: Nils W. <nw...@me...> - 2005年12月13日 09:52:06
Hi all,
I found the following message
http://www.nabble.com/Publication-reference-to-matplotlib--t331264.html
but is there a more general way to cite matplotlib in publications e.g.
similar to
http://www.scipy.org/documentation/citingscipy.html
Nils
 
From: Andrea R. <ari...@pi...> - 2005年12月13日 08:55:57
Thanks to both Jeff and John for your help. Just a further question: 
what if I want to do contour plot with dashed lines (or any other 
symbol)?
contour(x, y, nu.transpose(z), linestyle = '-', colors = 'r')
or
contour(x, y, nu.transpose(z), colors = 'r-')
don't work.
Thanks,
 Andrea
On Dec 13, 2005, at 03:43 , John Hunter wrote:
>>>>>> "Jeff" == Jeff Whitaker <js...@fa...> writes:
>
> Jeff> fig.set_figsize_inches((8,8)) # default is (8,6)
>
> Jeff> You might also have to use the set_xlim and set_ylim axes
> Jeff> methods to make sure the axis limits are set to be the same.
>
> You probably also want to look at the "set_aspect" method of the axes,
> which has received a lot of attention from mark Bakkar. In
> particular,
>
> ax = subplot(111, aspect='equal')
>
> should help.
>
> With an existing axes instance,
>
> ax.set_aspect('equal').
>
> Here is the docstring, since the web site is not updated to the
> current release yet.,
>
> def set_aspect 
> (self,aspect='normal',fixLimits=False,alignment='center'):
> """
> Set aspect to 'normal' or 'equal'
>
> 'normal' means matplotlib determines aspect ratio
>
> 'equal' means scale on x and y axes will be set equal such
> that circle looks like circle
>
> In the future we may want to add a number as input to have
> a certain aspect ratio,
>
> such as vertical scale exagerrated by 2.
>
> fixLimits: False means data limits will be changed, but height
> and widths of axes preserved. True means height or
> width will be changed, but data limits preserved
>
> alignment is 'center' or 'lowerleft', only used when fixLimits
> is True
>
> ACCEPTS: str, boolean, str
> """
From: John H. <jdh...@ac...> - 2005年12月13日 02:50:05
>>>>> "Jeff" == Jeff Whitaker <js...@fa...> writes:
 Jeff> fig.set_figsize_inches((8,8)) # default is (8,6)
 Jeff> You might also have to use the set_xlim and set_ylim axes
 Jeff> methods to make sure the axis limits are set to be the same.
You probably also want to look at the "set_aspect" method of the axes,
which has received a lot of attention from mark Bakkar. In
particular, 
ax = subplot(111, aspect='equal') 
should help.
With an existing axes instance, 
ax.set_aspect('equal').
Here is the docstring, since the web site is not updated to the
current release yet.,
 def set_aspect(self,aspect='normal',fixLimits=False,alignment='center'):
 """
 Set aspect to 'normal' or 'equal'
 'normal' means matplotlib determines aspect ratio
 'equal' means scale on x and y axes will be set equal such
 that circle looks like circle
 In the future we may want to add a number as input to have
 a certain aspect ratio,
 such as vertical scale exagerrated by 2.
 fixLimits: False means data limits will be changed, but height
 and widths of axes preserved. True means height or
 width will be changed, but data limits preserved
 alignment is 'center' or 'lowerleft', only used when fixLimits
 is True
 ACCEPTS: str, boolean, str
 """
From: John H. <jdh...@ac...> - 2005年12月13日 02:44:31
>>>>> "Steve" == Steve Miller <ste...@jh...> writes:
 Steve> Has anyone worked with quotes_historical_yahoo module
 Steve> enough to know if the 7th attribute, adjusted price, is
 Steve> available? Adjusted price is sort of a total return figure
 Steve> -- price adjusted for splits and dividends and is actually
 Steve> the critical number to consider for performance over long
 Steve> periods of time. Finance.quothist in Perl provides this
 Steve> attribute as an option.
There is support for this in CVS -- you can pass the "adjusted" kwarg
to the function to get the adjusted price. There is also the asobject
kwarg, which when true, will return an object with the various
attributes (open, close, high, low, date, volume) as array
attributes. This is a little more convenient, especially when working
with multiple instruments. Eg
 sp = finance.quotes_historical_yahoo(
 '^GSPC', d1, d2, asobject=True, adjusted=True)
 returns = (sp.open[1:] - sp.open[:-1])/sp.open[1:]
 [n,bins,patches] = hist(returns, 100)
 mu = mean(returns)
 sigma = std(returns)
 x = normpdf(bins, mu, sigma)
 plot(bins, x, color='red', lw=2)
JDH
From: Tony R. <ton...@gm...> - 2005年12月13日 02:34:56
That did the trick... Thank you very much!
Tony
Peter Groszkowski wrote:
>
>>
>> Does anyone know of a way to create a legend outside the bounds of 
>> the graph? I have a stacked area chart that doesn't have any spare 
>> room. When matplotlib draws the legend it obscures the data! I looked 
>> through the available documentation and didn't see any way around 
>> this. Does anyone have any tricks that might work?
>>
>
> checkout figlegend_demo.py in the matplotlib examples...
>
> more trivial example:
>
> #!/usr/bin/env python
> from pylab import *
> x=arange(0, 6, 0.1)
> y=sin(x)
> figure(figsize=(11,6))
> axes([0.075, 0.10, 0.55, 0.78])
> lines=plot(x,y)
> figlegend((lines,), ("i'm outside!",), 'upper right')
> show()
>
> can play with axes/figsize if you've got long names
>
> cheers,
>
From: Neil P. <mat...@ke...> - 2005年12月12日 23:57:47
Hi,
I've been giving matplotlib (0.85) a spin, as a front end for
'exploring' scientific simulation results. Now I've got the data in and
had a play, there's been a few things which have confused me somewhat
about the API/features:
* Is there the equivalent of [axes].set_ydata(), but for contours or 
other 3d-data plots?
* pcolor seems slow, and for some reason it defaults to automatically 
selecting a different (overly large) automatic axis-range than 
contour[f] - even if it has the X&Y data. I have an irregular mesh, so 
I'm not sure that imshow will work properly on its own, even if I set 
the data range in some way.
* For some reason my install leaves me with pylab windows which have no
proper icons in the bottom button bar. I've set MATPLOTLIBDATA and
PYTHONPATH, since I installed the modules into a subdir of my home
directory.
* Closing the pylab windows using the window-manager results in the
python process continuing - should this be calling some function to
interrupt the show() function? (I'm running GTK/GTKAgg if its relevant)
Nevertheless, even with these annoyances, I'm quite happy with the 
results so far - it is perhaps already simpler than the system I had 
been using previously, and has taken very little time to get to grips 
with :)
Having said that, I'm not entirely clear whether pylab is intended to be
'the' interface to matplotlib, or just a simplified front-end - it seems
quite confusing from reading some of the online documents.
Thanks for matplotlib, (I'll think of other things to ask, in time!)
-- 
Neil
From: Peter G. <pgr...@ge...> - 2005年12月12日 21:57:47
>
> Does anyone know of a way to create a legend outside the bounds of the 
> graph? I have a stacked area chart that doesn't have any spare room. 
> When matplotlib draws the legend it obscures the data! I looked 
> through the available documentation and didn't see any way around 
> this. Does anyone have any tricks that might work?
>
checkout figlegend_demo.py in the matplotlib examples...
more trivial example:
#!/usr/bin/env python
from pylab import *
x=arange(0, 6, 0.1)
y=sin(x)
figure(figsize=(11,6))
axes([0.075, 0.10, 0.55, 0.78])
lines=plot(x,y)
figlegend((lines,), ("i'm outside!",), 'upper right')
show()
can play with axes/figsize if you've got long names
cheers,
-- 
Peter Groszkowski Gemini Observatory
Tel: +1 808 9742509 670 N. A'ohoku Place
Fax: +1 808 9359235 Hilo, Hawai'i 96720, USA 
From: Tony R. <ton...@gm...> - 2005年12月12日 21:39:49
Hello,
Does anyone know of a way to create a legend outside the bounds of the 
graph? I have a stacked area chart that doesn't have any spare room. 
When matplotlib draws the legend it obscures the data! I looked through 
the available documentation and didn't see any way around this. Does 
anyone have any tricks that might work?
Tony Rippy
From: Steve M. <ste...@jh...> - 2005年12月12日 20:41:34
Has anyone worked with quotes_historical_yahoo module enough to know if the
7th attribute, adjusted price, is available? Adjusted price is sort of a
total return figure -- price adjusted for splits and dividends and is
actually the critical number to consider for performance over long periods
of time. Finance.quothist in Perl provides this attribute as an option.
 
Steve Miller 
From: Jeff W. <js...@fa...> - 2005年12月12日 17:25:48
Andrea Riciputi wrote:
> Hi all,
> I'm quite new to matplotlib and I'm trying to do some squared contour 
> plots (I mean contour plots with the same scale for both axes). 
> However, any attempt has failed. How can I get a plot with an aspect 
> ratio equals 1?
>
> Thanks in advance,
> Andrea
>
Andrea: The matplotlib default figure size is not square. To remedy 
this, you can either edit your .matplotlibrc and set (for example)
figure.subplot.left : 0.1 # the left side of the subplots of the figure
figure.subplot.right : 0.9 # the right side of the subplots of the figure
figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure
figure.subplot.top : 0.9 # the top of the subplots of the figure
or do the same manually in your script via
fig.set_figsize_inches((8,8)) # default is (8,6)
You might also have to use the set_xlim and set_ylim axes methods to 
make sure the axis limits are set to be the same.
HTH,
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Christian K. <ck...@ho...> - 2005年12月12日 16:46:09
Hi,
I posted this some weeks ago however no solution was found at that time. Since
matplotlib 0.84 - now I'm using mpl from cvs - the WXAgg backend crashes with a
segfault after calling pylab.show(). I just checked 0.83 and it works though
considerably slower - my compliments to the speed improvements!
I use mpl through the OO interface in a larger wxPython application and
temporarily switched to the WX backend. However it seems that recently the tex
support was dropped. I get a NotImplementedError when I set rcParams['usetex'] =
True. It would be nice to have at least the tex support back, solving the
segfault problem is possibly harder.
I'm running wxPython 2.6.1 on SuSE linux, python 2.3
Btw. I can't find any agg libraries on my system which I could update. Are they
part of mpl?
Thank you for any hints,
Christian
From: Andrea R. <ari...@pi...> - 2005年12月12日 16:16:59
Hi all,
I'm quite new to matplotlib and I'm trying to do some squared contour 
plots (I mean contour plots with the same scale for both axes). 
However, any attempt has failed. How can I get a plot with an aspect 
ratio equals 1?
Thanks in advance,
 Andrea
From: Charlie M. <cw...@gm...> - 2005年12月12日 15:51:07
 That definitely getting into limited memory land. What might
help are the new python2.4 generators for list comprehensions. They
were added for things like this. Simply replace [float(val) for val
in line.split(delimiter)] with (float(val) for val in
line.split(delimiter)). This won't cause a memory error since it is
not evaluated until you iterate it. You might have another mem error
later depending on your usage.
- Charlie
On 12/12/05, Kenneth R Odom <kr...@us...> wrote:
>
> Hello all,
>
> I am new to using Matplotlib and have run into the following error:
>
> Traceback (most recent call last):
> File "<pyshell#0>", line 1, in -toplevel-
> plotfile =3D
> load('F:/water_budget_analysis/pilotwi_out.txt',
> delimiter=3D',')
> File "F:\Python24\Lib\site-packages\matplotlib\pylab.py",
> line 999, in load
> row =3D [float(val) for val in line.split(delimiter)]
> MemoryError
>
>
> Let me explain what I have been attempting to do. I am trying to generat=
e a
> histogram of a large amount of data that has been mined from ArcMap. Her=
e's
> the scary part. The size of the data file is approximately 190 MB with
> about 24 million data values. Have I reached a limit here? Any
> suggestions?
>
> thanks
> Kenneth
>
>
>
> Kenneth R. Odom, PhD, PE
> Surface Water Specialist
> USGS Kentucky Water Science Center
> 9818 Bluegrass Parkway
> Louisville, KY 40299-1906
>
> Ph 502.493.1933
> Fax 502.493.1909
> email: kr...@us...
From: Zunbeltz I. <zun...@gm...> - 2005年12月12日 15:46:21
Hi,
I am embeding a Canvas in a wxWidgets dialog. How can i put the
coordinates the mouse ponter in the toolbar (like a StaticText or
something similar )?
Thanks in advance=20
Zunbeltz
From: Kenneth R O. <kr...@us...> - 2005年12月12日 15:30:17
Hello all,
I am new to using Matplotlib and have run into the following error: 
Traceback (most recent call last):
 File "<pyshell#0>", line 1, in -toplevel-
 plotfile = load('F:/water_budget_analysis/pilotwi_out.txt', 
delimiter=',')
 File "F:\Python24\Lib\site-packages\matplotlib\pylab.py", line 999, in 
load
 row = [float(val) for val in line.split(delimiter)]
MemoryError
Let me explain what I have been attempting to do. I am trying to generate 
a histogram of a large amount of data that has been mined from ArcMap. 
Here's the scary part. The size of the data file is approximately 190 MB 
with about 24 million data values. Have I reached a limit here? Any 
suggestions?
thanks
Kenneth
 
Kenneth R. Odom, PhD, PE
Surface Water Specialist
USGS Kentucky Water Science Center
9818 Bluegrass Parkway
Louisville, KY 40299-1906
Ph 502.493.1933
Fax 502.493.1909
email: kr...@us...
From: Paul B. <peb...@gm...> - 2005年12月12日 13:01:54
Peter-Jan,
The use of setp() is in the example script legend_demo.py, so it should
still be valid. I would suggest using that code as an example. You must
first plot the figure and the legend, before changing the legend's fontsize=
.
 -- Paul
On 12/12/05, Randewijk P-J <pjr...@su...> <pjr...@su...> wrote:
>
> Dear Paul,
>
> "...
> setp(ltext, fontsize=3D'large')
> ..."
>
> gives me the following error:
>
> "...
> Traceback (most recent call last):
> ...
> NameError: name 'ltext' is not defined
> ..."
>
> If setp(...) is similar to matlab(tm)'s set(...)
>
> then the syntax should be:
>
> lh=3Dlegend(....)
>
> setp(lh,fontsize=3D8)
>
> the following error then occurs:
>
> "...
> Traceback (most recent call last):
> ...
> AttributeError: Legend instance has no attribute 'set_fontsize'
> ..."
>
> If there was an attribute 'fontsize', then:
>
> "...
> legend(('...'),loc=3D'...',fontsize=3D10)
> ..."
>
> Regards,
>
> Peter-Jan
>
> PS: The help on 'setp' refers the whole time to 'set' and not 'setp' in
> the help text, a.k.a. matlab(tm)'s 'set'
>
> >>> help(setp)
> Help on function setp in module matplotlib.pylab:
>
> setp(*args, **kwargs)
> matlab(TM) and pylab allow you to use set and get to set and get
> object properties, as well as to do introspection on the object
> For example, to set the linestyle of a line to be dashed, you can do
>
> >>> line, =3D plot([1,2,3])
> >>> set(line, linestyle=3D'--')
> ...
>
> pylab doesn't have imho a 'set' function:
>
> >>> setp
> <function setp at 0x01A327F0>
> >>> set
> Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> NameError: name 'set' is not defined
>
>
>
> -----Original Message-----
> From: Paul Barrett [mailto:peb...@gm...]
> Sent: 10 December 2005 22:02
> To: Randewijk P-J <pjr...@su...>
> Subject: Re: [Matplotlib-users] Help/RFC with 'legend' command
>
> Dear P-J,
>
> My mistake. This may not be a bug, but a feature. The legend text size
> can be adjusted by using:
>
> setp(ltext, fontsize=3D'large')
>
> I still think that the user should be able to adjust the default font siz=
e
> and have the legend font size change proportionally.
>
> -- Paul
>
> On 12/10/05, Paul Barrett <peb...@gm...> wrote:
> >
> > On 12/9/05, Randewijk P-J <pjr...@su...> < pjr...@su...>
> > wrote:
> > >
> > > Dear Paul,
> > >
> > >
> > > > It should depend on font.size in the rc file.
> > >
> > >
> > > That's what I thought.
> > >
> > > I changed the font.size to 5.
> > >
> > > Only my figtext's fontsize changed. The legend's fontsize remained a=
t
> > > (what appears to be) 12...
> > >
> > > I'm still running 0.84, can that be the problem ?
> >
> >
> > No. This is a bug in the legend code. The code initializes the text
> > size when the object is created, but does not update it at any later ti=
me.
> > This should be fixed.
> >
> > -- Paul
> >
> > --
> > Paul Barrett, PhD Johns Hopkins University
> > Assoc. Research Scientist Dept of Physics and Astronomy
> > Phone: 410-516-5190 Baltimore, MD 21218
> >
>
>
>
> --
> Paul Barrett, PhD Johns Hopkins University
> Assoc. Research Scientist Dept of Physics and Astronomy
> Phone: 410-516-5190 Baltimore, MD 21218
>
>
--
Paul Barrett, PhD Johns Hopkins University
Assoc. Research Scientist Dept of Physics and Astronomy
Phone: 410-516-5190 Baltimore, MD 21218
From: Randewijk P-J <pjr...@su...> - 2005年12月12日 07:49:55
Dear Paul,
=20
"...
setp(ltext, fontsize=3D'large')
..."
gives me the following error:
=20
"...
Traceback (most recent call last):
...
NameError: name 'ltext' is not defined
..."
=20
If setp(...) is similar to matlab(tm)'s set(...)
=20
then the syntax should be:
=20
lh=3Dlegend(....)
=20
setp(lh,fontsize=3D8)
=20
the following error then occurs:
=20
"...
Traceback (most recent call last):
...
AttributeError: Legend instance has no attribute 'set_fontsize'
..."
=20
If there was an attribute 'fontsize', then:
=20
"...
legend(('...'),loc=3D'...',fontsize=3D10)
..."
=20
Regards,
=20
Peter-Jan
=20
PS: The help on 'setp' refers the whole time to 'set' and not 'setp' in
the help text, a.k.a. matlab(tm)'s 'set'
=20
>>> help(setp)
Help on function setp in module matplotlib.pylab:
=20
setp(*args, **kwargs)
 matlab(TM) and pylab allow you to use set and get to set and get
 object properties, as well as to do introspection on the object
 For example, to set the linestyle of a line to be dashed, you can do
 =20
 >>> line, =3D plot([1,2,3])
 >>> set(line, linestyle=3D'--')
... =20
=20
pylab doesn't have imho a 'set' function:
=20
>>> setp
<function setp at 0x01A327F0>
>>> set
Traceback (most recent call last):
 File "<interactive input>", line 1, in ?
NameError: name 'set' is not defined
=20
=20
-----Original Message-----
From: Paul Barrett [mailto:peb...@gm...]=20
Sent: 10 December 2005 22:02
To: Randewijk P-J <pjr...@su...>
Subject: Re: [Matplotlib-users] Help/RFC with 'legend' command
Dear P-J,
My mistake. This may not be a bug, but a feature. The legend text size
can be adjusted by using:
setp(ltext, fontsize=3D'large')
I still think that the user should be able to adjust the default font
size and have the legend font size change proportionally.
 -- Paul
On 12/10/05, Paul Barrett < <mailto:peb...@gm...>
peb...@gm...> wrote:=20
On 12/9/05, Randewijk P-J < <mailto:pjr...@su...>
pjr...@su...> < <mailto:pjr...@su...> pjr...@su...>
wrote:=20
Dear Paul,
> It should depend on font.size in the rc file.
That's what I thought.=20
I changed the font.size to 5.
Only my figtext's fontsize changed. The legend's fontsize remained at
(what appears to be) 12...
I'm still running 0.84, can that be the problem ?
No. This is a bug in the legend code. The code initializes the text
size when the object is created, but does not update it at any later
time. This should be fixed.=20
 -- Paul
--=20
Paul Barrett, PhD Johns Hopkins University
Assoc. Research Scientist Dept of Physics and Astronomy
Phone: 410-516-5190 Baltimore, MD 21218=20
--=20
Paul Barrett, PhD Johns Hopkins University
Assoc. Research Scientist Dept of Physics and Astronomy
Phone: 410-516-5190 Baltimore, MD 21218=20
From: Jiri P. <po...@ph...> - 2005年12月11日 10:58:10
On Sun, Dec 11, 2005 at 12:04:47AM -0500, Ryan Krauss wrote:
> Updating to gs 8.16 fixed similar problems for me.
> 
Yes. It fixed my problem too.
--
JP
From: Ryan K. <rya...@gm...> - 2005年12月11日 05:04:52
Updating to gs 8.16 fixed similar problems for me.
On 12/10/05, Darren Dale <dd...@co...> wrote:
> On Saturday 10 December 2005 10:25 am, Jiri Polcar wrote:
> > Hallo,
> >
> > when I use
> >
> > rc('text', usetex=3DTrue)
> >
> > and then
> >
> > savefig('main.eps')
> >
> > file 'main.eps' is very strange. BBox is bigger than plot and when I us=
e
> > 'ps2epsi' it's failed. Wihtout
> >
> > rc('text', usetex=3DTrue)
> >
> > line works 'main.eps' normaly. What I must to do to get "correct" EPS
> > file with TeX processing?
>
> try updating to gnu-ghostscript-8.16
>
>
> -------------------------------------------------------
> 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://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
>

Showing results of 203

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