You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(2) |
|
2
(4) |
3
(21) |
4
(4) |
5
(13) |
6
(28) |
7
(11) |
8
(2) |
|
9
|
10
(11) |
11
(5) |
12
|
13
(5) |
14
(25) |
15
(4) |
|
16
(1) |
17
(7) |
18
(15) |
19
(21) |
20
(27) |
21
(11) |
22
(1) |
|
23
(1) |
24
(3) |
25
(9) |
26
(13) |
27
(19) |
28
(11) |
29
(4) |
|
30
(4) |
31
(11) |
|
|
|
|
|
|
From: John H. <jdh...@ac...> - 2005-10-17 17:45:43
|
>>>>> "John" == John Kitchin <jki...@ch...> writes:
John> Could these kinds of things be done in/with matplotlib? Or
John> more importantly, does a framework in matplotlib exist that
John> this kind of thing could be developed? I am interested in
John> talking to anyone who has thoughts about this.
Basically, you will want to read up on matplotlib event handling.
Resources
* user's guide section "event handling" in the pylab chapter
* class documentation for Events at
http://matplotlib.sf.net/matplotlib.backend_bases.html.
* wiki entry at
http://www.scipy.org/wikis/topical_software/InteractivePlotting
* Example escripts
picker_demo.py
poly_editor.py
JDH
|
|
From: Jeff W. <js...@fa...> - 2005-10-17 17:41:17
|
John Hunter wrote: >>>>>>"Andrew" == Andrew Straw <str...@as...> writes: >>>>>> >>>>>> > > Andrew> So I modified nat.py in the following way, and it now > Andrew> works. And there was much rejoicing! > >Anyone want to volunteer for a wiki entry on this one? It comes up a >lot... > >JDH > > John: I was thinking about putting together a natgrid toolbox, which would provide a function similar to matlab's griddata. This would building a new python interface to the natgrid c lib, since LLNL's license is too restrictive. The natgrid lib itself is GPL, which I think precludes it from being included in matplotlib proper. What do you think? -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: John H. <jdh...@ac...> - 2005-10-17 17:36:30
|
>>>>> "Andrew" == Andrew Straw <str...@as...> writes:
Andrew> So I modified nat.py in the following way, and it now
Andrew> works. And there was much rejoicing!
Anyone want to volunteer for a wiki entry on this one? It comes up a
lot...
JDH
|
|
From: John H. <jdh...@ac...> - 2005-10-17 17:35:42
|
>>>>> "Samuel" =3D=3D Samuel GARCIA <sg...@ol...> writes:
Samuel> I am new (futur) of pylab, I use a debian sid
Samuel> (unstable) with this source.list : deb
Samuel> [1]http://anakonda.altervista.org/debian packages/ deb-src
Samuel> [2]http://anakonda.altervista.org/debian sources/ I try it
Samuel> few 2 mouths ago and it worked, I have just updated all
Samuel> and now it does nit worked. Sorry if the answer is in
Samuel> archive, I did'nt find it. I have this message with from
Samuel> pylab import * :
This is a problem with your debian packaging system, and unfortunately
is outside our ability to help. I would report this to Vittorio, the
debian package maintainer.
gtk recently started using cairo as its rendering engine, and it
appears one of your package is linking to it but it is not provided, so
it looks like a debian dependency error.
JDH
Samuel> -------------------------------------------------------------=
---------
Samuel> ----- exceptions.ImportError Traceback (most recent call
Samuel> last) /home/sgarcia/<console>
Samuel> /usr/lib/python2.3/site-packages/pylab.py -3 from
Samuel> matplotlib.pylab import *
Samuel> /usr/lib/python2.3/site-packages/matplotlib/pylab.py 197
Samuel> 198 from axes import Axes, PolarAxes
--> 199 import backends
Samuel> 200 from cbook import flatten, is_string_like,
Samuel> exception_to_str, popd, \ 201 silent_list, iterable,
Samuel> enumerate
Samuel> /usr/lib/python2.3/site-packages/matplotlib/backends/__init__=
.py
Samuel> 53 # a hack to keep old versions of ipython working with
Samuel> mpl after bug 54 # fix #1209354 55 if 'IPython.Shell' in
Samuel> sys.modules:
---> 56 new_figure_manager, draw_if_interactive, show =3D
Samuel> pylab_setup() 57
Samuel> /usr/lib/python2.3/site-packages/matplotlib/backends/__init__=
.py
Samuel> in pylab_setup() 22 backend_name =3D
Samuel> 'backend_'+backend.lower() 23 backend_mod =3D
Samuel> __import__('matplotlib.backends.'+backend_name,
---> 24
Samuel> globals(),locals(),[backend_name]) 25 26 # Things we
Samuel> pull in from all backends
Samuel> /usr/lib/python2.3/site-packages/matplotlib/backends/backend_=
gtkagg.py
Samuel> 8 from matplotlib.figure import Figure 9 from backend_agg
Samuel> import FigureCanvasAgg
---> 10 from backend_gtk import gtk, FigureManagerGTK,
Samuel> FigureCanvasGTK,\ 11 show, draw_if_interactive,\ 12
Samuel> error_msg_gtk, NavigationToolbar, PIXELS_PER_INCH,
Samuel> backend_version, \
Samuel> /usr/lib/python2.3/site-packages/matplotlib/backends/backend_=
gtk.py
Samuel> 20 from matplotlib.backend_bases import RendererBase,
Samuel> GraphicsContextBase, \ 21 FigureManagerBase,
Samuel> FigureCanvasBase, NavigationToolbar2, cursors
---> 22 from matplotlib.backends.backend_gdk import RendererGDK,
Samuel> FigureCanvasGDK 23 from matplotlib.cbook import
Samuel> is_string_like, enumerate 24 from matplotlib.figure import
Samuel> Figure
Samuel> /usr/lib/python2.3/site-packages/matplotlib/backends/backend_=
gdk.py
Samuel> 32 from matplotlib.backends._na_backend_gdk import
Samuel> pixbuf_get_pixels_array 33 else:
---> 34 from matplotlib.backends._nc_backend_gdk import
Samuel> pixbuf_get_pixels_array 35 36 ImportError:
Samuel> libpangocairo-1.0.so.0: Ne peut ouvrir le fichier d'objet
Samuel> partag=E9: Aucun fichier ou r=E9pertoire de ce type Samuel --
Samuel> Samuel GARCIA CNRS - UMR5020 Universite Claude Bernard
Samuel> LYON 1 Laboratoire des Neurosciences et Systemes
Samuel> Sensoriels 50, avenue Tony Garnier 69366 LYON Cedex 07 04
Samuel> 37 28 74 64
Samuel> -------------------------------------------------------
Samuel> This SF.Net email is sponsored by: Power Architecture
Samuel> Resource Center: Free content, downloads, discussions, and
Samuel> more. http://solutions.newsforge.com/ibmarch.tmpl
Samuel> _______________________________________________
Samuel> Matplotlib-users mailing list
Samuel> Mat...@li...
Samuel> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Samuel> References
Samuel> 1. http://anakonda.altervista.org/debian
Samuel> 2. http://anakonda.altervista.org/debian
|
|
From: John H. <jdh...@ac...> - 2005-10-17 17:33:49
|
Your error occurs much more recently than the glyph one that occupies your subject Python 2.3.4 (#1, Feb 2 2005, 12:11:53) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pylab import * >>> from data_helper import get_daily_data Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named data_helper It looks like you have not downloaded the data_helper module from the web site, that this example uses. You'll also need to download the data files as well ... >>> grid(True) >>> >>> show() Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py", line 318, in expose_event You should not use show from interactive mode. Try reading http://matplotlib.sourceforge.net/interactive.html http://matplotlib.sourceforge.net/tutorial.html and http://matplotlib.sourceforge.net/faq.html#SHOW JDH >>>>> "Willi" == Willi Richert <w.r...@gm...> writes: |
|
From: John H. <jdh...@ac...> - 2005-10-17 17:31:42
|
>>>>> "Willi" =3D=3D Willi Richert <w.r...@gm...> writes:
Willi> Hi, here is the script:
Really very strange. Are you running this from the command line or an
IDE? Could you post the results of
> python yourscript.py --verbose-helpful
Perhaps this is a problem with text cacheing if you run the same
script repeatedly from ipython or an IDE.
Does it matter if you put the x and y label calls *after* the errorbar
command?
JDH
Willi> #!/usr/bin/python
Willi> from scipy import * from pylab import *
Willi> MAX_TIME =3D 7000
Willi> fn_social=3D"all-avg.dat"
Willi> def readStats(fn): q =3D [d for d in io.read_array(fn) if
Willi> d[0]<=3DMAX_TIME]
Willi> print q t=3D[s[0] for s in q]
Willi> age=3D[s[1] for s in q] age_conf=3D[s[2] for s in q]
Willi> wp=3D[s[3] for s in q] wp_conf=3D[s[4] for s in q]
Willi> return t, age, age_conf, wp, wp_conf
Willi> hold(True)
Willi> t, age, age_conf, wp, wp_conf =3D readStats(fn_social)
Willi> xlabel('time [s]') ylabel('average lifetime [s]')
Willi> errorbar(t,wp,yerr=3Dwp_conf, color=3D"blue",ecolor=3D"black",
Willi> mfc=3D'red', mec=3D'green', ms=3D200, mew=3D4)
Willi> show()
Willi> Am Freitag, 14. Oktober 2005 16:05 schrieb John Hunter:
>> >>>>> "Willi" =3D=3D Willi Richert <ri...@c-...> writes:
>>=20
Willi> Thanks, that helped! Switching to QtAgg did the trick.
Willi> However, I have still some issues: 1) the text placement of
Willi> the titles does not really work:
Willi> http://wr.objectis.net/Members/Papst/Matplotlib_Problems
>>
Willi> 2) The confidence intervals are only vertical lines. I
Willi> would like to have some small horizontal "stoppers" at the
Willi> upper and lower point of those error bars. Is that
Willi> possible with matplotlib?
>>=20
>>=20
>> Could you post the script -- hard to debug in a vacuum.
>>=20
>> JDH
>>=20
>>=20
>> ------------------------------------------------------- This
>> SF.Net email is sponsored by: Power Architecture Resource
>> Center: Free content, downloads, discussions, and
>> more. http://solutions.newsforge.com/ibmarch.tmpl
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Willi> -- Dipl.-Inform. Willi Richert C-LAB - Cooperative
Willi> Computing & Communication Laboratory der Universit=E4t
Willi> Paderborn und Siemens
Willi> FU.323 F=FCrstenallee 11 D-33102 Paderborn Tel: +49 52 51 60
Willi> - 61 20 Fax: +49 52 51 60 - 60 65 E-Mail: ri...@c-...
Willi> Internet: http://www.c-lab.de
Willi> -------------------------------------------------------
Willi> This SF.Net email is sponsored by: Power Architecture
Willi> Resource Center: Free content, downloads, discussions, and
Willi> more. http://solutions.newsforge.com/ibmarch.tmpl
Willi> _______________________________________________
Willi> Matplotlib-users mailing list
Willi> Mat...@li...
Willi> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Helge A. <he...@gm...> - 2005-10-17 15:44:03
|
On 10/14/05, Mark Bakker <ma...@gm...> wrote:
>
> Hello all -
>
> I finally found time to fix the axis('scaled') feature.
> It is now consistent when zooming, as requested.
> In essence, it works the same as axis('equal'), but fixes the
> lower-left-hand corner rather than the center of the
> subplot. When using axis('scaled') the _autoscaleon is
> set to False, so that axis limits will be fixed when
> features are added to the figure. You can overwrite this
> by setting it the regular way (also works for axis('equal'))
> ax.set_autoscale_on(False).
>
> My last modification is a prototype implementation of
> zooming when two axes are linked. The idea behind this
> is that when an axis is 'equal' or 'scaled' and another
> axis is linked to this axis, that when you are zooming and
> changing the size of the subplot, then the size of the
> linkes axis should change accordingly. I use this when
> I am contouring 2D horizontal data and have a vertical
> cross-section linked to the x-axis of the horizontal plot.
> When I zoom in on the horizontal plot, the length of the
> linked axis now gets changes too! Works great, actually,
> but has been implemented for linked x-axis only for now.
> It works when zooming in the horizontal data (which
> has axis 'equal'), but not yet when zooming in the
> linked vertical cross-section. Still working on it.
Hi,
yes this is a step in the right direction! IMO it would also be nice with
functionality for
zooming in/out on single clicks with the left and right button, e.g.
something like the below for backend_bases.py: (hope it is not wrapped to
death...)
Helge
<pre>
...
def release_zoom(...):
...
# single click: 5 pixels is a threshold
if abs(x-lastx)<5 or abs(y-lasty)<5:
lastx, lasty =3D a.transData.inverse_xy_tup( (lastx, lasty) )
x, y =3D a.transData.inverse_xy_tup( (x, y) )
Xmin,Xmax=3Da.get_xlim()
Ymin,Ymax=3Da.get_ylim()
if self._button_pressed =3D=3D 1:
# zoom in by 20%, make point clicked center
dx=3D(Xmax-Xmin)*0.8*0.5
dy=3D(Ymax-Ymin)*0.8*0.5
a.set_xlim((x-dx, x+dx))
a.set_ylim((y-dy, y+dy))
elif self._button_pressed =3D=3D 3:
# zoom out by 20%, make point clicked center
dx=3D(Xmax-Xmin)*1.2*0.5
dy=3D(Ymax-Ymin)*1.2*0.5
a.set_xlim((x-dx, x+dx))
a.set_ylim((y-dy, y+dy))
self.draw()
self._xypress =3D None
self._button_pressed =3D=3D None
self.push_current()
self.release(event)
return
# zoom to rect
...
</pre>
|
|
From: Steve S. <el...@gm...> - 2005-10-16 07:41:56
|
Alan G Isaac wrote: > On Fri, 14 Oct 2005, Steve Schmerler apparently wrote: > >>1.) yes, the plots are fine > > >>2.) yes, the bounding box is large enough > > >>I attached one of the .eps files I was talking about. In the printed >>.pdf where this is included the xlabel "T/K" as well as the numbers on >>the x-axis are missing. The "x"s in the legend box are also missing so >>it isn't a bb problem. > > >>I used dvipdf to convert .dvi -> .pdf (which I've learned only uses >>dvips and gs with some pdfwrite options) and not dvipdfm. Is it >>recommended to use dvipdfm over dvipdf? > > > Works fine with dvipdfm. > (Ticks and labels are visible.) > > Cheers, > Alan Isaac > (using Win2000, MiKTeX) > Thanx. When I look at the .pdf on the screen everything is fine. Only the printed version is the problem. I'll test (on Linux) if the printer likes the .pdf produced by dvipfdm more than the output of dvipdf. cheers, steve -- grep -ir fuck /usr/src/linux |
|
From: Alan G I. <ai...@am...> - 2005-10-15 18:23:32
|
On Fri, 14 Oct 2005, Steve Schmerler apparently wrote: > 1.) yes, the plots are fine > 2.) yes, the bounding box is large enough > I attached one of the .eps files I was talking about. In the printed > .pdf where this is included the xlabel "T/K" as well as the numbers on > the x-axis are missing. The "x"s in the legend box are also missing so > it isn't a bb problem. > I used dvipdf to convert .dvi -> .pdf (which I've learned only uses > dvips and gs with some pdfwrite options) and not dvipdfm. Is it > recommended to use dvipdfm over dvipdf? Works fine with dvipdfm. (Ticks and labels are visible.) Cheers, Alan Isaac (using Win2000, MiKTeX) |
|
From: Willi R. <w.r...@gm...> - 2005-10-15 15:22:51
|
Hi,
here is the script:
#!/usr/bin/python
from scipy import *
from pylab import *
MAX_TIME =3D 7000
fn_social=3D"all-avg.dat"
def readStats(fn):
q =3D [d for d in io.read_array(fn) if d[0]<=3DMAX_TIME]
print q
t=3D[s[0] for s in q]
age=3D[s[1] for s in q]
age_conf=3D[s[2] for s in q]
wp=3D[s[3] for s in q]
wp_conf=3D[s[4] for s in q]
return t, age, age_conf, wp, wp_conf
hold(True)
t, age, age_conf, wp, wp_conf =3D readStats(fn_social)
xlabel('time [s]')
ylabel('average lifetime [s]')
errorbar(t,wp,yerr=3Dwp_conf, color=3D"blue",ecolor=3D"black", mfc=3D'red',=
=20
mec=3D'green', ms=3D200, mew=3D4)
show()
Am Freitag, 14. Oktober 2005 16:05 schrieb John Hunter:
> >>>>> "Willi" =3D=3D Willi Richert <ri...@c-...> writes:
>
> Willi> Thanks, that helped! Switching to QtAgg did the trick.
> Willi> However, I have still some issues: 1) the text placement of
> Willi> the titles does not really work:
> Willi> http://wr.objectis.net/Members/Papst/Matplotlib_Problems
>
> Willi> 2) The confidence intervals are only vertical lines. I
> Willi> would like to have some small horizontal "stoppers" at the
> Willi> upper and lower point of those error bars. Is that
> Willi> possible with matplotlib?
>
>
> Could you post the script -- hard to debug in a vacuum.
>
> JDH
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
=2D-=20
Dipl.-Inform. Willi Richert
C-LAB - Cooperative Computing & Communication Laboratory
der Universit=E4t Paderborn und Siemens
=46U.323
F=FCrstenallee 11
D-33102 Paderborn
Tel: +49 52 51 60 - 61 20
Fax: +49 52 51 60 - 60 65
E-Mail: ri...@c-...
Internet: http://www.c-lab.de
|
|
From: John K. <jki...@ch...> - 2005-10-15 14:33:22
|
I am interested in creating graphs where I can interact with the data plotted in the graph. For example, suppose I plot the heat of formation of ~ 80 different alloy structures (which each have a name) against the composition of each structure. What I would like is to hold the mouse over a data point and see a balloon pop up that displays the crystal structure name, or to left click on a data point to launch a structure viewer for the structure at that point, or right click to get a menu of different options, or to press "f" to see what filename the data for that point is saved in, etc... Another example would be a graph of many lines, where each line corresponds to a structure. Then I would want to click on the lines to do various things. Sometimes the data is very dense, so it would also be nice if you could move the focus to different points by tabbing or using the arrow buttons. It would be interesting to be able to select portions of data points to do some kind of analysis on, or to modify their appearance someway, maybe change symbol the size according to atomic volume, or color according to some property, etc. Could these kinds of things be done in/with matplotlib? Or more importantly, does a framework in matplotlib exist that this kind of thing could be developed? I am interested in talking to anyone who has thoughts about this. Thanks, j |
|
From: Andrew S. <str...@as...> - 2005-10-15 00:28:04
|
Hi Jeff,
This looks great but unfortunately I get the following error:
astraw@aspiring:~/other-peoples-src/natgrid/example$ python example.py
Traceback (most recent call last):
File "example.py", line 3, in ?
import nat
File "/usr/lib/python2.3/site-packages/nat.py", line 362, in ?
import string, math, sys, Numeric, cdms, MA, natgridmodule
ImportError: No module named cdms
So I modified nat.py in the following way, and it now works. And there
was much rejoicing!
-import string, math, sys, Numeric, cdms, MA, natgridmodule
+import string, math, sys, Numeric, MA, natgridmodule
Jeff Whitaker wrote:
> Jesper Larsen wrote:
>
>> Hi matplotlib users,
>>
>> I have a long list of ungridded data that I would like to make a
>> contour plot of. The data is simply a list of (longitude, latitude,
>> datavalue) with the data value belonging the given longitude and
>> latitude. As far as I understand contour() only accepts gridded data
>> values.
>>
>> The solution is probably to interpolate the unstructured data to a
>> regular grid and then plot the data. Has anyone tried doing that or
>> know where to look for an interpolation/triangulation routine?
>>
>> Cheers,
>> Jesper
>>
>>
>>
>
> Jesper: Since this question has come up a couple of times, I decided to
> cook up an example. First you'll need to download and install the
> natgrid python module (included in CDAT, but I've separated it out from
> the huge tarball and put it at
> ftp://ftp.cdc.noaa.gov/Public/jsw/natgrid.tar.gz). Then try this:
>
>
> from RandomArray import uniform
> import pylab as p
> import nat
>
> def griddata(x,y,z,xi,yi):
> r = nat.Natgrid(y, x, yi, xi)
> return r.rgrd(z)
>
> npts = 500
> x = uniform(-2,2,npts); y = uniform(-2,2,npts)
> z = x*p.exp(-x**2-y**2)
>
> # x, y, and z are now vectors containing nonuniformly sampled data.
> # Define a regular grid and grid data to it.
> nx = 51; ny = 41
> x1 = p.linspace(-2,2,nx)
> y1 = p.linspace(-2,2,ny)
> xi, yi = p.meshgrid(x1, y1)
> zi = griddata(x,y,z,x1,y1)
>
> # Contour the gridded data, plotting dots at the nonuniform data points.
> CS = p.contour(xi,yi,zi,15,linewidths=0.5,colors=['k'])
> CS = p.contourf(xi,yi,zi,15,cmap=p.cm.jet)
> p.scatter(x,y,marker='o',c='b',s=5)
> p.xlim(-2,2)
> p.ylim(-2,2)
> p.show()
>
>
>
> It's interesting to see what happens when you vary npts (from 50 to 1000).
>
> HTH,
>
> -Jeff
>
|
|
From: Jeff W. <js...@fa...> - 2005-10-14 23:10:36
|
Jesper Larsen wrote: >Hi matplotlib users, > >I have a long list of ungridded data that I would like to make a contour plot >of. The data is simply a list of (longitude, latitude, datavalue) with the >data value belonging the given longitude and latitude. As far as I understand >contour() only accepts gridded data values. > >The solution is probably to interpolate the unstructured data to a regular >grid and then plot the data. Has anyone tried doing that or know where to >look for an interpolation/triangulation routine? > >Cheers, >Jesper > > > Jesper: Since this question has come up a couple of times, I decided to cook up an example. First you'll need to download and install the natgrid python module (included in CDAT, but I've separated it out from the huge tarball and put it at ftp://ftp.cdc.noaa.gov/Public/jsw/natgrid.tar.gz). Then try this: from RandomArray import uniform import pylab as p import nat def griddata(x,y,z,xi,yi): r = nat.Natgrid(y, x, yi, xi) return r.rgrd(z) npts = 500 x = uniform(-2,2,npts); y = uniform(-2,2,npts) z = x*p.exp(-x**2-y**2) # x, y, and z are now vectors containing nonuniformly sampled data. # Define a regular grid and grid data to it. nx = 51; ny = 41 x1 = p.linspace(-2,2,nx) y1 = p.linspace(-2,2,ny) xi, yi = p.meshgrid(x1, y1) zi = griddata(x,y,z,x1,y1) # Contour the gridded data, plotting dots at the nonuniform data points. CS = p.contour(xi,yi,zi,15,linewidths=0.5,colors=['k']) CS = p.contourf(xi,yi,zi,15,cmap=p.cm.jet) p.scatter(x,y,marker='o',c='b',s=5) p.xlim(-2,2) p.ylim(-2,2) p.show() It's interesting to see what happens when you vary npts (from 50 to 1000). HTH, -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: Mark B. <ma...@gm...> - 2005-10-14 20:59:34
|
Hello all -
I finally found time to fix the axis('scaled') feature.
It is now consistent when zooming, as requested.
In essence, it works the same as axis('equal'), but fixes the
lower-left-hand corner rather than the center of the
subplot. When using axis('scaled') the _autoscaleon is
set to False, so that axis limits will be fixed when
features are added to the figure. You can overwrite this
by setting it the regular way (also works for axis('equal'))
ax.set_autoscale_on(False).
My last modification is a prototype implementation of
zooming when two axes are linked. The idea behind this
is that when an axis is 'equal' or 'scaled' and another
axis is linked to this axis, that when you are zooming and
changing the size of the subplot, then the size of the
linkes axis should change accordingly. I use this when
I am contouring 2D horizontal data and have a vertical
cross-section linked to the x-axis of the horizontal plot.
When I zoom in on the horizontal plot, the length of the
linked axis now gets changes too! Works great, actually,
but has been implemented for linked x-axis only for now.
It works when zooming in the horizontal data (which
has axis 'equal'), but not yet when zooming in the
linked vertical cross-section. Still working on it.
Anyway, I modified 3 files, which I submitted on the patches
page. If anybody is interested, download these and let me
know what you think. I presume they'll get implemented in
CVS when John or others find the time to do so.
Mark
|
|
From: John H. <jdh...@ac...> - 2005-10-14 20:38:36
|
>>>>> "Mark" == Mark Bakker <ma...@gm...> writes:
Mark> Was this a joke? I have made a plot and tried pretty much
Mark> any combination of funky keys plus an f to get it to full
Mark> screen, but no go. Any hint? Thanks, Mark
GTK* only -- if you know how to do full screen mode for your GUI of
choice, please add it and send in the patch
You will need to define
self.full_screen_toggle()
for your figure manager of choice.
JDH
Mark> Message: 5 From: Vidar Gundersen <vid...@37...> To:
Mark> mat...@li... Date: Thu, 13 Oct
Mark> 2005 18:06:52 +0200 Subject: [Matplotlib-users] shortcut
Mark> keys and right-click menu
Mark> as an addition to the toolbar (or as an alternative for
Mark> users who want to turn it off), i think shortcut keys and a
Mark> right-click menu for the figure window would be a useful
Mark> addition to mpl.
Mark> some suggested shortcut keys, (ctrl+)s = save as... z =
Mark> zoom to rectangle p = pan (and zoom) alt+right arrow,
Mark> backspace = back alt+left arrow = forward esc, ctrl+w =
Mark> close figure window
Mark> we already have the neat f for fullscreen.
Mark> ------------------------------------------------------- This
Mark> SF.Net email is sponsored by: Power Architecture Resource
Mark> Center: Free content, downloads, discussions, and
Mark> more. http://solutions.newsforge.com/ibmarch.tmpl
Mark> _______________________________________________
Mark> Matplotlib-users mailing list
Mark> Mat...@li...
Mark> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Mark B. <ma...@gm...> - 2005-10-14 20:19:48
|
Was this a joke? I have made a plot and tried pretty much any combination of funky keys plus an f to get it to full screen, but no go. Any hint? Thanks, Mark Message: 5 From: Vidar Gundersen <vid...@37...> To: mat...@li... Date: Thu, 13 Oct 2005 18:06:52 +0200 Subject: [Matplotlib-users] shortcut keys and right-click menu as an addition to the toolbar (or as an alternative for users who want to turn it off), i think shortcut keys and a right-click menu for the figure window would be a useful addition to mpl. some suggested shortcut keys, (ctrl+)s =3D save as... z =3D zoom to rectangle p =3D pan (and zoom) alt+right arrow, backspace =3D back alt+left arrow =3D forward esc, ctrl+w =3D close figure window we already have the neat f for fullscreen. |
|
From: John H. <jdh...@ac...> - 2005-10-14 17:41:07
|
>>>>> "John" == John Hunter <jdh...@ac...> writes:
if event.key=='left' and event.modifier=='alt':
blah
That isn't the right approach, actually, because it doesn't support
multiple modifiers. I think the better approach is to add attributes
alt, ctrl and shift which are booleans, eg one would do
if event.alt and event.key=='x' :
blah
or
if event.alt and event.ctrl and event.key=='x' :
blah
JDH
|
|
From: John H. <jdh...@ac...> - 2005-10-14 17:29:14
|
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
Charlie> One note, I believe modifier keys aren't supported in a
Charlie> natural way right now, so to catch "ctrl+s" for example
Charlie> could be a pain. Just pressing "ctrl" would generate an
Charlie> event. All the modifiers states would have to be
Charlie> maintained manually, I believe.
Good point. The first thing to be done is to add support for this in
the key event itself, by modifying FigureCanvasBase to track the state
of the modifier keys and add a modifier attr to the KeyEvent, so one
could do, eg
if event.key=='left' and event.modifier=='alt':
blah
Basically, you would want to add some state vars (_inalt, _inctrl,
_inshift) to FigureCanvasBase, and monitor event.key in
FigureCanvasBase.key_press_event and
FigureCanvasBase.key_release_event. I would add a new kwarg to
KeyEvent like modifier=None that would be overrridden depending on the
_in* attrs.
Any takers on this one?
JDH
|
|
From: Jeff W. <js...@fa...> - 2005-10-14 17:27:47
|
Jesper Larsen wrote: >Hi matplotlib users, > >I have a long list of ungridded data that I would like to make a contour plot >of. The data is simply a list of (longitude, latitude, datavalue) with the >data value belonging the given longitude and latitude. As far as I understand >contour() only accepts gridded data values. > >The solution is probably to interpolate the unstructured data to a regular >grid and then plot the data. Has anyone tried doing that or know where to >look for an interpolation/triangulation routine? > >Cheers, >Jesper > > > > Jesper: I've had good luck with the natgrid package in CDAT (http://cdat.sf.net). It will grid unstructured data for you. You can install it without installing the rest of CDAT, just go to the contrib/natgrid directory and run setup.py install. -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: Charlie M. <cw...@gm...> - 2005-10-14 17:20:18
|
In backend_bases.FigureManagerBase you can see how the full_screen_toggle event is added and handled. 'f', 'l', and 'g' seem reserved right now. One note, I believe modifier keys aren't supported in a natural way right now, so to catch "ctrl+s" for example could be a pain. Just pressing "ctrl" would generate an event. All the modifiers states would have to be maintained manually, I believe. My two cents, - Charlie On 10/14/05, Erik Curiel <ec...@ke...> wrote: > > > some suggested shortcut keys, > > (ctrl+)s =3D save as... > > z =3D zoom to rectangle > > p =3D pan (and zoom) > > alt+right arrow, backspace =3D back > > alt+left arrow =3D forward > > esc, ctrl+w =3D close figure window > > > > we already have the neat f for fullscreen. > > That's a great idea! If this were implemented, I'd like to see a set of > emacs-like key-bindings. Heck, if someone points me to the right place i= n > the code, I'll do it myself. > > E > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: John H. <jdh...@ac...> - 2005-10-14 17:10:38
|
>>>>> "Erik" == Erik Curiel <ec...@ke...> writes:
>> some suggested shortcut keys, (ctrl+)s = save as... z = zoom
>> to rectangle p = pan (and zoom) alt+right arrow, backspace =
>> back alt+left arrow = forward esc, ctrl+w = close figure window
>>
>> we already have the neat f for fullscreen.
Erik> That's a great idea! If this were implemented, I'd like to
Erik> see a set of emacs-like key-bindings. Heck, if someone
Erik> points me to the right place in the code, I'll do it myself.
Never one to turn down free help...
The code is lib/matplotlib/backend_bases.py in FigureManagerBase.key_press
def key_press(self, event):
# these bindings happen whether you are over an axes or not
#if event.key == 'q':
# self.destroy() # how cruel to have to destroy oneself!
# return
if event.key == 'f':
self.full_screen_toggle()
if event.inaxes is None:
return
# the mouse has to be over an axes to trigger these
if event.key == 'g':
event.inaxes.grid()
self.canvas.draw()
elif event.key == 'l':
event.inaxes.toggle_log_lineary()
self.canvas.draw()
Some events like 'f' are applicable anywhere in the figure and some
are only appropriate over and axes. event.inaxes is the axes the
event occurs over, or none.
If you want to simulate clicking the toolbar, you need to call the
appropriate toolbar method. The class NavigationToolbar2 is in the
same module, eg toolbar.home(), toolbar.press_zoom(event). For funcs
that need an event, you should just be able to pass in the key event
you get in key_press.
You can access the toolbar as self.toolbar, where self is the
FigureManager instance.
Have fun!
JDH
|
|
From: Erik C. <ec...@ke...> - 2005-10-14 16:56:01
|
> some suggested shortcut keys, > (ctrl+)s = save as... > z = zoom to rectangle > p = pan (and zoom) > alt+right arrow, backspace = back > alt+left arrow = forward > esc, ctrl+w = close figure window > > we already have the neat f for fullscreen. That's a great idea! If this were implemented, I'd like to see a set of emacs-like key-bindings. Heck, if someone points me to the right place in the code, I'll do it myself. E |
|
From: Jesper L. <jl...@dm...> - 2005-10-14 16:38:08
|
Hi matplotlib users, I have a long list of ungridded data that I would like to make a contour plot of. The data is simply a list of (longitude, latitude, datavalue) with the data value belonging the given longitude and latitude. As far as I understand contour() only accepts gridded data values. The solution is probably to interpolate the unstructured data to a regular grid and then plot the data. Has anyone tried doing that or know where to look for an interpolation/triangulation routine? Cheers, Jesper |
|
From: Randewijk P-J, M. <pjr...@su...> - 2005-10-14 15:25:44
|
Dear matplotlib XP users,
I am battling with matplotlib and LaTeX for text handeling.
I am running Windows XP, python 2.3.5, matplotlib-0.83.2. ... and
MiKTeX...
With the WXAgg backend I don't see any text at all in any window, with:
text.usetex : True =20
In my matplotlibrc file...
With PS backend with no show() line and a savefig(epsfilename) line, I
got the following error:
...
IOError: [Errno 2] No such file or directory:
'890ab9460a8ecc8327114aa4d5689212.eps'
I changed line 1097 in backend_ps.py to read:
command =3D 'gswin32c -dBATCH -dNOPAUSE -dSAFER -r%d \
instead of:
command =3D 'gs -dBATCH -dNOPAUSE -dSAFER -r%d \
Now at leas it writes the eps file, but GSView gives the following
error:
Unrecoverable error: configurationerror in setpagedevice
Operand stack:
false --nostringval--
Failed to open device or install ViewerPreProcess hook: returns -26
I then tried to see if savefig(psfilename) would work, but now I get the
error:
IOError: [Errno 2] No such file or directory:
'5cdf9668d6b377717ccafe1ddfbafb10.ps'
Probable indicating an error with the 'dvips' command... ?
Any ideas on what to do... I'll leave it till Monday morning...
Kind regards and enjoy the weekend
Peter-Jan Randewijk
Senior Lektor - Drywingselektronika & Elektriese Aandrywing =20
=20
-oOOOOOOOOOOOOOOOOOOOOOOOOOOo-=20
Departement E&E. Ingenieurswese - E313
Universiteit Stellenbosch=20
Privaatsak X1=20
Matieland, 7603
Suid-Afrika
Tel: +27 (0) 21 808 4457 (w)=20
Faks: +27 (0) 21 808 3951 (w)=20
Tel: +27 (0) 21 883 8592 (h)=20
Sel: +27 (0) 83 556 5809 (h)
Epos: pjr...@su... (w)
-oOOOOOOOOOOOOOOOOOOOOOOOOOOo-=20
|
|
From: John H. <jdh...@ac...> - 2005-10-14 14:08:28
|
>>>>> "Willi" == Willi Richert <ri...@c-...> writes:
Willi> Thanks, that helped! Switching to QtAgg did the trick.
Willi> However, I have still some issues: 1) the text placement of
Willi> the titles does not really work:
Willi> http://wr.objectis.net/Members/Papst/Matplotlib_Problems
Willi> 2) The confidence intervals are only vertical lines. I
Willi> would like to have some small horizontal "stoppers" at the
Willi> upper and lower point of those error bars. Is that
Willi> possible with matplotlib?
Could you post the script -- hard to debug in a vacuum.
JDH
|