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
(5) |
2
(4) |
|
3
|
4
(9) |
5
(4) |
6
(9) |
7
(13) |
8
(11) |
9
(7) |
|
10
(7) |
11
(22) |
12
(19) |
13
(11) |
14
(20) |
15
(21) |
16
(1) |
|
17
(1) |
18
(8) |
19
(3) |
20
(5) |
21
(5) |
22
(9) |
23
(3) |
|
24
(3) |
25
(14) |
26
(12) |
27
(29) |
28
(18) |
29
(11) |
30
(2) |
|
From: Eric E. <ems...@ob...> - 2005-04-27 14:06:57
|
Hi, I found an odd problem with "legend". I get the right labels/text but not the "small colour bars" associated to them. There is something I must do wrong.. Here is a fake example: =========== pa1 = hist(arange(1,100,1), bins=arange(0,100,10)) pa2 = hist(arange(1,100,1), bins=arange(0,100,10)) clf width = 5 # the width of the bars p1 = bar(pa1[1], pa1[0], width, color='r') p2 = bar(pa2[1]+width, pa2[0], width, color='y') legend([pa1[0], pa2[0]], ["$r_e/5$", "$r_e/2.5$"], shadow=True) ============ Thanks for any input on this! Eric -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== |
|
From: Perry G. <pe...@st...> - 2005-04-27 14:00:00
|
Hi Eric, We've been talking about doing such things with John over the past few months but with no specific plans at the moment. I think the current fallback is to refer people to using VTK or one of the Python toolsets built on VTK for 3d plotting. Since VTK is such a big package we do understand the need for adding more basic 3d tools to matplotlib (though it naturally raises the question of where to draw the line; we don't want to re-implement VTK or any substantial fraction of it!). This includes surface and scatter plots (though I hadn't considered 2-d histograms--but these are essentially variants of surface plots). I'm not sure what you have in mind for higher dimensionality histograms. One of the questions to be answered is how we handle 3-d axes and their labeling. I doubt (John may differ on this) that we want to go into fancy 3-d character sets and such, but it may be possible to do simple transforms on fonts to make them look like they lay on the appropriate plane. On Apr 27, 2005, at 2:55 AM, Eric Emsellem wrote: > Hi, > I recently sent a mail to matplotlib-users regarding the availability > of 3 axes plots and histograms in 2/N D and got no feedback. > I understand this may not be a very exciting issue but if anybody has > any input there (see below), it would be welcome. Thanks in advance!! > > cheers > > Eric > ============================================= > 3 axes plot > ======== > The more I am using matplotlib, the more I like it. But using it more > means I more often hit the limits of the code, so I was wondering if > there is any plan for a routine to plot data points w.r.t 3 axes (so a > perspective scatter plot with x,y,z, data and a viewing angle). Of > course another (maybe more difficult) goal would be to be able to draw > surfaces, but already a simple scatter plot in 3D would help > tremendously there (I realize the concept of "axis" has then to be > revised, but well I have no idea how much effort this is). > > (if there is no - coming - plan for this, is there any way around it?) > > histograms > ======== > I would like to produce histograms in N dimensions, the minimum being > in 2D. > Here is an example of what I wish to do: > > I have a set of P particles with x and y positions. > I have a rectangular grid, defined by e.g. a sampling in x and a > sampling in y, (e.g. samp_x=arange(-15,31,1) ..), and I wish to know > how many particles are in each "pixel". > > I can do that in many different ways (using searchsorted from > numarray, or abruptly using loops, etc) but I am now looking for a > simple (fewer lines) and efficient way (as I am treating large sets of > particles) to do this so that I would be able to use a function like: > > histogram_2D(x,y, samp_x, samp_y) would return a matrix with the > number of particles in each corresponding pixel. > > and > > showhistogram_2D(x,y, samp_x, samp_y) would display it > [using e.g. imshow or matshow] > > Any hint there (I realize this is more a numarray question but I > thought of first asking your community first since someone may have > done it already)? And maybe also of how to generalize this in N > dimensions? (for 1D matplotlib has the hist function..) > |
|
From: John H. <jdh...@ac...> - 2005-04-27 13:58:34
|
>>>>> "Eric" == Eric Emsellem <ems...@ob...> writes:
Eric> Hi, I recently sent a mail to matplotlib-users regarding the
Eric> availability of 3 axes plots and histograms in 2/N D and got
Eric> no feedback. I understand this may not be a very exciting
Eric> issue but if anybody has any input there (see below), it
Eric> would be welcome. Thanks in advance!!
I was out of the country and my mail server died, so I missed some
messages...
Eric> Eric ============================================= 3 axes
Eric> plot ======== The more I am using matplotlib, the more I
Eric> like it. But using it more means I more often hit the limits
Eric> of the code, so I was wondering if there is any plan for a
Eric> routine to plot data points w.r.t 3 axes (so a perspective
Eric> scatter plot with x,y,z, data and a viewing angle). Of
Eric> course another (maybe more difficult) goal would be to be
Eric> able to draw surfaces, but already a simple scatter plot in
Eric> 3D would help tremendously there (I realize the concept of
Eric> "axis" has then to be revised, but well I have no idea how
Eric> much effort this is).
Eric> (if there is no - coming - plan for this, is there any way
Eric> around it?)
There is a lot of interest in this -- at least three of the developers
besides me have expressed interest in working on this, so hopefully we
can get something going. Maybe sometime this summer...
Eric> Any hint there (I realize this is more a numarray question
Eric> but I thought of first asking your community first since
Eric> someone may have done it already)? And maybe also of how to
Eric> generalize this in N dimensions? (for 1D matplotlib has the
Eric> hist function..)
The plotting part for a 2D hist would be fairly easy (as a pcolor or
image). Is there no Nd histogram function in scipy or numarray?
JDH
|
|
From: John H. <jdh...@ac...> - 2005-04-27 13:45:46
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
>> With savefig("Spektren-CuP.ps",orientation="landscape"), the
>> diagram do not fill the whole a4 page. I think, this is related
>> to some configuration values, cause the resulting figure is not
>> an a4 page but a BBox. Any hints where to change that ?
Darren> In your Spektren-CuP.ps, try adding "%%DocumentPaperSizes:
Darren> A4" after the line that says "%%Orientation: landscape",
Darren> hopefully that can get you by while I work on a real
Darren> solution.
You will also need to change the default paper size in backend ps
before using it
import matplotlib.backends.backend_ps as ps
ps.defaultPaperSize = 8.26771, 11.69291 # A4 width and height in inches
import pylab
...and now make your plot...
Darren and I were discussing making this an rc parameter, so hopefully
this will be easier in the next release.
JDH
|
|
From: Dr. W. P. <w.p...@tu...> - 2005-04-27 13:12:55
|
Thanks for the idea !
Meanwhile I've improved it somewhat:
ylen =3D shape(Ximport)[1]
colors =3D ["r", "g", "b", "k", "y", "c", "m"] # And Others
counter =3D 0
ind =3D 1
for ind in range(1, ylen, 2):
Y =3D take(X,(0,ind), 1)
x =3D Y[:,0]
y =3D Y[:,1]
plot(x,y,colors[counter]+'-')
if counter < 5:
counter =3D counter + 1
else:
counter =3D 0
If my thoughts are right, this would return to beginning of colors if the=
=20
last one is arrived.
Regards
Werner
On Wed, 27 Apr 2005 14:50:49 +0200, <and...@ti...> wrote:
> Hello Werner,
>
>> The first problem is, that all curves have the same color. Is there a
>
>> possibility to "rotate" the colors in the loop ?
>
>> while ind < 18:
>> Y =3D take(X,(0,ind), 1)
>> x =3D Y[:,0]
>> y =3D Y[:,1]
>> plot(x,y,'-')
>> ind =3D ind + 2
>>
>
> You could try something like:
>
> colors =3D ["r", "g", "b", "k", "y", "c", "m"] # And Others
>
> counter =3D 0
>
> while ind < 18:
> Y =3D take(X,(0,ind), 1)
> x =3D Y[:,0]
> y =3D Y[:,1]
> plot(x,y,colors[counter] + '-')
> counter =3D counter + 1
> ind =3D ind + 2
>
>
> Sorry, don't know for the second one...
>
> HTH.
>
> Andrea.
>
--=20
DI Dr. Werner Pessenhofer
CPA - Computer Process Automation
Pl=FCddemanngasse 33
8010 Graz
Tel.: +43 (0) 676 346 70 08
FAX: +43 (0) 316 873 8772
|
|
From: Darren D. <dd...@co...> - 2005-04-27 11:44:39
|
Hi Dr. Pessenhofer,
On Wednesday 27 April 2005 4:12 am, Dr. Werner Pessenhofer wrote:
> ____________________________________________________
>
> #!/usr/bin/python
> #-*- coding: UTF-8 -*-
>
> =A0from pylab import *
>
> X =3D load('Spektren-CuP-conv.dat',comments=3D'#')
>
> hold(True)
>
> xlabel(r'$\rm{Wellenl\"ange / nm}$')
> ylabel('Extinktion')
> title('Spektren CuP')
>
> ind =3D 1
> while ind < 18:
> =A0 =A0 =A0Y =3D take(X,(0,ind), 1)
> =A0 =A0 =A0x =3D Y[:,0]
> =A0 =A0 =A0y =3D Y[:,1]
> =A0 =A0 =A0plot(x,y,'-')
> =A0 =A0 =A0ind =3D ind + 2
>
> savefig("Spektren-CuP.ps",orientation=3D"landscape")
>
> show()
> ________________________________________________________
>
> The first problem is, that all curves have the same color. Is there a
> possibility to "rotate" the colors in the loop ?
You could change plot(x,y,'-') to =A0plot(x,y). It will default to the '-'=
=20
linestyle, and matplotlib will cycle the colors for you. Also, the examples=
=20
include a script called line_styles.py with this suggestion:
colors =3D ('b', 'g', 'r', 'c', 'm', 'y', 'k')
ind =3D 1
while ind < 18:
Y =3D take(X,(0,ind), 1)
x =3D Y[:,0]
y =3D Y[:,1]
plot(x,y,'-'+colors[ind % len(colors)])
ind =3D ind + 2
>
> Second question:
>
> With savefig("Spektren-CuP.ps",orientation=3D"landscape"), the diagram do
> not fill the whole a4 page. I think, this is related to some configuration
> values, cause the resulting figure is not an a4 page but a BBox. Any hints
> where to change that ?
In your Spektren-CuP.ps, try adding "%%DocumentPaperSizes: A4" after the li=
ne=20
that says "%%Orientation: landscape", hopefully that can get you by while I=
=20
work on a real solution.
=2D-=20
Darren S. Dale
Bard Hall
Department of Materials Science and Engineering
Cornell University
Ithaca, NY. 14850
dd...@co...
|
|
From: Darren D. <dd...@co...> - 2005-04-27 11:16:20
|
Hi Dr. Pessenhofer,
On Wednesday 27 April 2005 4:12 am, Dr. Werner Pessenhofer wrote:
> ____________________________________________________
>
> #!/usr/bin/python
> #-*- coding: UTF-8 -*-
>
> from pylab import *
>
> X = load('Spektren-CuP-conv.dat',comments='#')
>
> hold(True)
>
> xlabel(r'$\rm{Wellenl\"ange / nm}$')
> ylabel('Extinktion')
> title('Spektren CuP')
>
> ind = 1
> while ind < 18:
> Y = take(X,(0,ind), 1)
> x = Y[:,0]
> y = Y[:,1]
> plot(x,y,'-')
> ind = ind + 2
>
> savefig("Spektren-CuP.ps",orientation="landscape")
>
> show()
> ________________________________________________________
>
> The first problem is, that all curves have the same color. Is there a
> possibility to "rotate" the colors in the loop ?
You could change plot(x,y,'-') to plot(x,y). It will default to the '-'
linestyle, and matplotlib will cycle the colors for you. Also, the examples
include a script called line_styles.py with this suggestion:
>
> Second question:
>
> With savefig("Spektren-CuP.ps",orientation="landscape"), the diagram do
> not fill the whole a4 page. I think, this is related to some configuration
> values, cause the resulting figure is not an a4 page but a BBox. Any hints
> where to change that ?
>
> Regards
>
> Werner
--
Darren S. Dale
Bard Hall
Department of Materials Science and Engineering
Cornell University
Ithaca, NY. 14850
dd...@co...
|
|
From: Dr. W. P. <w.p...@tu...> - 2005-04-27 08:13:13
|
Hi all,
I'm using matplotlib and Numeric since a few days ago, so I am not very =20
sophisticated in using python :-)
I want to use matplotlib to print automatically several spectras from a =20
file. This means, it takes the first column as x-value and the second, =20
fourth, sixth .... column as y-value.
The script I wrote:
____________________________________________________
#!/usr/bin/python
#-*- coding: UTF-8 -*-
from pylab import *
X =3D load('Spektren-CuP-conv.dat',comments=3D'#')
hold(True)
xlabel(r'$\rm{Wellenl\"ange / nm}$')
ylabel('Extinktion')
title('Spektren CuP')
ind =3D 1
while ind < 18:
Y =3D take(X,(0,ind), 1)
x =3D Y[:,0]
y =3D Y[:,1]
plot(x,y,'-')
ind =3D ind + 2
savefig("Spektren-CuP.ps",orientation=3D"landscape")
show()
________________________________________________________
The first problem is, that all curves have the same color. Is there a =20
possibility to "rotate" the colors in the loop ?
Second question:
With savefig("Spektren-CuP.ps",orientation=3D"landscape"), the diagram do=
=20
not fill the whole a4 page. I think, this is related to some configuratio=
n =20
values, cause the resulting figure is not an a4 page but a BBox. Any hint=
s =20
where to change that ?
Regards
Werner
--=20
DI Dr. Werner Pessenhofer
CPA - Computer Process Automation
Pl=FCddemanngasse 33
8010 Graz
Tel.: +43 (0) 676 346 70 08
FAX: +43 (0) 316 873 8772
|
|
From: Eric E. <ems...@ob...> - 2005-04-27 06:56:47
|
Hi, I recently sent a mail to matplotlib-users regarding the availability of 3 axes plots and histograms in 2/N D and got no feedback. I understand this may not be a very exciting issue but if anybody has any input there (see below), it would be welcome. Thanks in advance!! cheers Eric ============================================= 3 axes plot ======== The more I am using matplotlib, the more I like it. But using it more means I more often hit the limits of the code, so I was wondering if there is any plan for a routine to plot data points w.r.t 3 axes (so a perspective scatter plot with x,y,z, data and a viewing angle). Of course another (maybe more difficult) goal would be to be able to draw surfaces, but already a simple scatter plot in 3D would help tremendously there (I realize the concept of "axis" has then to be revised, but well I have no idea how much effort this is). (if there is no - coming - plan for this, is there any way around it?) histograms ======== I would like to produce histograms in N dimensions, the minimum being in 2D. Here is an example of what I wish to do: I have a set of P particles with x and y positions. I have a rectangular grid, defined by e.g. a sampling in x and a sampling in y, (e.g. samp_x=arange(-15,31,1) ..), and I wish to know how many particles are in each "pixel". I can do that in many different ways (using searchsorted from numarray, or abruptly using loops, etc) but I am now looking for a simple (fewer lines) and efficient way (as I am treating large sets of particles) to do this so that I would be able to use a function like: histogram_2D(x,y, samp_x, samp_y) would return a matrix with the number of particles in each corresponding pixel. and showhistogram_2D(x,y, samp_x, samp_y) would display it [using e.g. imshow or matshow] Any hint there (I realize this is more a numarray question but I thought of first asking your community first since someone may have done it already)? And maybe also of how to generalize this in N dimensions? (for 1D matplotlib has the hist function..) -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== |
|
From: John H. <jdh...@ac...> - 2005-04-27 01:38:23
|
>>>>> "Karsten" == Karsten Wedel Jacobsen <kw...@fy...> writes:
Karsten> After that the build and install went smoothly. But now
Karsten> if I try to import pylab I get the following error:
Karsten> pixbuf_get_pixels_array ImportError: No module named
Karsten> _nc_backend_gdk
Karsten> As far as I can see it is still trying to use some
Karsten> gtk-stuff?
This is a bit of annoyance in the mpl setup. The backend that is
chosen at runtime is determined by the rc file (see
http://matplotlib.sf.net/.matplotlibrc) and the default backend in the
rc file is GTKAgg. Even if you turn GTK compilation off in setup.py,
the rc file still determines which backend is selected. You need to
copy that file from its default location (eg
/usr/share/matplotlib/.matplotlibrc) to your HOME directory and edit
the 'backend' setting to something else, eg TkAgg, WXAgg or QtAgg.
While debugging, it is helpful to create a simple script like
import pylab
pylab.plot([1,2,3])
pylab.show()
and run it with
> python myscript.py --verbose-helpful
which will show you which rc file is being loaded, which backend is
selected, what mpl version you are using, and so on.
Should help,
JDH
PS: the bug in pygtk2.4 in fedora core 3 is quite ease to fix. You
simply have to replace typename with another name like typename_ or
some other name as described in the FAQ.
|
|
From: Karsten W. J. <kw...@fy...> - 2005-04-26 22:04:10
|
Dear matplotlib-users, I would appreciate some help installing matplotlib on fedora core 3. After an initial unsuccessful build using gtk I decided to try to avoid the pygtk 2.4 problem http://matplotlib.sourceforge.net/faq.html#PYGTK24 I therefore changed two lines in setup.py so that it now reads BUILD_GTKAGG = 0 #BUILD_GTKAGG = 'auto' #BUILD_GTK = 'auto' BUILD_GTK = 0 After that the build and install went smoothly. But now if I try to import pylab I get the following error: >>> import pylab Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/pylab.py", line 1, in ? from matplotlib.pylab import * File "/usr/lib/python2.3/site-packages/matplotlib/pylab.py", line 196, in ? import backends File "/usr/lib/python2.3/site- packages/matplotlib/backends/__init__.py", line 19, in ? globals(),locals(),[backend_name]) File "/usr/lib/python2.3/site- packages/matplotlib/backends/backend_gtkagg.py", line 10, in ? from backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\ File "/usr/lib/python2.3/site- packages/matplotlib/backends/backend_gtk.py", line 20, in ? from backend_gdk import RendererGDK File "/usr/lib/python2.3/site- packages/matplotlib/backends/backend_gdk.py", line 44, in ? from matplotlib._nc_backend_gdk import pixbuf_get_pixels_array ImportError: No module named _nc_backend_gdk >>> As far as I can see it is still trying to use some gtk-stuff? I have tried removing the site-packages/matplotlib directory completely and also do a new build and install from a fresh tarball with only the above mentioned two changes in setup.py, but still I get the error. Any help would be appreciated. Karsten. |
|
From: John H. <jdh...@ac...> - 2005-04-26 21:27:14
|
>>>>> "ravi" == ravi <ra...@gm...> writes:
ravi> Hi, I just upgraded to 0.80 from 0.73.1 on a Fedora Core 3
ravi> machine. I am (and have been) using ipython 0.6.13 as my
ravi> shell. After the upgrade, plots from scripts are no longer
ravi> interactive - I need an explicit call to pylab.show() to
ravi> show the plots.
ravi> Do I need to update some settings? I am using the GTKAgg
ravi> backend with all default parameters (no user-specific
ravi> .matplotlibrc) and I compiled matplotlib from sources. Here
ravi> is a simple script that no longer updates 100 times but just
ravi> shows once:
Fernando and I made a conscious choice to turn off interactive mode
when running scripts from ipython, since this is usually what people
want and has better performance. To override this, to need to
explicitly turn on/and off interactive mode where desired, and
possibly explicitly call draw in the animation loop where you want the
figure to be refreshed.
import scipy
import matplotlib
from matplotlib import pylab
pylab.ion() # turn on interactive mode
for x in scipy.arange(100):
pylab.plot(scipy.randn(1000)+x)
pylab.show()
You can turn interactive mode on and off where desired with pylab.ion
and pylab.ioff (to suppress draws for a sequence of figure updates)
and explicitly draw where desired with pylab.draw. Details at
http://matplotlib.sf.net/interactive.html.
JDH
|
|
From: <ra...@gm...> - 2005-04-26 21:04:09
|
Hi,
I just upgraded to 0.80 from 0.73.1 on a Fedora Core 3 machine. I am (and=
=20
have been) using ipython 0.6.13 as my shell. After the upgrade, plots from=
=20
scripts are no longer interactive - I need an explicit call to pylab.show()=
=20
to show the plots.=20
Do I need to update some settings? I am using the GTKAgg backend with all=20
default parameters (no user-specific .matplotlibrc) and I compiled matplotl=
ib=20
from sources. Here is a simple script that no longer updates 100 times but=
=20
just shows once:
import scipy
import matplotlib
from matplotlib import pylab
#matplotlib.interactive(True)
for x in scipy.arange(100):
pylab.plot(scipy.randn(1000)+x)
=46rom the ipython prompt, I issued the command
run scriptAbove.py
where ipython was invoked as follows:
ipython -pylab -p scipy
Is this an ipython issue or a matplotlib issue? Any help greatly appreciate=
d.
Regards,
Ravi
|
|
From: Mike E. <mik...@gm...> - 2005-04-26 20:18:39
|
Bingo! One upgrade to the latest numarray and everything works fine.
Many thanks for your help.
Mike.
On 4/25/05, Jeff Whitaker <js...@fa...> wrote:
> Mike Elson wrote:
>=20
> >Hello Jeff,
> >
> >I tried loading the file etopo20.pickle by itself but got the same error=
:
> >
> >import cPickle
> >a =3D cPickle.load(open('etopo20.pickle','rb'))
> >
> >Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> > File "/usr/lib/python2.3/site-packages/numarray/generic.py", line
> >159, in Cla\ssicUnpickler
> > self.__setstate__(state)
> > File "/usr/lib/python2.3/site-packages/numarray/numarraycore.py",
> >line 463, i\n __setstate__
> > self._type =3D state["_type"]
> >AttributeError: ("'str' object has no attribute 'name'", <function
> >ClassicUnpic\kler at 0xb71e48b4>, (<class
> >'numarray.numarraycore.NumArray'>, {'_type': 'Floa\t32', '_itemsize':
> >4, '_shape': (1081,), '_bytestride': 4, '_byteoffset': 0, '_\version':
> >'1.1', '_byteorder': 'big', '_data': <memory at 082ee9a0 with
> >size:43\24 held by object 082ee980 aliasing object 00000000>,
> >'_strides': (4,)}))
> >
> >Looking at etopo20.pickle itself, the 4th line reads
> >'cnumarray.generic' - I'm guessing that means it is stored using
> >numarray.
> >Do I need a specific version of python or numarray to read it? I have
> >both Numeric (23.1) and numarray installed already.
> >
> >Mike.
> >
> >
> >
> Mike: Not that I know of. I'm puzzled by this one. You said in your
> first message that you are using numarray 0.8 - I think that might be
> too old. It's up to 1.3.1 now, and I'm sure I created that pickle with
> at least 1.1.
>=20
> -Jeff
>=20
> --
> Jeffrey S. Whitaker Phone : (303)497-6313
> Meteorologist FAX : (303)497-6449
> NOAA/OAR/CDC R/CDC1 Email : Jef...@no...
> 325 Broadway Office : Skaggs Research Cntr 1D-124
> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>=20
>
|
|
From: Robert K. <rk...@uc...> - 2005-04-26 19:32:14
|
Daniel Wheeler wrote: > Is there a way to obtain the version number of Matplotlib from the > python command line? > Such as "pylab.__version__'" for example, but that does not seem to work. matplotlib.__version__ -- Robert Kern rk...@uc... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |
|
From: John H. <jdh...@ac...> - 2005-04-26 19:31:11
|
>>>>> "Daniel" == Daniel Wheeler <dan...@ni...> writes:
Daniel> Is there a way to obtain the version number of Matplotlib
Daniel> from the python command line? Such as
Daniel> "pylab.__version__'" for example, but that does not seem
Daniel> to work.
You can do this:
> python -c 'import matplotlib; print matplotlib.__version__'
Or you can run your matplotlib scripts with:
> python myscript.py --verbose-helpful
to get the version info and more.
JDH
|
|
From: Daniel W. <dan...@ni...> - 2005-04-26 19:24:21
|
Is there a way to obtain the version number of Matplotlib from the python command line? Such as "pylab.__version__'" for example, but that does not seem to work. Thanks... ------------------------------------- Daniel Wheeler Telephone: (301) 975-8358 |
|
From: John H. <jdh...@ac...> - 2005-04-26 17:30:14
|
>>>>> "steve" == steve schmerler <el...@gm...> writes:
steve> Hi all I'm new to this list (but an active SciPy user). I
steve> just installed the latest matplotlib 0.80 on WinXP, Python
steve> 2.3.4, Numeric 23.8. A while ago I used matplotlib 0.61
steve> together with Numeric 23.1 which worked pretty well. But
steve> now I get the following error:
Do you get the error when you simply import gzip w/o importing
matplotlib or zlib? If so, you've got a problem unrelated to
matplotlib. If not, then the error may have something to do with the
fact that we're statically linking in zlib.
You can safely comment this import out of pylab. It is only used for
transparently loading and saving zipped files. But please let me know
about the results of the gzip import test....
JDH
|
|
From: steve s. <el...@gm...> - 2005-04-26 17:20:34
|
Hi all
I'm new to this list (but an active SciPy user).
I just installed the latest matplotlib 0.80 on WinXP, Python 2.3.4, Numeric 23.8. A while ago I used matplotlib 0.61
together with Numeric 23.1 which worked pretty well. But now I get the following error:
In [1]: from pylab import *
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Dokumente und Einstellungen\user\Eigene Dateien\<console>
C:\PROGRA~1\Python23\Lib\site-packages\pylab.py
-3 from matplotlib.pylab import *
C:\PROGRA~1\Python23\Lib\site-packages\matplotlib\pylab.py
188 """
189
--> 190 import gzip
191 import cm
192 import _pylab_helpers
C:\PROGRA~1\Python23\Lib\gzip.py
7
8 import struct, sys, time
----> 9 import zlib
10 import __builtin__
11
ImportError: dynamic module does not define init function (initzlib)
I've never seen this error message before. Any hints are appreciated. Many thanks.
Cheers,
Steve
--
Man is the best computer we can put aboard a spacecraft ... and the only one that can be
mass produced with unskilled labor. - Wernher von Braun
|
|
From: John H. <jdh...@ac...> - 2005-04-26 17:14:19
|
>>>>> "Michal" == Michal Kaukic <mi...@fr...> writes:
Michal> Hi, John and all, is the recent patch for use of masked
Michal> data in plotting lines (and contours) working? What is
Michal> the simplest example of using it?
Michal> I got this with recent CVS
I don't know how this bug crept into CVS (but I'm sure it's my fault),
but you need to edit the add_line function in Axes in the section
which reads
xdata = l.get_xdata()
ydata = l.get_ydata()
and replace it with
xdata = l.get_xdata(valid_only=True)
ydata = l.get_ydata(valid_only=True)
Also, FYI,
> python examples/masked_demo.py -numarray
should be
> python examples/masked_demo.py --numarray
JDH
|
|
From: Michal K. <mi...@fr...> - 2005-04-26 13:46:23
|
Hi, John and all,
is the recent patch for use of masked data in plotting lines (and contours) working?
What is the simplest example of using it?
I got this with recent CVS
python examples/masked_demo.py -numarray :
Traceback (most recent call last):
File "examples/masked_demo.py", line 19, in ?
lines = plot(x, y, 'r', x, ym1, 'g', x, ym2, 'bo')
File "/usr/lib/python2.3/site-packages/matplotlib/pylab.py", line 1930, in plot
ret = gca().plot(*args, **kwargs)
File "/usr/lib/python2.3/site-packages/matplotlib/axes.py", line 2411, in plot
self.add_line(line)
File "/usr/lib/python2.3/site-packages/matplotlib/axes.py", line 739, in add_line
self.update_datalim_numerix( xdata, ydata )
File "/usr/lib/python2.3/site-packages/matplotlib/axes.py", line 724, in update_datalim_numerix
self.dataLim.update_numerix(x, y, not self.has_data())
TypeError: Bbox::update_numerix expected numerix array
This is independent from using Numeric or numarray. Some grepp-ing of source shows that this
"TypeError" message comes from src/_transforms.cpp (lines 439, 445).
This short code fragment (lines 426-439 of src/_transforms.cpp) should make clear where the error occured:
Py::Object
Bbox::update_numerix(const Py::Tuple &args) {
//update the boox from the numerix arrays x and y
_VERBOSE("Bbox::update_numerix");
args.verify_length(3);
Py::Object xo = args[0];
Py::Object yo = args[1];
PyArrayObject *x = (PyArrayObject *) PyArray_ContiguousFromObject(xo.ptr(), PyArray_DOUBLE, 1,1);
if (x==NULL)
throw Py::TypeError("Bbox::update_numerix expected numerix array");
---------------------------------------------------------------------------------------------------
So, the trouble is with converting class MaskedArray to (Numeric) array. Sorry, I am not able
to help with the fix. I wonder, if someone can run the masked_demo.py successfully.
Mike
|
|
From: Alexander S. <a.s...@gm...> - 2005-04-26 04:27:26
|
Tim Leslie <ti...@cs...> writes: > On Sun, 24 Apr 2005, Jeff Whitaker <js...@fa...> wrote... > >> Tim Leslie wrote: >> >> >Hi all, >> > >> >I use matplotlib for looking at EEG (brainwave) data and I was looking for >> >a good way to do headmap plots of various things. I was wondering if >> >anyone has done this before. The basemap toolkit looks like it's done a >> >lot of the hard work, so I was planning on hacking on that to get it to do >> >what I need but I figured I should check here first to see that I'm not >> >reinventing a wheel that someone might have lying around. John, I know >> >you've done EEG stuff, any pointers? >> > >> >Cheers, >> > >> >Tim Leslie >> > >> > >> What's a headma? > > A headmap is visualisation where you plot certain values such as signal > power over the scalp. When you do an EEG recording you're often interested > in how certain values vary with location across the head and a headmap is > a way to view this. > > If you think of the head as a perfect sphere, then I'd like to plot values > at certain locations in the same way that using the basemap toolkit you > can plot values of say, temperature, at different locations on the earth. You might also want to have a look at Christopher James' topogs for matlab <http://www.soton.ac.uk/~jamescj/research-downloads.html> If you have matlab than rather than porting topogs you could just easily use it access it from python through mlabwrap (<http://mlabwrap.sourceforge.net>) -- as I did myself. Of course it would be even nicer to have somthing like it available in plain python. 'as |
|
From: Jeff W. <js...@fa...> - 2005-04-25 21:26:01
|
Mike Elson wrote:
>Hello Jeff,
>
>I tried loading the file etopo20.pickle by itself but got the same error:
>
>import cPickle
>a = cPickle.load(open('etopo20.pickle','rb'))
>
>Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/usr/lib/python2.3/site-packages/numarray/generic.py", line
>159, in Cla\ssicUnpickler
> self.__setstate__(state)
> File "/usr/lib/python2.3/site-packages/numarray/numarraycore.py",
>line 463, i\n __setstate__
> self._type = state["_type"]
>AttributeError: ("'str' object has no attribute 'name'", <function
>ClassicUnpic\kler at 0xb71e48b4>, (<class
>'numarray.numarraycore.NumArray'>, {'_type': 'Floa\t32', '_itemsize':
>4, '_shape': (1081,), '_bytestride': 4, '_byteoffset': 0, '_\version':
>'1.1', '_byteorder': 'big', '_data': <memory at 082ee9a0 with
>size:43\24 held by object 082ee980 aliasing object 00000000>,
>'_strides': (4,)}))
>
>Looking at etopo20.pickle itself, the 4th line reads
>'cnumarray.generic' - I'm guessing that means it is stored using
>numarray.
>Do I need a specific version of python or numarray to read it? I have
>both Numeric (23.1) and numarray installed already.
>
>Mike.
>
>
>
Mike: Not that I know of. I'm puzzled by this one. You said in your
first message that you are using numarray 0.8 - I think that might be
too old. It's up to 1.3.1 now, and I'm sure I created that pickle with
at least 1.1.
-Jeff
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/CDC R/CDC1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
|
|
From: Mike E. <mik...@gm...> - 2005-04-25 21:16:25
|
Hello Jeff,
I tried loading the file etopo20.pickle by itself but got the same error:
import cPickle
a =3D cPickle.load(open('etopo20.pickle','rb'))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/numarray/generic.py", line
159, in Cla\ssicUnpickler
self.__setstate__(state)
File "/usr/lib/python2.3/site-packages/numarray/numarraycore.py",
line 463, i\n __setstate__
self._type =3D state["_type"]
AttributeError: ("'str' object has no attribute 'name'", <function
ClassicUnpic\kler at 0xb71e48b4>, (<class
'numarray.numarraycore.NumArray'>, {'_type': 'Floa\t32', '_itemsize':
4, '_shape': (1081,), '_bytestride': 4, '_byteoffset': 0, '_\version':
'1.1', '_byteorder': 'big', '_data': <memory at 082ee9a0 with
size:43\24 held by object 082ee980 aliasing object 00000000>,
'_strides': (4,)}))
Looking at etopo20.pickle itself, the 4th line reads
'cnumarray.generic' - I'm guessing that means it is stored using
numarray.
Do I need a specific version of python or numarray to read it? I have
both Numeric (23.1) and numarray installed already.
Mike.
On 4/25/05, Jeff Whitaker <js...@fa...> wrote:
> Mike Elson wrote:
>=20
> >I'm having trouble running some of the examples that come with basemap
> >- any th\at use the file etopo20.pickle fail with an error similar to:
> >
> >Traceback (most recent call last):
> > File "test.py", line 12, in ?
> > topodict =3D cPickle.load(open('etopo20.pickle','rb'))
> > File "/usr/lib/python2.3/site-packages/numarray/generic.py", line
> >159, in Cla\ssicUnpickler
> > self.__setstate__(state)
> > File "/usr/lib/python2.3/site-packages/numarray/numarraycore.py",
> >line 463, i\n __setstate__
> > self._type =3D state["_type"]
> >AttributeError: ("'str' object has no attribute 'name'", <function
> >ClassicUnpic\kler at 0xb7b08e9c>, (<class
> >'numarray.numarraycore.NumArray'>, {'_type': 'Floa\t32', '_itemsize':
> >4, '_shape': (1081,), '_bytestride': 4, '_byteoffset': 0, '_\version':
> >'1.1', '_byteorder': 'big', '_data': <memory at 082f8798 with
> >size:43\24 held by object 082f8778 aliasing object 00000000>,
> >'_strides': (4,)}))
> >
> >Can anyone tell me how to fix this?
> >I'm using python 2.3.4, matplotlib 0.80, basemap 0.3.2, proj 4.4.8 and
> >have the Python libraries numeric 23.1 and numarray 0.8 installed.
> >
> >Thanks in advance,
> >Mike.
> >
> >
> >
> Mike: My guess is I saved the data as a pickle Numeric (not numarray) ob=
ject. You can either install Numeric, or I can re-pickle it for you with n=
umarray.
>=20
> -Jeff
>=20
> ---
> Jeffrey S. Whitaker Phone : (303)497-6313
> NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449
> 325 Broadway Web : http://www.cdc.noaa.gov/~jsw
> Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124
>=20
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Tim L. <ti...@cs...> - 2005-04-25 15:42:12
|
On Mon, 25 Apr 2005, Jeff Whitaker <js...@fa...> wrote... > Thanks for the explanation Tim. Sounds like it should work out of the > box, provided that the map projection you need is supported. If not, > I'll try adding it. Obviously, you don't need to plot coastlines and > political boundaries, but is there something you would like to plot in > their stead? There are a standard set of locations for scalp electrodes when measuring EEG data, so if we could represent them as small, circular countries, that'd be kinda cool. Also a couple of ovals/triangles to represent ears/eyes/nose would be useful. I'm a little busy for the coming week but I'll come back to this little project once things settle down and I'll get back to you on how well it works. Thanks in advance for all the work you've done in getting the library to the stage it is. Tim > > -Jeff > > > -- > Jeffrey S. Whitaker Phone : (303)497-6313 > Meteorologist FAX : (303)497-6449 > NOAA/OAR/CDC R/CDC1 Email : Jef...@no... > 325 Broadway Office : Skaggs Research Cntr 1D-124 > Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg > `- |