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





Showing results of 489

<< < 1 .. 6 7 8 9 10 .. 20 > >> (Page 8 of 20)
From: Jae-Joon L. <lee...@gm...> - 2009年08月18日 22:18:31
See below for available public methods.
http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.Collection
-JJ
On Tue, Aug 18, 2009 at 6:16 PM, Jae-Joon Lee<lee...@gm...> wrote:
> sct1 = axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap))
> colors = sct1.get_facecolors()
>
> The return value is an array of rgb values.
>
> -JJ
>
>
> On Mon, Aug 17, 2009 at 3:40 PM, Carlos
> Grohmann<car...@gm...> wrote:
>> Hi, I have a collection, which is a scatter plot, and I want to
>> iterate through all the elements in this collection and retrieve their
>> properties, like facecolor.
>>
>> the scatterplot is created like this:
>>
>> axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap))
>>
>> many thanks
>>
>> --
>> Carlos Henrique Grohmann - Geologist D.Sc.
>> a.k.a. Guano - Linux User #89721
>> ResearcherID: A-9030-2008
>>
>> http://digitalelevation.blogspot.com
>>
>> http://www.igc.usp.br/pessoais/guano
>> _________________
>> Can’t stop the signal.
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
From: Jae-Joon L. <lee...@gm...> - 2009年08月18日 22:16:33
sct1 = axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap))
colors = sct1.get_facecolors()
The return value is an array of rgb values.
-JJ
On Mon, Aug 17, 2009 at 3:40 PM, Carlos
Grohmann<car...@gm...> wrote:
> Hi, I have a collection, which is a scatter plot, and I want to
> iterate through all the elements in this collection and retrieve their
> properties, like facecolor.
>
> the scatterplot is created like this:
>
> axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap))
>
> many thanks
>
> --
> Carlos Henrique Grohmann - Geologist D.Sc.
> a.k.a. Guano - Linux User #89721
> ResearcherID: A-9030-2008
>
> http://digitalelevation.blogspot.com
>
> http://www.igc.usp.br/pessoais/guano
> _________________
> Can’t stop the signal.
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Eric F. <ef...@ha...> - 2009年08月18日 22:10:54
Werner F. Bruhin wrote:
> Werner F. Bruhin wrote:
> ...
>> Ideally I would like to have these labels printed at an angle.
> Put my glasses on and found the rotation property in the documentation, 
> only issue left is centering the labels below the bars.
Are you using the align='center' kwarg to bar()?
Eric
From: Jae-Joon L. <lee...@gm...> - 2009年08月18日 22:07:11
You need to adjust the positions of the ticks.
bar command (by default) creates boxes so that their left side
corresponds the first argument.
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.bar
so, in your case, something like below will work (0.4 from 0.8/2 where
0.8 is the default width of the bar).
axes.set_xticks([x+0.4 for x in indx])
Alternatively, bars can be center-aligned.
See the docs for more,
Also, take a look at the example below (there are bunch of other
examples in the gallery)
http://matplotlib.sourceforge.net/examples/pylab_examples/bar_stacked.html
-JJ
On Tue, Aug 18, 2009 at 1:29 PM, Werner F. Bruhin<wer...@fr...> wrote:
> My lables for the different bars are not centered below the bar but are all
> to the left side of the bars (lower left corner).
>
>
>
> This is what I am basically doing:
>
>     axes = panel.figure.add_subplot(2, 2, 3)
> ...
>     axes.bar(indx, values, color=colors)
>     axes.set_xticklabels(labels)
>
> I can not find how to provide the lables to the "bar" call or how else to
> make sure that "Rot" is centered under the first bar, "Weiß" under the
> second bar and so on.
>
> Ideally I would like to have these labels printed at an angle.
>
> Appreciate any hints
> Werner
>
> P.S.
> mpl version: '0.99.0'
> Python 2.5.2 on Vista
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: questions a. <que...@gm...> - 2009年08月18日 21:57:52
Can anyone explain how I could:
-Open two shapefiles
-Open a raster
-Plot a histogram of the values within each shapefile on the same plot and
display the mean and Standard Deviation of each plot.
Thanks
From: Jae-Joon L. <lee...@gm...> - 2009年08月18日 21:55:08
On Tue, Aug 18, 2009 at 1:33 PM, dek<dr...@ho...> wrote:
>
> the patch3dcollection object not good for legend figure, I am having trouble
> thinking of a work
> around. Is there manually a way to insert artist and labels into the legend
> and make it such that it is independent from the axes? Using a proxy artist
> requires it not be part of the axes correct?
It actually does not matter. But in most cases, you do not want to see
the proxy artists (except in the legend), and easiest solution is just
not to add them to any axes. See the link below.
http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist
Regards,
-JJ
> --
> View this message in context: http://www.nabble.com/figure-legend-with-mplot3d-tp25029801p25029801.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Pete S. <pet...@gm...> - 2009年08月18日 21:53:34
Hello,
I have a list of X,Y coordinates and a ratio associated with each
coordinate. The X and Y coordinates are continuous but random from 50-500, I
would like to make a continuous heatmap of the ratios at each coordinate.
One caveat is that the coordinates are clustered together do some bixes
might have too little data. I am wondering if there is a way that R can
automatically adjust box sizes? Sample data set is below
TIA
X Y RATIO
50 56 .1
50 59 .1
52 54 .2
500 393 .9
450 36 .7
250 190 .7
From: Jae-Joon L. <lee...@gm...> - 2009年08月18日 21:49:47
I guess you're using 0.99?
Use spines instead.
for example,
gca().spines["bottom"].set_linewidth(2) # it only changes the
linewidth of the bottom spine.
also, see this example,
http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html#pylab-examples-spine-placement-demo
Regards,
-JJ
On Tue, Aug 18, 2009 at 5:18 PM, Christopher Brown<c-...@as...> wrote:
> I have asked this question before. How do I set the linewidth of the
> axis frame? Long ago, I used gca().get_frame().set_linewidth(2). More
> recently, I used gca().frame.set_linewidth(2), but this doesn't seem to
> work anymore. I've tried gca().patch, to no avail. Any suggestions?
>
> Thanks.
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jae-Joon L. <lee...@gm...> - 2009年08月18日 21:42:31
On Tue, Aug 18, 2009 at 1:53 PM, Alan G Isaac<ala...@gm...> wrote:
> 2. This is pretty fast. Would there be additional
> speed gains to blitting, and if so, how would it
> be done? (I'm just asking for clues, not a complete
> example.)
Blitting will improve the performance when significant portion of your
plot is (semi-)stationary. And I guess your example, as it is, may not
benefit from blitting.
A. init
 1. draw stationary artists (animated=False) on the canvas
 2. save the area of canvas as a pixmap array.
B. looping for animation
 1. restore the stationary artists by blitting the saved pixmap array
 2. draw animated artists.
 3. optionally update the saved pixmap.
And your speed gain comes from B.1
Regards,
-JJ
From: Christopher B. <c-...@as...> - 2009年08月18日 21:19:08
I have asked this question before. How do I set the linewidth of the 
axis frame? Long ago, I used gca().get_frame().set_linewidth(2). More 
recently, I used gca().frame.set_linewidth(2), but this doesn't seem to 
work anymore. I've tried gca().patch, to no avail. Any suggestions?
Thanks.
From: John H. <jd...@gm...> - 2009年08月18日 21:13:57
On Tue, Aug 18, 2009 at 12:53 PM, Alan G Isaac<ala...@gm...> wrote:
> OK, I mostly understand John's example and have
> adapted it in the attached Histogram class, for
> whoever might care. (The file is a working
> example.) Thanks!
>
> Here are my remaining questions.
>
> 1. To get a new histogram, I just change the
> data in the vertices object and then ask my
> FigureCanvasTkAgg to ``show`` itself. How
> does this work? (I suppose that this FigureCanvas
> has my figure, the figure references my axes, my axes
> references my PathPatch, and my PathPatch references
> the rectverts, and each looks to the next when I call
> show?)
if you have already created the tk gui window and shown it, just call
 fig.canvas.draw()
on each update of the vertices
> 2. This is pretty fast. Would there be additional
> speed gains to blitting, and if so, how would it
> be done? (I'm just asking for clues, not a complete
> example.) I expected to be able to set the animated
> property on the patch when I called ax.add_patch,
> but that does not work; am I supposed to just set
> it directly? (I had supposed that the axes were
> being informed e.g. when setting animated=True
> for an ax.plot, but now I'm guessing that supposition
> is wrong the `plot` just provides this as a convenience.)
The animated property has to be on the patch itself, so when you
create the path patch, you would do
 patch = patches.PatchPath(path, animated=True)
 ax.add_patch(patch)
JDH
From: Alan G I. <ala...@gm...> - 2009年08月18日 18:45:12
Attachments: histogram_tkagg.py
Ooops, forgot the attachment.
Alan
From: Alan G I. <ala...@gm...> - 2009年08月18日 17:53:58
OK, I mostly understand John's example and have
adapted it in the attached Histogram class, for
whoever might care. (The file is a working
example.) Thanks!
Here are my remaining questions.
1. To get a new histogram, I just change the
data in the vertices object and then ask my
FigureCanvasTkAgg to ``show`` itself. How
does this work? (I suppose that this FigureCanvas
has my figure, the figure references my axes, my axes
references my PathPatch, and my PathPatch references
the rectverts, and each looks to the next when I call
show?)
2. This is pretty fast. Would there be additional
speed gains to blitting, and if so, how would it
be done? (I'm just asking for clues, not a complete
example.) I expected to be able to set the animated
property on the patch when I called ax.add_patch,
but that does not work; am I supposed to just set
it directly? (I had supposed that the axes were
being informed e.g. when setting animated=True
for an ax.plot, but now I'm guessing that supposition
is wrong the `plot` just provides this as a convenience.)
If I have unveiled some radical misconceptions,
sorry, I don't have experience with GUI stuff.
Thanks,
Alan Isaac
From: Werner F. B. <wer...@fr...> - 2009年08月18日 17:46:15
Werner F. Bruhin wrote:
...
> Ideally I would like to have these labels printed at an angle.
Put my glasses on and found the rotation property in the documentation, 
only issue left is centering the labels below the bars.
Werner
From: dek <dr...@ho...> - 2009年08月18日 17:33:49
the patch3dcollection object not good for legend figure, I am having trouble
thinking of a work
around. Is there manually a way to insert artist and labels into the legend
and make it such that it is independent from the axes? Using a proxy artist
requires it not be part of the axes correct?
-- 
View this message in context: http://www.nabble.com/figure-legend-with-mplot3d-tp25029801p25029801.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Werner F. B. <wer...@fr...> - 2009年08月18日 17:29:51
My lables for the different bars are not centered below the bar but are 
all to the left side of the bars (lower left corner).
This is what I am basically doing:
 axes = panel.figure.add_subplot(2, 2, 3)
...
 axes.bar(indx, values, color=colors)
 axes.set_xticklabels(labels)
I can not find how to provide the lables to the "bar" call or how else 
to make sure that "Rot" is centered under the first bar, "Weiß" under 
the second bar and so on.
Ideally I would like to have these labels printed at an angle.
Appreciate any hints
Werner
P.S.
mpl version: '0.99.0'
Python 2.5.2 on Vista
From: scripper <Scr...@gm...> - 2009年08月18日 17:17:11
Hi everybody,
i am a newbie on Matplotlib and wanna know whether there is already tick
setting on x,y,z axes in 3D plot. By now i just know on 2-dimension which
listed on the gallery.
Thanks very much!
-- 
View this message in context: http://www.nabble.com/plot3d-ticker-setting-tp25029488p25029488.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: othererik <oth...@gm...> - 2009年08月18日 14:36:50
tfoutz99,
I occasionally run into this issue as well. At quick glance I suspect it
may be related to the limitation listed at:
http://www.scipy.org/scipy/scikits/ticket/61
...but I could be way off base as I'm not sure if the code is derived from
the same place. 
-Erik
tfoutz99 wrote:
> 
> Hi! I am basing my code off the example posted at:
> http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
> Gridding irregularly spaced data 
> 
> When I use my own data, I am getting a KeyError (Posted below)
> 
> However, if I only use a subset of my data (for which the total
> length=26328), I can get rid of the error:
> 
> # This subset works
> # I incremented the final index until I got the error
> # Length: 19877
> x=np.array(R[0:19876])
> y=np.array(Z[0:19876])
> z=np.array(volt[0:19876])
> 
> # And this subset works
> # I incremented the starting index until I got the error
> # Length: 19040
> x=np.array(R[7288:-1])
> y=np.array(Z[7288:-1])
> z=np.array(volt[7288:-1])
> 
> The weird thing is that these two lengths are different. There doesn't
> seem to be anything particularly strange about the values near 19876 or
> 7288. Any ideas?
> -Tom
> 
> ##############Error Message #######################
> 
> ---> 81 zi = griddata(x,y,z,xi,yi)
> 82 # contour the gridded data, plotting dots at the randomly spaced
> data points.
> 83 CS = plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k')
> 
> /Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg/matplotlib/mlab.pyc
> in griddata(x, y, z, xi, yi)
> 2940 xi,yi = np.meshgrid(xi,yi)
> 2941 # triangulate data
> -> 2942 tri = delaunay.Triangulation(x,y)
> 2943 # interpolate data
> 2944 interp = tri.nn_interpolator(z)
> 
> /Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg/matplotlib/delaunay/triangulate.pyc
> in __init__(self, x, y)
> 86 self.triangle_neighbors = delaunay(self.x, self.y)
> 87 
> ---> 88 self.hull = self._compute_convex_hull()
> 89 
> 90 def _collapse_duplicate_points(self):
> 
> /Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg/matplotlib/delaunay/triangulate.pyc
> in _compute_convex_hull(self)
> 121 hull = list(edges.popitem())
> 122 while edges:
> --> 123 hull.append(edges.pop(hull[-1]))
> 124 
> 125 # hull[-1] == hull[0], so remove hull[-1]
> 
> KeyError: 2559
> 
> 
> 
-- 
View this message in context: http://www.nabble.com/griddata-array-size-limit--tp24827814p25026351.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Florian L. <fle...@cn...> - 2009年08月18日 09:47:41
Hi Walid, I'm new to mpl, too, but I just installed it on OSX and 
first had that problem, too. I solved it because I did not have libpng/ 
libjpeg installed, for which a pkg installer for OSX is available here:
http://ethan.tira-thompson.org/Mac_OS_X_Ports.html
Hope this solves your problem, too!
Regards,
Florian
On 18 Aug 2009, at 02:11, Walid Majid wrote:
> Hi,
>
> I am new to matplotlib and having trouble running a simple example, 
> which I found on one of the tutorial pages:
>
> import matplotlib.pyplot as plt
> plt.plot([1,2,3])
> plt.ylabel('some numbers')
> plt.show()
>
> The problem I encounter is that no plot actually shows up when I run 
> the above sequence on my idle session.
> I am running on Mac OS X 10.5.6 and if anyone can give me some help, 
> I would appreciate it.
>
> Python: 2.5.4
> idle: 1.2.4
> matplotlib: 0.98.5.3
>
> WM
>
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 
> 30-Day
> trial. Simplify your report design, integration and deployment - and 
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
**NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido.
**CONFIDENTIALITY NOTICE** This email communication and any attachments may contain confidential and privileged information for the sole use of the designated recipient named above. Distribution, reproduction or any other use of this transmission by any party other than the intended recipient is prohibited. If you are not the intended recipient please contact the sender and delete all copies.
From: M. H. <mhe...@in...> - 2009年08月18日 08:55:14
Hello,
I'm totally new to matplotlib, so sorry if the question is stupid.
I'm trying this slightly modified example from the examples page
from pylab import *
A = rand(5,5)
figure(1)
imshow(A, interpolation='bicubic')
show()
close(1)
A = rand(5,5)
figure(2)
imshow(A, interpolation='bicubic')
show()
close(2)
The first figure is drawn without problems but after closing it (by clicking
the cross in the upper 
right corner of the window) the second figure cannot be plot anymore. What I
wanted to do was 
to visualize all selected files of a directory one after the other. To do
this I want to close the old 
figure and then the new figure should com up as long as there is a file to
visualize left. Unfortunaltely
only the first figure is shown as in the simple example.
So, what's wrong?
I'm using Windows XP and the newst version of matplotlib.
-- 
View this message in context: http://www.nabble.com/plot-multiple-times-in-one-script-fails-tp25020909p25020909.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Walid M. <wm...@ya...> - 2009年08月18日 00:11:21
Hi,
I am new to matplotlib and having trouble running a simple example, which I found on one of the tutorial pages:
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.ylabel('some numbers')
plt.show()
The problem I encounter is that no plot actually shows up when I run the above sequence on my idle session. 
I am running on Mac OS X 10.5.6 and if anyone can give me some help, I would appreciate it. 
Python: 2.5.4
idle: 1.2.4
matplotlib: 0.98.5.3
WM
 
From: Jae-Joon L. <lee...@gm...> - 2009年08月17日 23:40:46
Hello,
pywcsgrid2 is my personal project to display astronomical fits images
using matplotlib.
While there are other tools, my approach is to extend the capability
of the matplolib, rather than building something new on top of it.
pywcsgrid2 provides a custom Axes class (derived from the matplotlib's
original Axes) whose main functionality improvement is to draw ticks,
ticklabels, and grids in an appropriate sky coordinate.
Requirement
----------------
* Matplotlib 0.99 version (http://matplotlib.sourceforge.net/)
* kapteyn package (http://www.astro.rug.nl/software/kapteyn/) or pywcs
(https://www.stsci.edu/trac/ssb/astrolib, svn version is required)
* pyfits
And it is only supported in linux and mac os X (although pywcsgrid2
itself is written in pure python).
URLs
------
Home page : http://leejjoon.github.com/pywcsgrid2/
Overview doc. : http://leejjoon.github.com/pywcsgrid2/users/overview.html
Download : http://github.com/leejjoon/pywcsgrid2/downloads
github : http://github.com/leejjoon/pywcsgrid2
Unfortunately, the code is documented rather sparsely (with poor
english), but I hope the above overview gives enough idea on how to
start.
pywcsgrid2 is still in development, and there will be bug fixes and
improvements. While a downloadable tar file is available, installing
from the git repository is recommended if you're familiar with it.
For questions, bug reports or feature suggestions, please email me or
use the issue tracker in the github.
Regards,
-JJ
From: Carlos G. <car...@gm...> - 2009年08月17日 19:41:21
Hi, I have a collection, which is a scatter plot, and I want to
iterate through all the elements in this collection and retrieve their
properties, like facecolor.
the scatterplot is created like this:
axes.scatter(x,y, c=some_list, cmap=plt.get_cmap(colmap))
many thanks
-- 
Carlos Henrique Grohmann - Geologist D.Sc.
a.k.a. Guano - Linux User #89721
ResearcherID: A-9030-2008
http://digitalelevation.blogspot.com
http://www.igc.usp.br/pessoais/guano
_________________
Can’t stop the signal.
From: Eric F. <ef...@ha...> - 2009年08月17日 18:31:00
Florian Leitner wrote:
> Hi; I've got a rather simple question. I want to (color) fill a step 
> plot below the line, but using the fill() function always creates 
> regular plots, not step plots, and fillstyle doesn't work as I'd expect 
> it to. How can I fill a step plot? Something like this:
> 
> import matplotlib.pyplot as plt
> x = [0.0,0.5,0.66,0.75,1.0]
> y = [0.72,0.72,0.61,0.43,0.33]
> plt.step(x, y, fillstyle="bottom") # doesn't work how I imagine...
> plt.axis([0.0,1.0,0.0,1.0])
> plt.show()
> 
> What I want is that the area below the step-plot line is color-filled, 
> but I seem to be unable to find a function for it. If I use plt.fill(), 
> it creates a polygon plot and it does not allow to use the kwarg 
> drawstyle="steps", so I get no further with this function either.
> 
> I guess it's a simple problem, but I'm having a bit of a hard time 
> wading though all the API, being completely new to matplotlib, so some 
> help would be very welcome!
> --Florian
It looks to me like there is no easy way to do it. This is a deficiency 
in the way steps are implemented at present. The generation of the 
stepped path is buried in a Line2D helper method, and the path is not 
saved. If it were, its x and y coordinates could be passed to 
fill_between, which would then provide the effect you want.
Unless and until some refactoring is done in mpl, you will have to 
manually generate the x and y coordinates corresponding to your stepped 
line instead of using plt.step.
It may be too much of a change to make to the API now, but I think that 
the step-generation should not be done in Line2D at all; it should be at 
the next level up. The Line2D object should not be modifying the 
coordinates it is given. At the very least, its get_path() should 
return the actual path it is drawing; at present it does not. This 
latter change may be relatively easy.
Eric
> 
> 
> 
> **NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los 
> ficheros adjuntos, pueden contener información protegida para el uso 
> exclusivo de su destinatario. Se prohíbe la distribución, reproducción o 
> cualquier otro tipo de transmisión por parte de otra persona que no sea 
> el destinatario. Si usted recibe por error este correo, se ruega 
> comunicarlo al remitente y borrar el mensaje recibido.
> **CONFIDENTIALITY NOTICE** This email communication and any attachments 
> may contain confidential and privileged information for the sole use of 
> the designated recipient named above. Distribution, reproduction or any 
> other use of this transmission by any party other than the intended 
> recipient is prohibited. If you are not the intended recipient please 
> contact the sender and delete all copies.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Jae-Joon L. <lee...@gm...> - 2009年08月17日 17:46:06
Attachments: gridspec.patch
I took a stab at this during the weekends and a patch is attached.
1) introduces a new command subplot2grid. e.g.,
subplot2grid(shape=(3,3), loc=(0,0), colspan=3)
it still creates a Subplot instance.
2) subplot command can take a SubplotSpec instance which is created
using the GridSpec.
gs = GridSpec(3,3) # shape=3,3
subplot(gs.new_subplotspec(loc=(0,0), colspan=3))
or
subplot(gs[0,:])
or
subplot(gs[0:3]) # supermongo-like
For suplot with a single cell,
subplot(gs[0]) # => subplot(331)
or
subplot(gs[0,0])
3) Each GridSpec can have associated subplot parameters (subplot
params of the figure is used if not set).
Also see the example (demo_gridspec.py).
We may further try to improve it (during the sprint maybe) if others
are happy with the patch.
Regards,
-JJ
On Sun, Aug 2, 2009 at 1:00 AM, John Hunter<jd...@gm...> wrote:
> On Sat, Aug 1, 2009 at 7:32 PM, Alan G Isaac<ala...@gm...> wrote:
>> On 8/1/2009 4:07 PM Thomas Robitaille apparently wrote:
>>> Since matplotlib is about to hit 0.99,
>>
>>
>> Which reminds me, was there a decision on subplot2grid etc?
>> <URL:http://sourceforge.net/mailarchive/message.php?msg_name=6e8d907b0905172009j21b5077fp242c7598ee9fb2c9%40mail.gmail.com>
>
> There are lots of good suggestions in that thread -- on this issue,
> all the best people will be at scipy and/or participating in the
> sprint (Andrew who wrote the mpl sizer toolkit, JJ who does more
> strange and wonderful things than anyone, Ryan May who has thought
> through the issues and has done a lot of great work). So we'll
> definitely bring it up and see if we can do something about it. There
> are two pieces to this thread: the non-pythonic 1 based addressing of
> the current subplot command ("don't blame me, talk to the mathworks"),
> and the ability to easily specify column or row spans across the grid.
> The former is a minor wart that is unlikely to change, the latter is
> a significant feature that we should definitely support. Maybe you can
> join us via skype if not in person in Pasadena, and we can try an
> improve the current implementation. I don't imagine adding support
> for spans would be too hard,
>
> JDH
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
8 messages has been excluded from this view by a project administrator.

Showing results of 489

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