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

Showing 11 results of 11

From: Brian T.N. G. <gu...@ll...> - 2007年06月26日 23:15:48
I have a matplotlib script that generates several figures.
When a figure receives an event, how do I know which figure
it did it? For example, the key event 'w' is meant to close
the figure, but so far, I have no way to control which figure
gets closed.
In the pick_event_demo.py example, each figure is connected
to an event handler specific to it. I think this wouldn't
work in my case because I don't know how many figures I'd
have until I process some data. In any case, all my event
handlers can be independent of the figure generating the
event. They just need to know which figure to refer to.
My work-around right now is to save the canvas attributes
from all the figure handle. I compare this canvas to the
canvas attribute of the event. When I found a match, I know
I have the right figure. This seems kludgey, especially
after most of the figures have been closed.
I'd appreciate any help or pointers.
Brian
From: Matthias M. <Mat...@gm...> - 2007年06月26日 18:31:37
Attachments: RS_activate_2.patch
Hello John,
thank you for your reply.
I'm not sure I really understood the widgetlock, but I think the following 
lines seem to do what I want - (Am I right?):
+ # If canvas was locked
+ if not self.canvas.widgetlock.available(self):
+ return True
I attached once more my patch including these new lines.
best regards,
Matthias
On Tuesday 26 June 2007 16:35, John Hunter wrote:
> On 6/26/07, Matthias Michler <Mat...@gm...> wrote:
> > Hello everybody,
> >
> > first of all: Sorry for posting to my own thread.
> > But I really like this new feature and may be the last message got lost
> > among the lots of mpl-mails. So I ask you once more for comments on this
> > issue (please).
> >
> > Is this new feature a bug to some of the RectangleSelector-users or a
> > real feature?
> > Could it be part of mpl?
>
> Thanks for reminding us on this one. Making these widgets work well
> together can be a pain. I wrote some locking functionality to help
> coordinate them, is any of this functionality useful to you?
>
> The patch looks mostly correct, but the code trying to get the toolbar
> state is problematic
>
> + # If zoom mode was activated
> + if not (Gcf.get_active().toolbar.mode == ''):
> + return True
> +
>
> Gcf is a pylab construct, and code in widgets must not be dependent on
> pylab. Also, using the mode string here looks a bit hackish since it
> is designed to communicate to the user rather than represent state.
> See if you can use the lock functionality to achieve the same purpose
> -- eg look at how widgetlock is used in the toolbar in backend_bases.
> If this is not viable, let me know why and we'll figure a better way
> for these widgets to communicate.
>
> JDH
From: Andrew S. <str...@as...> - 2007年06月26日 18:12:18
Can you convert your radial coordinates to Cartesian coordinates and use 
approach #2 here: 
http://scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
Lorenzo Isella wrote:
> Hello,
> Sorry for this tread getting quite long, but I am not getting there yet.
> Online I found examples like:
> 
> 
From: Matthias M. <Mat...@gm...> - 2007年06月26日 17:46:54
Attachments: InputButton_mpl.py
Hello John,
Hello all,
I thought once more about the textbox and added some of your (Johns) features 
to my class 'InputButton'. Probably my solution isn't the best possible, but 
I attached this version to express what I'm thinking of and to see what 
others think about my solution and needed skills of the textbox .
Could this be helpful / useful for others?
best regards,
Matthias
On Wednesday 06 June 2007 17:25, John Hunter wrote:
> On 6/6/07, Matthias Michler <Mat...@gm...> wrote:
> > By the way: What do you think about the "insert a 'l' or 'g' into your
> > TextBox and get a grid or log-scale"-issue? Is there a possibility to
> > switch the mpl-meaning of 'l', 'g' and 'f' off?
>
> Yes, this is clearly an issue that has to be dealt with in a cleanup.
> The current implementation has no concept of whether the text box is
> the active widget. We would need to do something like activate the
> text box when you click on it (and figure out the right cursor
> location based on the click if there is already text in there) and
> deactivate it on a carriage return or click in another axes. The
> current implementation was only a proof of concept.
>
> JDH
From: Lorenzo I. <lor...@gm...> - 2007年06月26日 15:42:36
Hello,
Sorry for this tread getting quite long, but I am not getting there yet.
Online I found examples like:
#! /usr/bin/env python
from pylab import *
x=arange(-2,2,0.1)
y=arange(-2,2,0.05)
X,Y=meshgrid(x,y)
z=exp(-(X*X + Y*Y)) + 0.6*exp(-((X+1.8)**2 + Y**2))
#contour(x,y,z,arange(0,1,0.1))
imshow(z,interpolation='nearest')
show()
and both the imshow() and contour() commands do nicely their job, but
the scalar z is defined on a trivial rectangular domain and
represented as a 2D array.
In my problem I have:
1) a set of couples (theta,r) specifying a list of positions on a tube
cross-section.
2) for each (theta,r) couple, I have a single value of T (which is
thus a long 1D array).
In general, (theta,r) may be two coordinates given on a non-trivial
domain and I have a scalar specified for each couple I thus form.
Both contour and imshow complain because they expect a 2D array.
I am sorry if I am struggling over some triviality, but I am not
making much progress by myself.
Many thanks
Lorenzo
On 26/06/07, Brian <fo...@gm...> wrote:
> It sounds to me that you want to have a contour plot which takes as input
> the r,theta, and T. I would suggest just
>
>
> On 6/26/07, Lorenzo Isella < lor...@gm...> wrote:
> >
> > Hello,
> > Thanks for your suggestion, but I still have a problem.
> > Maybe I did not make myself clear (or most likely I have a problem
> > about how to implement your suggestion): actually I have T=T(r,theta)
> > and I would like to make a 2D plot using colors such that one can see
> > that the domain where I am plotting is actually a circle.
> > The example I mentioned is not exactly what I need since there one can
> > find how to plot in polar coordinates a function of r alone.
> > Furthermore, I do not have necessarily an equally spaced grid.
> > For instance, let me consider the case of 5 theta's and 7 radial
> > position and consequentely 35 values of T:
> >
> > theta R
> > T
> > 0.000000000000000000e+00 0.000000000000000000e+00 5.459815003314423620e+01
> > 0.000000000000000000e+00 1.666666666666666574e-01 4.853828855239110851e+01
> > 0.000000000000000000e+00 3.333333333333333148e-01 4.315101251901344881e+01
> > 0.000000000000000000e+00 5.000000000000000000e-01 3.836167151642037965e+01
> > 0.000000000000000000e+00 6.666666666666666297e-01 3.410390059527122020e+01
> > 0.000000000000000000e+00 8.333333333333332593e-01 3.031870066752165016e+01
> > 0.000000000000000000e+00 1.000000000000000000e+00 2.695362096775039973e+01
> > 1.570796326794896558e+00 0.000000000000000000e+00 2.396203225329512776e+01
> > 1.570796326794896558e+00 1.666666666666666574e-01 2.130248067207563523e+01
> > 1.570796326794896558e+00 3.333333333333333148e-01 1.893811334477913277e+01
> > 1.570796326794896558e+00 5.000000000000000000e-01 1.683616770181326316e+01
> > 1.570796326794896558e+00 6.666666666666666297e-01 1.496751749887080329e+01
> > 1.570796326794896558e+00 8.333333333333332593e-01 1.330626922033307302e+01
> > 1.570796326794896558e+00 1.000000000000000000e+00 1.182940327795447999e+01
> > 3.141592653589793116e+00 0.000000000000000000e+00 1.051645503298913731e+01
> > 3.141592653589793116e+00 1.666666666666666574e-01 9.349231221746512333e+00
> > 3.141592653589793116e+00 3.333333333333333148e-01 8.311557855141172624e+00
> > 3.141592653589793116e+00 5.000000000000000000e-01 7.389056098930650407e+00
> > 3.141592653589793116e+00 6.666666666666666297e-01 6.568943029058285532e+00
> > 3.141592653589793116e+00 8.333333333333332593e-01 5.839854501207304871e+00
> > 3.141592653589793116e+00 1.000000000000000000e+00 5.191687680104649871e+00
> > 4.712388980384689674e+00 0.000000000000000000e+00 4.615461046534314882e+00
> > 4.712388980384689674e+00 1.666666666666666574e-01 4.103189942205120566e+00
> > 4.712388980384689674e+00 3.333333333333333148e-01 3.647775927922803252e+00
> > 4.712388980384689674e+00 5.000000000000000000e-01 3.242908421924544982e+00
> > 4.712388980384689674e+00 6.666666666666666297e-01 2.882977255397825012e+00
> > 4.712388980384689674e+00 8.333333333333332593e-01 2.562994933482758420e+00
> > 4.712388980384689674e+00 1.000000000000000000e+00 2.278527524544009530e+00
> > 6.283185307179586232e+00 0.000000000000000000e+00 2.025633220058637107e+00
> > 6.283185307179586232e+00 1.666666666666666574e-01 1.800807713756398032e+00
> > 6.283185307179586232e+00 3.333333333333333148e-01 1.600935643142084031e+00
> > 6.283185307179586232e+00 5.000000000000000000e-01 1.423247420534685892e+00
> > 6.283185307179586232e+00 6.666666666666666297e-01 1.265280855439646635e+00
> > 6.283185307179586232e+00 8.333333333333332593e-01 1.124847036463023642e+00
> > 6.283185307179586232e+00 1.000000000000000000e+00 1.000000000000000000e+00
> >
> >
> >
> > How would you plot them in order to have a 2D-color plot where one can
> > understand we are working on a circle (well, maybe it will look like
> > something different since I have only a few grid points, but the aim
> > is clear, I hope)?
> > Kind Regards
> >
> > Lorenzo
From: Brian <fo...@gm...> - 2007年06月26日 15:14:38
It sounds to me that you want to have a contour plot which takes as input
the r,theta, and T. I would suggest just
On 6/26/07, Lorenzo Isella <lor...@gm...> wrote:
>
> Hello,
> Thanks for your suggestion, but I still have a problem.
> Maybe I did not make myself clear (or most likely I have a problem
> about how to implement your suggestion): actually I have T=3DT(r,theta)
> and I would like to make a 2D plot using colors such that one can see
> that the domain where I am plotting is actually a circle.
> The example I mentioned is not exactly what I need since there one can
> find how to plot in polar coordinates a function of r alone.
> Furthermore, I do not have necessarily an equally spaced grid.
> For instance, let me consider the case of 5 theta's and 7 radial
> position and consequentely 35 values of T:
>
> theta R
> T
> 0.000000000000000000e+00 0.000000000000000000e+00 5.459815003314423620e+0=
1
> 0.000000000000000000e+00 1.666666666666666574e-01 4.853828855239110851e+0=
1
> 0.000000000000000000e+00 3.333333333333333148e-01 4.315101251901344881e+0=
1
> 0.000000000000000000e+00 5.000000000000000000e-01 3.836167151642037965e+0=
1
> 0.000000000000000000e+00 6.666666666666666297e-01 3.410390059527122020e+0=
1
> 0.000000000000000000e+00 8.333333333333332593e-01 3.031870066752165016e+0=
1
> 0.000000000000000000e+00 1.000000000000000000e+00 2.695362096775039973e+0=
1
> 1.570796326794896558e+00 0.000000000000000000e+00 2.396203225329512776e+0=
1
> 1.570796326794896558e+00 1.666666666666666574e-01 2.130248067207563523e+0=
1
> 1.570796326794896558e+00 3.333333333333333148e-01 1.893811334477913277e+0=
1
> 1.570796326794896558e+00 5.000000000000000000e-01 1.683616770181326316e+0=
1
> 1.570796326794896558e+00 6.666666666666666297e-01 1.496751749887080329e+0=
1
> 1.570796326794896558e+00 8.333333333333332593e-01 1.330626922033307302e+0=
1
> 1.570796326794896558e+00 1.000000000000000000e+00 1.182940327795447999e+0=
1
> 3.141592653589793116e+00 0.000000000000000000e+00 1.051645503298913731e+0=
1
> 3.141592653589793116e+00 1.666666666666666574e-01 9.349231221746512333e+0=
0
> 3.141592653589793116e+00 3.333333333333333148e-01 8.311557855141172624e+0=
0
> 3.141592653589793116e+00 5.000000000000000000e-01 7.389056098930650407e+0=
0
> 3.141592653589793116e+00 6.666666666666666297e-01 6.568943029058285532e+0=
0
> 3.141592653589793116e+00 8.333333333333332593e-01 5.839854501207304871e+0=
0
> 3.141592653589793116e+00 1.000000000000000000e+00 5.191687680104649871e+0=
0
> 4.712388980384689674e+00 0.000000000000000000e+00 4.615461046534314882e+0=
0
> 4.712388980384689674e+00 1.666666666666666574e-01 4.103189942205120566e+0=
0
> 4.712388980384689674e+00 3.333333333333333148e-01 3.647775927922803252e+0=
0
> 4.712388980384689674e+00 5.000000000000000000e-01 3.242908421924544982e+0=
0
> 4.712388980384689674e+00 6.666666666666666297e-01 2.882977255397825012e+0=
0
> 4.712388980384689674e+00 8.333333333333332593e-01 2.562994933482758420e+0=
0
> 4.712388980384689674e+00 1.000000000000000000e+00 2.278527524544009530e+0=
0
> 6.283185307179586232e+00 0.000000000000000000e+00 2.025633220058637107e+0=
0
> 6.283185307179586232e+00 1.666666666666666574e-01 1.800807713756398032e+0=
0
> 6.283185307179586232e+00 3.333333333333333148e-01 1.600935643142084031e+0=
0
> 6.283185307179586232e+00 5.000000000000000000e-01 1.423247420534685892e+0=
0
> 6.283185307179586232e+00 6.666666666666666297e-01 1.265280855439646635e+0=
0
> 6.283185307179586232e+00 8.333333333333332593e-01 1.124847036463023642e+0=
0
> 6.283185307179586232e+00 1.000000000000000000e+00 1.000000000000000000e+0=
0
>
>
>
> How would you plot them in order to have a 2D-color plot where one can
> understand we are working on a circle (well, maybe it will look like
> something different since I have only a few grid points, but the aim
> is clear, I hope)?
> Kind Regards
>
> Lorenzo
>
>
>
>
>
> On 26/06/07, Benoit Donnet <ben...@uc...> wrote:
> > Hey,
> >
> > That's quite simple. Assume your file containing the data is name
> > Data.dat and is in the same directory than your python script.
> >
> > from pylab import *
> > from numpy import *
> >
> > tab =3D load('Data.dat') #load the file
> > r =3D tab[:,0] #get the r coordinates
> > theta =3D tab[:,1] #get the theta coordinates
> > T =3D tab[:,2] #get the temperature
> >
> > # now, you can process/plot your data
> >
> > Hope this help.
> >
> > Best regards.
> >
> > Benoit
> >
> >
> > Le 25-juin-07 =E0 19:03, Lorenzo Isella a =E9crit :
> >
> > > Dear All,
> > > I am quite a newbie about Python and Pylab, but I am starting to like
> > > the ease you can develop with using these tools.
> > > I am interested in 2D radial plots (think for instance about the plot
> > > of the temperature along the cross-section of a pipe).
> > > I had a look at the tutorial online, in particular to the case
> > > described in:
> > >
> > > http://matplotlib.sourceforge.net/screenshots/polar_demo.py
> > >
> > > but there is something which is not 100% clear to me.
> > > What if, instead of having an analytical expression for the quantity =
I
> > > want to plot I have to read it (together with the r and theta
> > > coordinates) from a file, e.g.:
> > >
> > > r theta T
> > >
> > >
> > > where the columns r and theta contain the list of (r,theta)
> > > coordinates (the "grid" I am using along the cross section) and T the
> > > temperature evaluated at that grid point?
> > > If necessary, I can post an example file (but at the moment I am
> > > working with fairly big files and I think I conveyed an idea of what =
I
> > > am after).
> > > Many thanks
> > >
> > > Lorenzo
> > >
> > > ---------------------------------------------------------------------=
-
> > > ---
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > _______________________________________________
> > > Matplotlib-users mailing list
> > > Mat...@li...
> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> > --
> > Dr. Benoit Donnet
> > Universit=E9 Catholique de Louvain (UCL)
> > Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie
> > Informatique (INGI)
> > Place Sainte Barbe, 2
> > 1348 Louvain-la-Neuve
> > Belgium
> > Phone: +32 10 47 87 18
> > Home page: http://inl.info.ucl.ac.be/donnet
> >
> >
> >
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
From: John H. <jd...@gm...> - 2007年06月26日 14:35:23
On 6/26/07, Matthias Michler <Mat...@gm...> wrote:
> Hello everybody,
>
> first of all: Sorry for posting to my own thread.
> But I really like this new feature and may be the last message got lost among
> the lots of mpl-mails. So I ask you once more for comments on this issue
> (please).
>
> Is this new feature a bug to some of the RectangleSelector-users or a real
> feature?
> Could it be part of mpl?
Thanks for reminding us on this one. Making these widgets work well
together can be a pain. I wrote some locking functionality to help
coordinate them, is any of this functionality useful to you?
The patch looks mostly correct, but the code trying to get the toolbar
state is problematic
+ # If zoom mode was activated
+ if not (Gcf.get_active().toolbar.mode == ''):
+ return True
+
Gcf is a pylab construct, and code in widgets must not be dependent on
pylab. Also, using the mode string here looks a bit hackish since it
is designed to communicate to the user rather than represent state.
See if you can use the lock functionality to achieve the same purpose
-- eg look at how widgetlock is used in the toolbar in backend_bases.
If this is not viable, let me know why and we'll figure a better way
for these widgets to communicate.
JDH
From: Lorenzo I. <lor...@gm...> - 2007年06月26日 13:36:35
Attachments: example.txt
Hello,
Thanks for your suggestion, but I still have a problem.
Maybe I did not make myself clear (or most likely I have a problem
about how to implement your suggestion): actually I have T=3DT(r,theta)
and I would like to make a 2D plot using colors such that one can see
that the domain where I am plotting is actually a circle.
The example I mentioned is not exactly what I need since there one can
find how to plot in polar coordinates a function of r alone.
Furthermore, I do not have necessarily an equally spaced grid.
For instance, let me consider the case of 5 theta's and 7 radial
position and consequentely 35 values of T:
 theta R
 T
0.000000000000000000e+00 0.000000000000000000e+00 5.459815003314423620e+01
0.000000000000000000e+00 1.666666666666666574e-01 4.853828855239110851e+01
0.000000000000000000e+00 3.333333333333333148e-01 4.315101251901344881e+01
0.000000000000000000e+00 5.000000000000000000e-01 3.836167151642037965e+01
0.000000000000000000e+00 6.666666666666666297e-01 3.410390059527122020e+01
0.000000000000000000e+00 8.333333333333332593e-01 3.031870066752165016e+01
0.000000000000000000e+00 1.000000000000000000e+00 2.695362096775039973e+01
1.570796326794896558e+00 0.000000000000000000e+00 2.396203225329512776e+01
1.570796326794896558e+00 1.666666666666666574e-01 2.130248067207563523e+01
1.570796326794896558e+00 3.333333333333333148e-01 1.893811334477913277e+01
1.570796326794896558e+00 5.000000000000000000e-01 1.683616770181326316e+01
1.570796326794896558e+00 6.666666666666666297e-01 1.496751749887080329e+01
1.570796326794896558e+00 8.333333333333332593e-01 1.330626922033307302e+01
1.570796326794896558e+00 1.000000000000000000e+00 1.182940327795447999e+01
3.141592653589793116e+00 0.000000000000000000e+00 1.051645503298913731e+01
3.141592653589793116e+00 1.666666666666666574e-01 9.349231221746512333e+00
3.141592653589793116e+00 3.333333333333333148e-01 8.311557855141172624e+00
3.141592653589793116e+00 5.000000000000000000e-01 7.389056098930650407e+00
3.141592653589793116e+00 6.666666666666666297e-01 6.568943029058285532e+00
3.141592653589793116e+00 8.333333333333332593e-01 5.839854501207304871e+00
3.141592653589793116e+00 1.000000000000000000e+00 5.191687680104649871e+00
4.712388980384689674e+00 0.000000000000000000e+00 4.615461046534314882e+00
4.712388980384689674e+00 1.666666666666666574e-01 4.103189942205120566e+00
4.712388980384689674e+00 3.333333333333333148e-01 3.647775927922803252e+00
4.712388980384689674e+00 5.000000000000000000e-01 3.242908421924544982e+00
4.712388980384689674e+00 6.666666666666666297e-01 2.882977255397825012e+00
4.712388980384689674e+00 8.333333333333332593e-01 2.562994933482758420e+00
4.712388980384689674e+00 1.000000000000000000e+00 2.278527524544009530e+00
6.283185307179586232e+00 0.000000000000000000e+00 2.025633220058637107e+00
6.283185307179586232e+00 1.666666666666666574e-01 1.800807713756398032e+00
6.283185307179586232e+00 3.333333333333333148e-01 1.600935643142084031e+00
6.283185307179586232e+00 5.000000000000000000e-01 1.423247420534685892e+00
6.283185307179586232e+00 6.666666666666666297e-01 1.265280855439646635e+00
6.283185307179586232e+00 8.333333333333332593e-01 1.124847036463023642e+00
6.283185307179586232e+00 1.000000000000000000e+00 1.000000000000000000e+00
How would you plot them in order to have a 2D-color plot where one can
understand we are working on a circle (well, maybe it will look like
something different since I have only a few grid points, but the aim
is clear, I hope)?
Kind Regards
Lorenzo
On 26/06/07, Benoit Donnet <ben...@uc...> wrote:
> Hey,
>
> That's quite simple. Assume your file containing the data is name
> Data.dat and is in the same directory than your python script.
>
> from pylab import *
> from numpy import *
>
> tab =3D load('Data.dat') #load the file
> r =3D tab[:,0] #get the r coordinates
> theta =3D tab[:,1] #get the theta coordinates
> T =3D tab[:,2] #get the temperature
>
> # now, you can process/plot your data
>
> Hope this help.
>
> Best regards.
>
> Benoit
>
>
> Le 25-juin-07 =E0 19:03, Lorenzo Isella a =E9crit :
>
> > Dear All,
> > I am quite a newbie about Python and Pylab, but I am starting to like
> > the ease you can develop with using these tools.
> > I am interested in 2D radial plots (think for instance about the plot
> > of the temperature along the cross-section of a pipe).
> > I had a look at the tutorial online, in particular to the case
> > described in:
> >
> > http://matplotlib.sourceforge.net/screenshots/polar_demo.py
> >
> > but there is something which is not 100% clear to me.
> > What if, instead of having an analytical expression for the quantity I
> > want to plot I have to read it (together with the r and theta
> > coordinates) from a file, e.g.:
> >
> > r theta T
> >
> >
> > where the columns r and theta contain the list of (r,theta)
> > coordinates (the "grid" I am using along the cross section) and T the
> > temperature evaluated at that grid point?
> > If necessary, I can post an example file (but at the moment I am
> > working with fairly big files and I think I conveyed an idea of what I
> > am after).
> > Many thanks
> >
> > Lorenzo
> >
> > ----------------------------------------------------------------------
> > ---
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> --
> Dr. Benoit Donnet
> Universit=E9 Catholique de Louvain (UCL)
> Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie
> Informatique (INGI)
> Place Sainte Barbe, 2
> 1348 Louvain-la-Neuve
> Belgium
> Phone: +32 10 47 87 18
> Home page: http://inl.info.ucl.ac.be/donnet
>
>
>
>
From: Matthias M. <Mat...@gm...> - 2007年06月26日 13:15:53
Hello everybody,
first of all: Sorry for posting to my own thread.
But I really like this new feature and may be the last message got lost among 
the lots of mpl-mails. So I ask you once more for comments on this issue 
(please).
 
Is this new feature a bug to some of the RectangleSelector-users or a real 
feature?
Could it be part of mpl?
Thanks in advance for any comments.
Matthias Michler
On Thursday 03 May 2007 18:22, Matthias Michler wrote:
> Hello list,
>
> refering to the thread 'activate/deactivate RectangleSelector' of the
> developer-mailing-list I thought a bit about the problem because I found it
> quite irritating that the RS couldn't be stopped during zooming.
>
> I attached a patch including Martin's example and my proposal to
> (de)activate RectangleSelector including deactivation during zoom mode.
>
> I hope this is helpful for others too and can be part of matplotlib.
>
> best regards,
> Matthias
>
> PS: Should I send those mails to developer mailing list?
From: Nils W. <nw...@ia...> - 2007年06月26日 09:12:02
Attachments: eigplot.py
Hi all,
I would like to plot the largest eigenvalue of an affine matrix over a grid.
I followed the hints available at
http://www.scipy.org/Cookbook/Matplotlib/mplot3D
I missed the hint "Note that not all examples on this page are up to
date, so some of them might not be working."
How can I fix the problem ?
Nils
python -i eigplot.py --verbose-helpful
matplotlib data path /usr/lib64/python2.4/site-packages/matplotlib/mpl-data
$HOME=/home/nwagner
CONFIGDIR=/home/nwagner/.matplotlib
loaded rc file /home/nwagner/.matplotlib/matplotlibrc
matplotlib version 0.90.1
verbose.level helpful
interactive is False
units is True
platform is linux2
numerix numpy 1.0.4.dev3875
font search path
['/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf',
'/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/afm']
loaded ttfcache file /home/nwagner/.matplotlib/ttffont.cache
backend TkAgg version 8.4
Traceback (most recent call last):
 File "eigplot.py", line 28, in ?
 ax.contourf3D(X,Y,Z)
 File "/usr/lib64/python2.4/site-packages/matplotlib/axes3d.py", line
590, in contourf3D
 raise NotImplementedError("contourf3D is broken")
NotImplementedError: contourf3D is broken
 
From: Benoit D. <ben...@uc...> - 2007年06月26日 06:17:20
Hey,
That's quite simple. Assume your file containing the data is name =20
Data.dat and is in the same directory than your python script.
from pylab import *
from numpy import *
tab =3D load('Data.dat') #load the file
r =3D tab[:,0] #get the r coordinates
theta =3D tab[:,1] #get the theta coordinates
T =3D tab[:,2] #get the temperature
# now, you can process/plot your data
Hope this help.
Best regards.
Benoit
Le 25-juin-07 =E0 19:03, Lorenzo Isella a =E9crit :
> Dear All,
> I am quite a newbie about Python and Pylab, but I am starting to like
> the ease you can develop with using these tools.
> I am interested in 2D radial plots (think for instance about the plot
> of the temperature along the cross-section of a pipe).
> I had a look at the tutorial online, in particular to the case =20
> described in:
>
> http://matplotlib.sourceforge.net/screenshots/polar_demo.py
>
> but there is something which is not 100% clear to me.
> What if, instead of having an analytical expression for the quantity I
> want to plot I have to read it (together with the r and theta
> coordinates) from a file, e.g.:
>
> r theta T
>
>
> where the columns r and theta contain the list of (r,theta)
> coordinates (the "grid" I am using along the cross section) and T the
> temperature evaluated at that grid point?
> If necessary, I can post an example file (but at the moment I am
> working with fairly big files and I think I conveyed an idea of what I
> am after).
> Many thanks
>
> Lorenzo
>
> ----------------------------------------------------------------------=20=
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Dr. Benoit Donnet
Universit=E9 Catholique de Louvain (UCL)
Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie =20
Informatique (INGI)
Place Sainte Barbe, 2
1348 Louvain-la-Neuve
Belgium
Phone: +32 10 47 87 18
Home page: http://inl.info.ucl.ac.be/donnet

Showing 11 results of 11

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