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




Showing 8 results of 8

From: John H. <jdh...@ac...> - 2005年05月12日 19:20:45
>>>>> "Ryan" == Ryan Krauss <rya...@co...> writes:
 Ryan> I am having a slight problem with my install on FC3 Linux
 Ryan> running KDE. When I am developing scripts, I like to
 Ryan> generate a lot of plots along the way and want them to
 Ryan> refresh every time I run the script. When I run the
 Ryan> following code with the TkAgg backend it works o.k., but
 Ryan> with the GTKAgg backend, only the second plot updates:
See examples/dynamic_image_gtkagg.py for an example of how to use gtk
to make dynamic plots. You can also do this by manipulating the
interactive setting as discussed on 
http://matplotlib.sourceforge.net/interactive.html
You may also want to read this FAQ -
http://matplotlib.sourceforge.net/faq.html#SHOW
Hope this helps...
JDH
From: Ryan K. <rya...@co...> - 2005年05月12日 19:12:00
I just installed matplotlib and I am really excited about it. I have 
often thought it would be great to have all of the Matlab plotting 
capabilities without having to pay for their software and now I have 
that and Python. What could be better?
I am having a slight problem with my install on FC3 Linux running KDE. 
When I am developing scripts, I like to generate a lot of plots along 
the way and want them to refresh every time I run the script. When I 
run the following code with the TkAgg backend it works o.k., but with 
the GTKAgg backend, only the second plot updates:
from pylab import *
#close('all')
figure(1)
cla()
plot(rand(20),rand(20),'go')
figure(2)
cla()
plot(rand(20),rand(20),'ro')
show()
and uncommenting the close('all') line works fine with TkAgg but sort of 
locks things up with GTKAgg.
I will just use TkAgg for now, but was wondering if I can fix this.
Thanks,
Ryan
From: Ted D. <ted...@jp...> - 2005年05月12日 15:33:59
Thanks for the tip - figlegend works just fine for my application. I'll 
file an enhancement for tracking purposes...
Ted
At 07:29 AM 5/12/2005, John Hunter wrote:
> >>>>> "Ted" == Ted Drain <ted...@jp...> writes:
>
> Ted> Has anyone tried to put a legend in a polar plot? I get an
> Ted> error whenever I try this. To reproduce the error, run the
> Ted> polar plot demo and then do something like:
>
> Ted> legend( ( "test" ) )
> Ted> 
> "/group/monte/development/rhe3/tools.0504/lib/python2.4/site-packages/matplotlib/axes.py",
> Ted> line 1869, in get_handles handles.extend(self.patches)
> Ted> AttributeError: PolarAxes instance has no attribute 'patches'
>
>
> Ted> Should I file this as a bug? Thanks, Ted Ted Drain Jet
>
>Maybe a feature request? The problem is deeper than simply adding the
>missing patches attr (which holds a list of patches stored by the
>axes). If you add that (as I just did), you can run legend w/ no
>traceback but no legend either. I think the problem is that the
>legend by default uses the axes coordinate system to place the
>rectangle in which the legend resides is being placed in axes
>coordinates, and the axes coordinate system for polar axes is not the
>same as for rectangular axes and this is fouling up the legend
>placement.
>
>There is a workaround using figlegend
>
> >>> lines = polar(range(10))
> >>> figlegend(lines, ('my label',), 'upper right')
>
>I think it would be nice for polar axes legend to work automagically,
>so you might want to add this as a feature request on the sf site. I
>already fixed the patch/traceback crash, but now it just fails
>silently (no legend, no error). I think I'll add an PolarAxes legend
>NotImplementedError which raises an exceptions and suggests figlegend
>for the time being.
>
>I'm sure there are other surprises one will find when trying to use
>some of the Axes parent methods (eg table) in the PolarAxes. It
>would be nice if these were also indicated with NotImplementedError
>until they are. We can fill these in as we find them.
>
>JDH
From: John H. <jdh...@ac...> - 2005年05月12日 14:29:55
>>>>> "Ted" == Ted Drain <ted...@jp...> writes:
 Ted> Has anyone tried to put a legend in a polar plot? I get an
 Ted> error whenever I try this. To reproduce the error, run the
 Ted> polar plot demo and then do something like:
 Ted> legend( ( "test" ) )
 Ted> "/group/monte/development/rhe3/tools.0504/lib/python2.4/site-packages/matplotlib/axes.py",
 Ted> line 1869, in get_handles handles.extend(self.patches)
 Ted> AttributeError: PolarAxes instance has no attribute 'patches'
 Ted> Should I file this as a bug? Thanks, Ted Ted Drain Jet
Maybe a feature request? The problem is deeper than simply adding the
missing patches attr (which holds a list of patches stored by the
axes). If you add that (as I just did), you can run legend w/ no
traceback but no legend either. I think the problem is that the
legend by default uses the axes coordinate system to place the
rectangle in which the legend resides is being placed in axes
coordinates, and the axes coordinate system for polar axes is not the
same as for rectangular axes and this is fouling up the legend
placement.
There is a workaround using figlegend
 >>> lines = polar(range(10))
 >>> figlegend(lines, ('my label',), 'upper right')
I think it would be nice for polar axes legend to work automagically,
so you might want to add this as a feature request on the sf site. I
already fixed the patch/traceback crash, but now it just fails
silently (no legend, no error). I think I'll add an PolarAxes legend
NotImplementedError which raises an exceptions and suggests figlegend
for the time being.
I'm sure there are other surprises one will find when trying to use
some of the Axes parent methods (eg table) in the PolarAxes. It
would be nice if these were also indicated with NotImplementedError
until they are. We can fill these in as we find them.
JDH
From: Cory D. <cd...@st...> - 2005年05月12日 07:41:46
Hi John,
here is the plotyy help info.
Cory.
 >> help plotyy
 PLOTYY Graphs with y tick labels on the left and right.
 PLOTYY(X1,Y1,X2,Y2) plots Y1 versus X1 with y-axis labeling
 on the left and plots Y2 versus X2 with y-axis labeling on
 the right.
 PLOTYY(X1,Y1,X2,Y2,FUN) uses the plotting function FUN
 instead of PLOT to produce each plot. FUN should be a
 function handle to a plotting function, e.g. @plot, @semilogx,
 @semilogy, @loglog ,@stem, etc. that accepts the syntax H = FUN(X,Y).
 PLOTYY(X1,Y1,X2,Y2,FUN1,FUN2) uses FUN1(X1,Y1) to plot the data for
 the left axes and FUN2(X1,Y1) to plot the data for the right axes.
 [AX,H1,H2] = PLOTYY(...) returns the handles of the two axes created in
 AX and the handles of the graphics objects from each plot in H1
 and H2. AX(1) is the left axes and AX(2) is the right axes.
 See also PLOT, @.
 >>
John Hunter wrote:
>>>>>>"Cory" == Cory Davis <cd...@st...> writes:
> 
> 
> Cory> Hi all, I have now figured out how to do this. It goes
> Cory> something like...
> 
> That's the basic idea -- matplotlib has some helper functions to make
> this easier -- see examples/shared_axis_demo.py
> 
> What is the signature of plotyy -- I wasn't aware of this function..
> 
> JDH
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
---------------------------------------------------
Cory Davis
Institute for Atmospheric and Environmental Science
Room 307, Crew Building, Kings Buildings,
University of Edinburgh. Edinburgh EH9 3JN
phone: +44 131 6505092
www: http://www.geos.ed.ac.uk/contacts/homes/cdavis
From: Ted D. <ted...@jp...> - 2005年05月12日 02:23:20
What's the best way to control the radial scale in a polar plot? For 
example, if I have data like this:
theta = [ 1, 2, 3, 4, 5 ]
rad = [ 10, 20, 30, 40, 50 ]
polar( theta, rad )
How do I make the radial scale go from 0 to 80? I tried messing with the 
ylim doing something like this:
gca().set_ylim( ( 80*sqrt(2), 80*sqrt(2) ) )
All that seems to do is to scale the whole plot without changing the axis 
bounds. If I try to set the grid like this:
grids = [ 0, 20, 40, 60, 80 ]
lbls = [ "0", "20", "40", "60", "80" ]
gca().set_rgrids( grid, lbls, frac=1.05 )
The grid lines draw correctly but the background of the plot doesn't change 
to fit the new grid lines.
Thanks,
Ted
Ted Drain Jet Propulsion Laboratory ted...@jp... 
From: Ted D. <ted...@jp...> - 2005年05月12日 02:16:09
Has anyone tried to put a legend in a polar plot? I get an error whenever 
I try this. To reproduce the error, run the polar plot demo and then do 
something like:
legend( ( "test" ) )
 File 
"/group/monte/development/rhe3/tools.0504/lib/python2.4/site-packages/matplotlib/pylab.py", 
line 2173, in legend
 ret = gca().legend(*args, **kwargs)
 File 
"/group/monte/development/rhe3/tools.0504/lib/python2.4/site-packages/matplotlib/axes.py", 
line 1881, in legend
 handles = [h for h, label in zip(get_handles(), labels)]
 File 
"/group/monte/development/rhe3/tools.0504/lib/python2.4/site-packages/matplotlib/axes.py", 
line 1869, in get_handles
 handles.extend(self.patches)
AttributeError: PolarAxes instance has no attribute 'patches'
Should I file this as a bug?
Thanks,
Ted
Ted Drain Jet Propulsion Laboratory ted...@jp... 
From: John H. <jdh...@ac...> - 2005年05月12日 01:09:35
>>>>> "Cory" == Cory Davis <cd...@st...> writes:
 Cory> Hi all, I have now figured out how to do this. It goes
 Cory> something like...
That's the basic idea -- matplotlib has some helper functions to make
this easier -- see examples/shared_axis_demo.py
What is the signature of plotyy -- I wasn't aware of this function..
JDH

Showing 8 results of 8

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