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
(20) |
2
(8) |
|
3
(2) |
4
(7) |
5
(17) |
6
(20) |
7
(17) |
8
(18) |
9
(7) |
|
10
(4) |
11
(9) |
12
(20) |
13
(20) |
14
(17) |
15
(8) |
16
(2) |
|
17
(4) |
18
(4) |
19
(13) |
20
(4) |
21
(16) |
22
(9) |
23
(1) |
|
24
(5) |
25
(8) |
26
(13) |
27
(25) |
28
(25) |
29
(14) |
30
(10) |
|
31
(1) |
|
|
|
|
|
|
|
From: Niklas V. <Mit...@we...> - 2005-07-21 12:50:19
|
Hello Philippe, kal...@wa... schrieb am 21.07.05 10:45:39: > > Hi list, > > I read the faq about matplotlib OO and try to study deeper the process. > I'm not sure how i can redraw easily a figure. > Firs time, the matplotlib.figure is created, its reference is saved in a > list and i attach it to a > 'matplotlib.backends.backend_gtkagg.FigureCanvasGTKAgg' then i display > the FigureCanvasGTKAgg in a notebook. > > 1. Is the matplotlib.figure enough to get all the parameters of the > figure (i.e: axes, title, label, artist)? Or must i use another object? The Figure object is the one you want, yes. To retrieve the list of axes, use 'figure.axes'. You can then manipulate the axes whichever way you like. The Canvas is a gtk drawing area that you can use as you would with any other gtk widget. You can put it in a scrolled window, you can hide it, you can resize it, ... > 2. Must i reattach the figure to a new > matplotlib.backends.backend_gtkagg.FigureCanvasGTKAgg or the old one has > the capacity to redraw()? To redraw the canvas, use 'canvas.draw()'. > 3. i'm using gtk in all my application, is it better to use gtkAgg or > gtk for speed issues? I don't really know, I have only used Gtk so far. Regards, Niklas. ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 |
|
From: <phi...@ho...> - 2005-07-21 08:44:25
|
Hi list, I read the faq about matplotlib OO and try to study deeper the process. I'm not sure how i can redraw easily a figure. Firs time, the matplotlib.figure is created, its reference is saved in a list and i attach it to a 'matplotlib.backends.backend_gtkagg.FigureCanvasGTKAgg' then i display the FigureCanvasGTKAgg in a notebook. 1. Is the matplotlib.figure enough to get all the parameters of the figure (i.e: axes, title, label, artist)? Or must i use another object? 2. Must i reattach the figure to a new matplotlib.backends.backend_gtkagg.FigureCanvasGTKAgg or the old one has the capacity to redraw()? 3. i'm using gtk in all my application, is it better to use gtkAgg or gtk for speed issues? Thanks a lot for your answers. Philippe Collet |
|
From: Darren D. <dd...@co...> - 2005-07-20 20:28:02
|
On Wednesday 20 July 2005 03:42 pm, Jeff Peery wrote: > Hello, I;m not sure how to access the tick attributes listed below. I > tried the following: > > #turn off ticks > xticks = axes.xaxis.get_major_ticks() > xticks.tick1On = False > xticks.tick2On = False > > this doesn't seem to work. How do I access these attributes? Thanks. xticks is a list. you'll need to do something like xticks = axes.xaxis.get_major_ticks() for tick in xticks: tick.tick1On = False tick.tick2On = False -- Darren |
|
From: Jeff P. <jef...@se...> - 2005-07-20 19:42:44
|
Hello, I;m not sure how to access the tick attributes listed below. I
tried the following:
#turn off ticks
xticks = axes.xaxis.get_major_ticks()
xticks.tick1On = False
xticks.tick2On = False
this doesn't seem to work. How do I access these attributes? Thanks.
Jeff
-----Original Message-----
From: John Hunter [mailto:jdh...@ni...]
Sent: Thursday, July 14, 2005 11:12 AM
To: Jeff Peery
Cc: mat...@li...
Subject: Re: [Matplotlib-users] transparent symbols
>>>>> "Jeff" == Jeff Peery <jef...@se...> writes:
Jeff> Great thank you. One more question. I also want to change
Jeff> the tick mark attributes like color, fontsize, rotation
Jeff> etc. I used these lines of code:
axesA.set_yticklabels(axesA.get_xticklabels(), rotation=0, ....
^ ^
Not your question, but are you mixing up x and y here?
Jeff> I get an error because get_ticklabels() returns an instance
Jeff> of label strings, not the strings themselves. How can I
Jeff> convert these into a useful string so the above code works?
Jeff> Or is there a better way to do this?
There are several ways to customize these properties. One way is to
get a list of ticks and then customize them
xticks = ax.xaxis.get_major_ticks()
labels = [xtick.label1 for xtick in xticks]
lines = [xtick.tick1line for xtick in xticks]
setp(lines, linewidth=2)
setp(labels, color='red', fontsize=20)
The Tick instances have the following attributes, as detailed here
http://matplotlib.sourceforge.net/matplotlib.axis.html#Tick
tick1line : a Line2D instance
tick2line : a Line2D instance
gridline : a Line2D instance
label1 : a Text instance
label2 : a Text instance
gridOn : a boolean which determines whether to draw the
tickline
tick1On : a boolean which determines whether to draw the 1st
tickline
tick2On : a boolean which determines whether to draw the 2nd
tickline
label1On : a boolean which determines whether to draw tick label
label2On : a boolean which determines whether to draw tick label
JDH
|
|
From: Jeff P. <jef...@se...> - 2005-07-20 15:57:04
|
Hello, Was wondering if it is possible to rotate a histogram 90 degrees? How do I do this? Also I want to change the labels and fontsize and things of my tick labels. I'm using the backend WXAgg and I'm using pylab.setp to set the tick attributes. Is this an ok thing to do? I was under the impression that if I'm using a backend like WXAgg that I want to stay away from pylab because it has its own interface? Is this true? If it is true is there something like setp for WXAgg? Thanks!! Jeff _____ Jeffrey Thomas Peery SeaMetrics, Inc. Mechanical Engineer Jef...@Se... 253.872.0285 (fax) 253.872.0284 (phone) _____ |
|
From: Niklas V. <Mit...@we...> - 2005-07-20 09:39:05
|
Hello everyone,
I just upgraded my matplotlib from 0.80 to to 0.83.1 and discovered a bug in the GTK backend. To be specific, the following code, beginning by line 171 in backend_gtk.py, is the problem:
def motion_notify_event(self, widget, event):
if event.is_hint:
x, y, state = event.window.get_pointer()
else:
x = event.x
y = event.y
state = event.state
# flipy so y=0 is bottom of canvas
y = self.figure.bbox.height() - y
if state:
FigureCanvasBase.motion_notify_event(self, x, y)
return True
Due to the 'if state' clause, the Canvas will only receive the 'motion_notify_event' if at the same time the mouse button is pressed. This has not been the case in previous version of matplotlib. There is e.g. no such distinction in backend_qt.py.
Regards,
Niklas Volbers.
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201
|
|
From: Alan G I. <ai...@am...> - 2005-07-19 22:12:16
|
I just want to see my figure displayed in a Tkinter window, without using pylab, with no extras. No other goals right now. Is http://matplotlib.sourceforge.net/examples/embedding_in_tk.py essentially a *minimal* example of how to do this? (Aside from the title and toolbar stuff.) This is a completely naive question. E.g., choice of backend never implies that we can avoid explicitly embedding, as this example illustrates, right? Thanks, Alan Isaac PS What happened to the object oriented "intro" that was linked from the Matplotlib page for awhile? Or did I just overlook it? |
|
From: Woodrow S. <re...@gm...> - 2005-07-19 21:51:56
|
I have image data 2d array with values that spans several decades. It would be extremely useful for me to be able to plot this data with imshow using a colorbar/color scale that is logarithmic. In the past I have just taken the log of the data, but that solution is not really acceptable for me. Any suggestions would be welcome. Perhaps someone could give me a idea on how to modify matplotlib to have this functionality. Thanks. R Kuehn |
|
From: Jeff W. <js...@fa...> - 2005-07-19 21:17:56
|
Eric Emsellem wrote: > Hi, > > I know this may be a question for scipy or numarray but since > matplotlib is using something close to what I wish to have..., here is > the question: > > - I would like to use some 2D interpolation of a set of x, y, z points > (not regularly positioned). If possible I would like to test various > interpolation schemes (bilinear, splines, etc), and have a FLAG to > tell me if I am trying to EXTRAPOLATE (so that I can control the > output). I looked at scipy but this is really bad: as far as I > understand the doc mentions that it takes 1D array (what I want), but > in fact works on 2D arrays (NOT what I want).... (and it only provides > splines) > > I know that imshow has this built in with many different options for > the visualisation. So how is this done? Is it hard coded in one of the > matplotlib routine ? Could not find it there... > > thanks for the help > > Eric Emsellem > Eric: There are a couple of modules in CDAT (http://cdat.sf.net) to do this. See http://rainbow.llnl.gov/software/cdat/support/cdat_utilities/cdat_utilities-3.php Look for the 'ngmath' module. I've found that ngmath.natgrid works quite well. Here's a quick description from the docstring: "natgrid - a two-dimensional random data interpolation package based on Dave Watson's nngridr." -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: Chris B. <Chr...@no...> - 2005-07-19 20:48:25
|
Andrew Straw wrote: > You have at least 2 general approaches: Delaunay triangulation and > splines. Straight Delaunay triangulation would be linear interpolation, > but can be embellished with fancier interpolation techniques. As far as > I know, Delaunay triangulation and associated interpolation routines are > not (yet) available in scipy. I don't think they are. I've been planning to write python wrappers for Jonathan Shewchuk's triangle code, but if someone wanted to beat me to it.... http://www-2.cs.cmu.edu/~quake/triangle.html > Surface splines are available in scipy -- > check out bisplrep/bisplev. Can you do surface splines with irregularly spaced points? > The > contour routines are more sophisticated and may be useful to you, but I > haven't followed how they work. I'm pretty sure they require regularly spaced points as well. Or at least "logically Cartesian" points. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Peter G. <pgr...@ge...> - 2005-07-19 18:08:41
|
I do this in python/matplotlib using hardy's multiquadric interpolation.... I've posted here before promising to attach some code, but haven't done so yet, since really need to clean things up a little. Will try to get it done on my 10 hour flight tonight... and post within the next few days... Cheers, Peter Eric Emsellem wrote: > Hi > thanks for the input, however scipy interpolation scheme is on a > regular grid. > > The positions I have are not even on an ORTHOGONAL grid: they are > randomly distributed! > So I have a set of x,y random positions with Z values and I wish to > know the interpolated value > at a new position xnew, ynew... > > It seems that this does not exist in scipy. Someone pointed out > Scientific Python but this again does not work > (using irregular but orthogonal grids)... > > This would be pretty bad if I cannot do this in python!!! > > Any help welcome! > > Cheers > Eric > > Eric Emsellem wrote: > >> Hi, >> >> I know this may be a question for scipy or numarray but since >> matplotlib is using something close to what I wish to have..., here >> is the question: >> >> - I would like to use some 2D interpolation of a set of x, y, z >> points (not regularly positioned). If possible I would like to test >> various interpolation schemes (bilinear, splines, etc), and have a >> FLAG to tell me if I am trying to EXTRAPOLATE (so that I can control >> the output). I looked at scipy but this is really bad: as far as I >> understand the doc mentions that it takes 1D array (what I want), but >> in fact works on 2D arrays (NOT what I want).... (and it only >> provides splines) >> >> I know that imshow has this built in with many different options for >> the visualisation. So how is this done? Is it hard coded in one of >> the matplotlib routine ? Could not find it there... >> >> thanks for the help >> >> Eric Emsellem >> >> On Jul 19, 2005, at 2:17 AM, Eric Emsellem wrote: >> >> > - I would like to use some 2D interpolation of a set of x, y, z >> points > (not regularly positioned). If possible I would like to test >> various > interpolation schemes (bilinear, splines, etc), and have a >> FLAG to > tell me if I am trying to EXTRAPOLATE (so that I can >> control the > output). I looked at scipy but this is really bad: as >> far as I > understand the doc mentions that it takes 1D array (what I >> want), but > in fact works on 2D arrays (NOT what I want).... (and it >> only provides > splines) >> >> You have at least 2 general approaches: Delaunay triangulation and >> splines. Straight Delaunay triangulation would be linear >> interpolation, but can be embellished with fancier interpolation >> techniques. As far as I know, Delaunay triangulation and associated >> interpolation routines are not (yet) available in scipy. Surface >> splines are available in scipy -- check out bisplrep/bisplev. >> >> As far as a FLAG to tell if you want to EXTRAPOLATE, I don"t know. >> They may not be in ALL CAPS, either, so read the fine print. :) >> >> > I know that imshow has this built in with many different options >> for > the visualisation. So how is this done? Is it hard coded in one >> of the > matplotlib routine ? Could not find it there... >> >> I don"t think imshow does anything as fancy as what you suggest. The >> contour routines are more sophisticated and may be useful to you, but >> I haven"t followed how they work. >> >> >> > -- Peter Groszkowski Gemini Observatory Tel: +1 808 9742509 670 N. A'ohoku Place Fax: +1 808 9359235 Hilo, Hawai'i 96720, USA |
|
From: Eric E. <ems...@ob...> - 2005-07-19 16:46:01
|
Hi thanks for the input, however scipy interpolation scheme is on a regular grid. The positions I have are not even on an ORTHOGONAL grid: they are randomly distributed! So I have a set of x,y random positions with Z values and I wish to know the interpolated value at a new position xnew, ynew... It seems that this does not exist in scipy. Someone pointed out Scientific Python but this again does not work (using irregular but orthogonal grids)... This would be pretty bad if I cannot do this in python!!! Any help welcome! Cheers Eric Eric Emsellem wrote: > Hi, > > I know this may be a question for scipy or numarray but since > matplotlib is using something close to what I wish to have..., here is > the question: > > - I would like to use some 2D interpolation of a set of x, y, z points > (not regularly positioned). If possible I would like to test various > interpolation schemes (bilinear, splines, etc), and have a FLAG to > tell me if I am trying to EXTRAPOLATE (so that I can control the > output). I looked at scipy but this is really bad: as far as I > understand the doc mentions that it takes 1D array (what I want), but > in fact works on 2D arrays (NOT what I want).... (and it only provides > splines) > > I know that imshow has this built in with many different options for > the visualisation. So how is this done? Is it hard coded in one of the > matplotlib routine ? Could not find it there... > > thanks for the help > > Eric Emsellem > >On Jul 19, 2005, at 2:17 AM, Eric Emsellem wrote: > > > - I would like to use some 2D interpolation of a set of x, y, z points > > (not regularly positioned). If possible I would like to test various > > interpolation schemes (bilinear, splines, etc), and have a FLAG to > > tell me if I am trying to EXTRAPOLATE (so that I can control the > > output). I looked at scipy but this is really bad: as far as I > > understand the doc mentions that it takes 1D array (what I want), but > > in fact works on 2D arrays (NOT what I want).... (and it only provides > > splines) > > You have at least 2 general approaches: Delaunay triangulation and > splines. Straight Delaunay triangulation would be linear interpolation, > but can be embellished with fancier interpolation techniques. As far > as I know, Delaunay triangulation and associated interpolation routines > are not (yet) available in scipy. Surface splines are available in > scipy -- check out bisplrep/bisplev. > > As far as a FLAG to tell if you want to EXTRAPOLATE, I don"t know. > They may not be in ALL CAPS, either, so read the fine print. :) > > > I know that imshow has this built in with many different options for > > the visualisation. So how is this done? Is it hard coded in one of the > > matplotlib routine ? Could not find it there... > > I don"t think imshow does anything as fancy as what you suggest. The > contour routines are more sophisticated and may be useful to you, but I > haven"t followed how they work. > > > -- =============================================================== 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: Ted D. <ted...@jp...> - 2005-07-19 16:26:07
|
We have several users that routinely plot data sets that "wrap" around an
axis. For example:
- An angle data set that is angle as a function of time. The y axis would
be from 0 to 360.
- Any quantity that is a function of hour of the data. The X axis would go
from 0 to 24.
In both of these cases they want to create a line plot but they don't want
to have the extra line that shoots across the plot when the data
wraps. For example, assume you have the angle data set like this:
import pylab as p
x = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
y = []
for i in x:
y.append( ( 23 + 75*i ) % 360 )
p.plot( x, y )
p.ylim( [ 0, 360 ] )
p.show()
It would be nice if this data could somehow be automatically transformed to
wrap correctly. Ideally, two extra points are inserted for every
"wrapping" that are linearly interpolated to fall directly on the axis
bounds. So the correct plot would look like this (this is terrible way to
generate it but at least you can see what it should look like):
x1 = [ 0, 1, 2, 3, 4, 4.507 ]
x2 = [ 4.507, 5, 6, 7, 8, 9 ]
y1, y2 = [], []
for i in x1:
y1.append( ( 23 + 75*i ) )
for i in x2:
y2.append( ( 23 + 75*i ) %360 )
p.plot( x1, y1 )
p.plot( x2, y2 )
p.ylim( [ 0, 360 ] )
p.show()
In ideal world it would be nice if this could be done automatically. Of
course this does require some hueristic checking to decide if a point is
actually crossing the wrap around value or actually moving away from the
previous point. Does anyone have any thoughts on this or has anyone set up
something like this before?
Ted
|
|
From: Andrew S. <str...@as...> - 2005-07-19 15:59:10
|
On Jul 19, 2005, at 2:17 AM, Eric Emsellem wrote: > - I would like to use some 2D interpolation of a set of x, y, z points > (not regularly positioned). If possible I would like to test various > interpolation schemes (bilinear, splines, etc), and have a FLAG to > tell me if I am trying to EXTRAPOLATE (so that I can control the > output). I looked at scipy but this is really bad: as far as I > understand the doc mentions that it takes 1D array (what I want), but > in fact works on 2D arrays (NOT what I want).... (and it only provides > splines) You have at least 2 general approaches: Delaunay triangulation and splines. Straight Delaunay triangulation would be linear interpolation, but can be embellished with fancier interpolation techniques. As far as I know, Delaunay triangulation and associated interpolation routines are not (yet) available in scipy. Surface splines are available in scipy -- check out bisplrep/bisplev. As far as a FLAG to tell if you want to EXTRAPOLATE, I don't know. They may not be in ALL CAPS, either, so read the fine print. :) > I know that imshow has this built in with many different options for > the visualisation. So how is this done? Is it hard coded in one of the > matplotlib routine ? Could not find it there... I don't think imshow does anything as fancy as what you suggest. The contour routines are more sophisticated and may be useful to you, but I haven't followed how they work. |
|
From: Eric E. <ems...@ob...> - 2005-07-19 09:18:50
|
Hi, I know this may be a question for scipy or numarray but since matplotlib is using something close to what I wish to have..., here is the question: - I would like to use some 2D interpolation of a set of x, y, z points (not regularly positioned). If possible I would like to test various interpolation schemes (bilinear, splines, etc), and have a FLAG to tell me if I am trying to EXTRAPOLATE (so that I can control the output). I looked at scipy but this is really bad: as far as I understand the doc mentions that it takes 1D array (what I want), but in fact works on 2D arrays (NOT what I want).... (and it only provides splines) I know that imshow has this built in with many different options for the visualisation. So how is this done? Is it hard coded in one of the matplotlib routine ? Could not find it there... thanks for the help Eric Emsellem -- =============================================================== 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: Mark E. <ma...@st...> - 2005-07-19 05:48:27
|
I am trying to contour some data plots, and am running into an
exception (it's a divide by zero problem, but I don't see how it's
coming about). I read in a 3D grid then plot 2D slices of it. The
program works for about 5 slices, then throws the exception. My
relevant code is:
figure()
im = imshow(gridslice, interpolation='bicubic', origin='lower',\
cmap=cm.hot, extent=dims, vmin = min_val, vmax = max_val,
alpha=1)
levels, colls = contour(gridslice, \
arange(min_val,max_val, (max_val-min_val)/5),\
origin='lower', linewidths=3, alpha = 1, extent=dims)
clabel(colls, levels, inline=1, fmt='%1.2f', fontsize=12)
Traceback (most recent call last):
File "./dx_slice_contours.py", line 64, in ?
MakeContours('1_my_var.dx')
File "./dx_slice_contours.py", line 56, in MakeContours
clabel(colls, levels, inline=1, fmt='%1.2f', fontsize=12)
File "/sw/lib/python2.4/site-packages/matplotlib/pylab.py", line
1737, in clabel
ret = gca().clabel(*args, **kwargs)
File "/sw/lib/python2.4/site-packages/matplotlib/axes.py", line
1245, in clabel
return self._contourLabeler.clabel(*args, **kwargs)
File "/sw/lib/python2.4/site-packages/matplotlib/contour.py", line
186, in clabel
self.inline_labels(levels, contours, colors, fslist, fmt)
File "/sw/lib/python2.4/site-packages/matplotlib/contour.py", line
399, in inline_labels
x,y, rotation, ind = self.locate_label(slc, lw)
File "/sw/lib/python2.4/site-packages/matplotlib/contour.py", line
370, in locate_label
dist = add.reduce(([(abs(s)[i]/L[i]) for i in range(xsize)]),-1)
OverflowError: math range error
I know that abs(s)[i] = is an array of zeros, L[i] = 0, and xsize = 1
at this point.
|
|
From: Matt N. <new...@ca...> - 2005-07-19 03:38:54
|
> I searched backend_wx.py and backend_wxagg.py to find wx.__version__ but > did not find it. So does that mean the wx backend does not need to use > version checking? backend_wx.py uses the new wx namespace, which only works with wx version 2.4 and higher. This block in backend_wx.py: try: import wx backend_version = wx.VERSION_STRING except: print >>sys.stderr, '...' sys.exit() is therefore an effective version filter. I suppose we could eventually _use_ the value in backend_version. --Matt |
|
From: Steve C. <ste...@ya...> - 2005-07-19 02:57:09
|
> On Fri, 2005-07-15 at 20:28 -0700, > mat...@li... wrote: > > I'm not familiar with pygtk.require(), but if it's anything like > > > > wxversion.select() > > > > Don't Get Rid of It! > > > > No matter how hard we all try, packages are not totally backward > > compatible. Having a dependency without any version info in it is the > > road to hard to identify bugs. If matplotlib has been tested only with > > certain versions of pygtk, it's quite reasonable that folks get an error > > message if they try to run it with other versions. To do otherwise would > > be like having a dynamically linked app with non-version dynamic libs. > > > > That being said, perhaps pygtk.require(), or the way it is being used, > > is not very well suited to this task. With wxversion, the select call > > must be made before any imports of wx. Thus, it should only be called in > > __main__. If you have a module (like matplotlib) that has been tested > > against certain versions, you should test for the version by checking > > wx.__version__, rather than calling wxversion.select(). The exception to > > this might be pylab for interactive use, where it is acting as the first > > importer of wx. > > > > So, my suggestion is that if pygtk.require() is causing more trouble > > than it's worth, then figure out how to use it differently, rather than > > scrapping it all together. > > > > -Chris We already check the pygtk version by using gtk.pygtk_version. pygtk.require() is more of a migration tool to help people move from pygtk 1.0 to 2.0 when they still have both versions installed on the same machine, and for some reason pygtk 1.0 is given preference in sys.path. I searched backend_wx.py and backend_wxagg.py to find wx.__version__ but did not find it. So does that mean the wx backend does not need to use version checking? Steve Send instant messages to your online friends http://au.messenger.yahoo.com |
|
From: Dev G. <dg...@gm...> - 2005-07-19 00:30:56
|
Hello, I found the following post on matplotlib-users. However, post reading the 'docstring', I'm still unable to figure it out. I don't know how to call the __call__ function in LinearSegmentedColormap in colors.py. Could someone please help me out? All I need is a one-line command that tells me how to give this beast a number between 0 and 1 and get an rgb tuple. Regards, Dev -------------------------------------------------------------- From: Perry Greenfield <perry@st...> Re: Using color in fill =20 2005-01-06 12:01 Yes, colormaps are callable so you can call the colormap with either a=20 scalar value or an array of values and what will be returned is a tuple of rgba values or=20 an array (shape =3D 4, nelements). See the docstring on __call__ for=20 LinearSegmentedColormap in colors.py =20 Perry =20 On Jan 6, 2005, at 3:18 PM, Carol Leger wrote: =20 > I am using fill to make filled polygons. I want to fill the polygons=20 > with colors that reflect data values, similar to what imshow does. > > Is there a way to extract the rgb tuples from a Colormap? This could=20 > be an array of N tuples, each tuple containing 3 0-1 floats that=20 > describe the color or three separate arrays, one each for red, green=20 > and blue. > > I made the mistake of using some non-public attributes of the class=20 > colorMap to accomplish this in a previous version of matplotlib. That= =20 > was a mistake since Colormap._red_lut, Colormap._green_lut and=20 > Colormap._blue_lut no longer exist. > > Once I have the array of tuples, I can determine which one I want and=20 > create a hex string using rgb2hex to get a color suitable for use with= =20 > fill. > > I need the flexability to make the same plot using several different=20 > color maps. > --=20 > Ms. Carol A. Leger > SRI International=09=09=09Phone: (650) 859-4114 > 333 Ravenswood Avenue G-273 > Menlo Park, CA 94025 e-mail: leger@sr... > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It"s fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Maria K. <mar...@ut...> - 2005-07-18 19:12:41
|
Hi, I am looking for a way to remove two axis lines. What I would like to have is x-axis and y-axis, but without the lines at the top or to the right. I cannot find the option where I can specify this and I'd appreciate if someone could point it out to me. Thanks, Maria Khomenko University of Toronto, Argon Team |
|
From: Andrew S. <str...@as...> - 2005-07-18 15:38:37
|
On Jul 18, 2005, at 6:24 AM, Jean-Luc Menut wrote:
> Maybe it's a mistake but I did not find an option 'log' to display a
> logarithmic view of an image like semilogy for a 2D plot.
> Is it planned to add this option ?
It already exists:
gca().set_yscale('log')
|
|
From: Jean-Luc M. <jea...@fr...> - 2005-07-18 13:24:46
|
Hello, Maybe it's a mistake but I did not find an option 'log' to display a logarithmic view of an image like semilogy for a 2D plot. Is it planned to add this option ? best regards, jean-Luc Menut |
|
From: Steve S. <el...@gm...> - 2005-07-18 13:08:03
|
Hi all When I plot the same data set with say red and blue markers, then mpl seems to mix the colors (red + blue -> purple). How can I turn this behavior off? cheers, steve |
|
From: Mark E. <ma...@st...> - 2005-07-17 08:47:00
|
After persuing the fink developer lists, I found mention that gcc 4 on OS X is incompatible with g++ 3.3. By selecting gcc 3.3 for the compile, I can get a full compile and what appears to be a working version of matplotlib (albeit with a few errors on startup regarding missing font files.) On Jul 17, 2005, at 1:14 AM, Mark Engelhardt wrote: > Hi, > > I am running into a problem both with the source available from > sourceforge and with the package distributed by fink (version > 0.83.1 of matplotlib). > > The compile fails with this command: > > g++-3.3 -L/sw/lib -bundle -undefined dynamic_lookup -L/sw/lib build/ > temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o build/ > temp.darwin-8.2.0-Power_Macintosh-2.4/src/mplutils.o build/ > temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxx_extensions.o build/ > temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxsupport.o build/ > temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/IndirectPythonInterface.o > build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxextensions.o -L/ > sw/lib/freetype219/lib -L/usr/local/lib -L/usr/lib -L/sw/lib -L/sw/ > lib -lstdc++ -lm -o build/lib.darwin-8.2.0-Power_Macintosh-2.4/ > matplotlib/_na_transforms.so > ld: /usr/lib/libstdc++.a(stdexcept.o) malformed object, illegal > reference for -dynamic code (reference to a coalesced section > (__TEXT,__textcoal_nt) from section (__TEXT,__eh_frame) relocation > entry (0)) > ld: /usr/lib/libstdc++.a(stdexcept.o) malformed object, illegal > reference for -dynamic code (reference to a coalesced section > (__TEXT,__textcoal_nt) from section (__TEXT,__eh_frame) relocation > entry (4)) > error: command 'g++-3.3' failed with exit status 1 > > I had matplotlib running just fine until I upgraded the operating > system and then did a fateful 'fink update-all'. Does anyone have > any suggestions? I have tried rebuilding the freetype library. > > I don't see older versions of matplotlib on the web site, and do > not know how to get them from fink (if that is possible), but I > wonder if moving back a version might help me. Where can I find > the source code for non up-to-date versions of matplotlib, if it is > available? I just don't know what else to try, and I know that it > used to work. > > Thanks for any help, > Mark > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Mark E. <ma...@st...> - 2005-07-17 08:14:59
|
Hi, I am running into a problem both with the source available from sourceforge and with the package distributed by fink (version 0.83.1 of matplotlib). The compile fails with this command: g++-3.3 -L/sw/lib -bundle -undefined dynamic_lookup -L/sw/lib build/ temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o build/ temp.darwin-8.2.0-Power_Macintosh-2.4/src/mplutils.o build/ temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxx_extensions.o build/ temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxsupport.o build/ temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/IndirectPythonInterface.o build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxextensions.o -L/sw/ lib/freetype219/lib -L/usr/local/lib -L/usr/lib -L/sw/lib -L/sw/lib - lstdc++ -lm -o build/lib.darwin-8.2.0-Power_Macintosh-2.4/matplotlib/ _na_transforms.so ld: /usr/lib/libstdc++.a(stdexcept.o) malformed object, illegal reference for -dynamic code (reference to a coalesced section (__TEXT,__textcoal_nt) from section (__TEXT,__eh_frame) relocation entry (0)) ld: /usr/lib/libstdc++.a(stdexcept.o) malformed object, illegal reference for -dynamic code (reference to a coalesced section (__TEXT,__textcoal_nt) from section (__TEXT,__eh_frame) relocation entry (4)) error: command 'g++-3.3' failed with exit status 1 I had matplotlib running just fine until I upgraded the operating system and then did a fateful 'fink update-all'. Does anyone have any suggestions? I have tried rebuilding the freetype library. I don't see older versions of matplotlib on the web site, and do not know how to get them from fink (if that is possible), but I wonder if moving back a version might help me. Where can I find the source code for non up-to-date versions of matplotlib, if it is available? I just don't know what else to try, and I know that it used to work. Thanks for any help, Mark |