You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(13) |
2
(3) |
|
3
(4) |
4
(24) |
5
(12) |
6
(11) |
7
(14) |
8
(17) |
9
(3) |
|
10
(5) |
11
(23) |
12
(7) |
13
(9) |
14
(17) |
15
(1) |
16
(2) |
|
17
(2) |
18
(11) |
19
(14) |
20
(9) |
21
(13) |
22
(12) |
23
(1) |
|
24
|
25
(7) |
26
(11) |
27
(20) |
28
(19) |
29
(11) |
30
(1) |
|
From: __ <red...@gm...> - 2007-06-11 13:08:06
|
Excellent. Thank you very much! On 6/10/07, Jake Emerson <jak...@on...> wrote: > > The python imaging library is pretty good for this kind of thing. > > http://www.pythonware.com/library/pil/handbook/ > > Here's an (untested) example. Hope it helps. > > Jake > > > #!/usr/bin/env python > > from pylab import scatter, save > import Image > > #get the background image, and find out how big it is > im_bg = Image.open("background.png") > bg_width, bg_height = im.size > > #make a white canvas on which to paste the background image and the > scatter plot > #this will allow you to, say, have the x- and y-axis values fall outside > of the background image's limits > im_canvas = Image.new("RGBA", (bg_width+60, bg_height+60), (255, 255, 255, > 0)) > > #create the scatter plot from x and y data with matplotlib > scatter(x, y, s=sizes, alpha=0.75) > > #save the scatter plot, and then retrieve it for use in PIL, convert to > RGBA so that alpha levels will work > #there is probably a better way to do this with gcf() or gci()... > savefig("scatter_plot.png") > im_scatter = Image.open("scatter_plot.png").convert("RGBA") > > #resize the scatter image to make it fit nice > im_scatter.resize((bg_width+10, bg_height+10)) > > #bring all of the images together by pasting them onto the white canvas, > use the overlayed image as the mask (third element) > im_canvas.paste(im_bg, (30, 30), im_bg) #play around > with the paste locations (30, 30) > im_canvas.paste(im_scatter, (10, 30), im_scatter) #these won't be > perfect the first time (10, 30) > > #save it > im_canvas.save("combo_image.png") > > > > > ------------------------------ > *From:* __ [mailto:red...@gm...] > *Sent:* Sunday, June 10, 2007 5:22 PM > *To:* mat...@li... > *Subject:* [Matplotlib-users] Simple scatter plot over an image > > Hello, > > I'm trying to plot a simple list of x/y coords over an image (.png). I can > show the image, or plot the data, but cannot find a way to layer one over > the other. I would greatly appreciate someone pointing me in the right > direction. Thanks. > |
|
From: John H. <jd...@gm...> - 2007-06-11 12:33:00
|
On 6/10/07, __ <red...@gm...> wrote: > Hello, > > I'm trying to plot a simple list of x/y coords over an image (.png). I can > show the image, or plot the data, but cannot find a way to layer one over > the other. I would greatly appreciate someone pointing me in the right Just call imshow and set the "extent" kwarg to let mpl know about the coordinates of the image, and then call scatter. See examples/image_demo2.py in the mpl src distribution, ot at http://matplotlib.sourceforge.net/examples/image_demo2.py JDH |
|
From: fred <fr...@gm...> - 2007-06-11 10:35:16
|
Hi, Please look at the short example attached showing the issue. I want to display only one contour line, with value 0.8. Obviously, the color associated with this contour line is bad (blue instead of red color). I think the reason is that the contour has its own colormap, so for only one value, the color is blue. I don't see anything about this issue in the contour help. How can I fix this ? Thanks in advance. Cheers, -- http://scipy.org/FredericPetit |
|
From: Eric F. <ef...@ha...> - 2007-06-11 07:37:10
|
nappie74 wrote: > > > nappie74 wrote: >> Hi, >> I'm new in matplolib code, >> I have matrix of winds vectors > > Hi, thanks, yes infact wind barbs it's difficult to plot with quiver I have > to coding something appropiate. > So ,just I HAVE FOR THE MOMENT TO PLOT ONLY A LEGEND with one wind vector > that have a lenght autoscaled like quiver: this vector is for example 5 m/s > and for the other vectors everyone can make an idea of intensity. the legend > facilty make this or is there an other way in quiver commands. > --Pie > In the mpl examples directory look at quiver_demo.py, which illustrates the quiverkey function. Eric |
|
From: Matthias M. <Mat...@gm...> - 2007-06-11 07:26:17
|
Hello darkside,
the below example seems to do the job.
The problem with x, y = event.xdata, event.ydata could be due to a
local-global-variable issue (solution: define x, y with keyword global,
i.e. "global x, y" in your function 'click' [ -> they become global
variables] to change their values in this function and use them in the main
program, too).
best regards,
Matthias
>----------------------------------------------------------------------------------------------------------
import pylab
from matplotlib.widgets import Cursor
datax=[]
datay =[]
def click(event):
if event.button == 1:
if event.inaxes:
print 'data coords: ', event.xdata, event.ydata
datax.append(event.xdata)
datay.append(event.ydata)
# disconnect the connection with id 'cid' after the first run of
# this part
pylab.disconnect(cid)
if event.button == 3:
# only possible before the first run of the upper
# part ' if event.button == 1'
pylab.close()
return datax,datay
fig = pylab.figure(figsize=(8,6))
ax = fig.add_subplot(111)
ax.plot(pylab.arange(10))
cursor = Cursor(ax, useblit=False, color='red', linewidth=2)
cursor.horizOn = False
# connection with id 'cid'
cid = pylab.connect('button_press_event', click)
pylab.show()
print 'los arrays de data son: ', datax,datay
>-----------------------------------------------------------------------------------------------------
On Sunday 10 June 2007 04:54, darkside wrote:
> Hello,
> I've tried your idea, but it doesn't work.
> If I put:
> ----------------------
> datax=[]
> datay =[]
>
>
> def click(event):
>
> if event.button == 1:
> if event.inaxes:
> print 'data coords: ', event.xdata, event.ydata
> datax.append(event.xdata)
> datay.append(event.ydata)
> pylab.disconnect(click)
>
> if event.button == 3:
> pylab.close()
>
> return datax,datay
>
> fig = pylab.figure(figsize=(8,6))
> ax = fig.add_subplot(111)
> ax.plot(pylab.arange(10))
> cursor = Cursor(ax, useblit=False, color='red', linewidth=2)
> cursor.horizOn = False
>
> pylab.connect('button_press_event', click)
>
> pylab.show()
> print 'los arrays de data son: ', datax,datay
> ------------------------
> It returns the arrays, but it doesn't stop after one click, I have to press
> number 3 to exit.
>
> I tried to change to x, y instead of datax, datay in the following way:
>
> ------------------------
> x, y = 0,0
>
> x, y = event.x, event.y
> -----------------------------
>
> But in this case I get an error: "name 'x' is not defined"
> And I don't know why, because I only change the lines refering to datax,
> datay. It seems that only works with lists, but I don't know if this is the
> problem exactly.
>
> With the command close, I can close the figure window pressing right mouse
> button. It works (at least something works).
>
> Thank you for your help.
>
> 2007/6/4, Matthias Michler <Mat...@gm...>:
> > Hello darkside,
> >
> > maybe the following little examples helps you with disconnecting:
> > >------------------------------------------------------------------------
> > >--------
> >
> > from pylab import *
> >
> > def event_response(event):
> > print event.name
> > disconnect(cid)
> >
> > subplot(111)
> > cid = connect('button_press_event', event_response)
> >
> > show()
> >
> > >------------------------------------------------------------------------
> > >-----
> >
> > concerning opening of figures:
> > I think it is not possible to open a figure after the show()
> > ( I asked some time ago with subject "open / close or set active figures
> > during mainloop", but unfortunately without response).
> >
> > Maybe it would be sufficient for you to clean the figure or the axes
> > (pylab.clf/cla), resetting labels and use the same connected event
> > several times.
> >
> > best regards,
> > Matthias
> >
> > On Monday 04 June 2007 04:28, darkside wrote:
> > > I'm trying to use matplotlib to get an x point on some figures by
> >
> > mouse
> >
> > > clicking.
> > > To do this I try the next example:
> > > -------------------------
> > > datax=[]
> > > datay =[]
> > > def click(event):
> > > x, y = event.x, event.y
> > > if event.button == 1:
> > > if event.inaxes:
> > > print 'data coords: ', event.xdata, event.ydata
> > > datax.append(event.xdata)
> > > datay.append(event.ydata)
> > > if event.button == 3:
> > > pylab.close()
> > > return datax,datay
> > > fig = pylab.figure(figsize=(8,6))
> > > ax = fig.add_subplot(111)
> > >
> > > - Ignored:
> > > ax.plot(pylab.arange(10))
> > > cursor = Cursor(ax, useblit=False, color='red', linewidth=2)
> > > cursor.horizOn = False
> > >
> > > pylab.connect('button_press_event', click)
> > >
> > > pylab.show()
> > > pylab.disconnect(click)
> > > print 'los arrays de data son: ', datax,datay
> > > ------------------------------------------------------
> > >
> > > My problem is tha I want to only be able to click each figure once,
> >
> > then
> >
> > > lock the
> > > figure (making it unclickable), close it and open another one. But
> >
> > I'm
> >
> > > not
> > > able to
> > > implement this.
> > > Anyone have any suggestions?.
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: nappie74 <nap...@ti...> - 2007-06-11 07:22:49
|
nappie74 wrote: > Hi, > I'm new in matplolib code, > I have matrix of winds vectors Hi, thanks, yes infact wind barbs it's difficult to plot with quiver I have to coding something appropiate. So ,just I HAVE FOR THE MOMENT TO PLOT ONLY A LEGEND with one wind vector that have a lenght autoscaled like quiver: this vector is for example 5 m/s and for the other vectors everyone can make an idea of intensity. the legend facilty make this or is there an other way in quiver commands. --Pie -- View this message in context: http://www.nabble.com/to-build-barbs-in-quiver-resultant-vector-tf3889736.html#a11056084 Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Mark B. <ma...@gm...> - 2007-06-11 07:07:20
|
Works for me.
Thanks, Mark
On 6/11/07, Eric Firing <ef...@ha...> wrote:
>
> Mark,
>
> Presumably the mailing list method worked at one time, but it would be
> obscure and unintuitive even if it worked now. There are no other
> explicit dash styles given as a pair of numbers in the rc file, so the
> change I made in svn is to use the strings "solid" and "dashed"; the
> two-float specification is deprecated.
>
> Eric
>
> Mark Bakker wrote:
> > Hello -
> >
> > I tried to turn of the feature that makes contours with negative values
> > dashed.
> > According to the mailinglist this should go by setting:
> > rcParams['contour.negative_linestyle']=('None','None')
> > I tried any combination of the None, None syntax, or just 'solid', but
> > nothing worked.
> > Example shown below. I am using 0.90.1.
> > Thanks, Mark
> >
> > from pylab import *
> > x,y = meshgrid(linspace(-3,3,10),linspace(-3,3,10))
> > rcParams['contour.negative_linestyle']=('None','None')
> > contour(x,y,x,colors='b')
> >
> > Error message:
> >
> > Traceback (most recent call last):
> > File "<pyshell#10>", line 1, in ?
> > contour(x,y,x,colors='b')
> > File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 1777,
> > in contour
> > draw_if_interactive()
> > File
> > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> > line 59, in draw_if_interactive
> > figManager.show()
> > File
> > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> > line 311, in show
> > self.canvas.draw()
> > File
> > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> > line 154, in draw
> > FigureCanvasAgg.draw(self)
> > File
> > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
> > 392, in draw
> > self.figure.draw(renderer)
> > File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 601,
> > in draw
> > for a in self.axes: a.draw(renderer)
> > File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1286, in
> > draw
> > a.draw(renderer)
> > File "C:\Python24\Lib\site-packages\matplotlib\collections.py", line
> > 700, in draw
> > transoffset)
> > ValueError: invalid literal for float(): None
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Jake E. <jak...@on...> - 2007-06-11 03:10:18
|
The python imaging library is pretty good for this kind of thing. =20 http://www.pythonware.com/library/pil/handbook/ =20 Here's an (untested) example. Hope it helps. =20 Jake =20 =20 #!/usr/bin/env python =20 from pylab import scatter, save import Image =20 #get the background image, and find out how big it is im_bg =3D Image.open("background.png") bg_width, bg_height =3D im.size =20 #make a white canvas on which to paste the background image and the scatter plot #this will allow you to, say, have the x- and y-axis values fall outside of the background image's limits im_canvas =3D Image.new("RGBA", (bg_width+60, bg_height+60), (255, 255, 255, 0)) =20 #create the scatter plot from x and y data with matplotlib scatter(x, y, s=3Dsizes, alpha=3D0.75) =20 #save the scatter plot, and then retrieve it for use in PIL, convert to RGBA so that alpha levels will work #there is probably a better way to do this with gcf() or gci()... savefig("scatter_plot.png") im_scatter =3D Image.open("scatter_plot.png").convert("RGBA") =20 #resize the scatter image to make it fit nice im_scatter.resize((bg_width+10, bg_height+10)) =20 #bring all of the images together by pasting them onto the white canvas, use the overlayed image as the mask (third element) im_canvas.paste(im_bg, (30, 30), im_bg) #play around with the paste locations (30, 30) im_canvas.paste(im_scatter, (10, 30), im_scatter) #these won't be perfect the first time (10, 30) =20 #save it im_canvas.save("combo_image.png") =20 =20 =20 =20 ________________________________ From: __ [mailto:red...@gm...]=20 Sent: Sunday, June 10, 2007 5:22 PM To: mat...@li... Subject: [Matplotlib-users] Simple scatter plot over an image Hello,=20 I'm trying to plot a simple list of x/y coords over an image (.png). I can show the image, or plot the data, but cannot find a way to layer one over the other. I would greatly appreciate someone pointing me in the right direction. Thanks.=20 |
|
From: Eric F. <ef...@ha...> - 2007-06-11 00:41:26
|
Mark,
Presumably the mailing list method worked at one time, but it would be
obscure and unintuitive even if it worked now. There are no other
explicit dash styles given as a pair of numbers in the rc file, so the
change I made in svn is to use the strings "solid" and "dashed"; the
two-float specification is deprecated.
Eric
Mark Bakker wrote:
> Hello -
>
> I tried to turn of the feature that makes contours with negative values
> dashed.
> According to the mailinglist this should go by setting:
> rcParams['contour.negative_linestyle']=('None','None')
> I tried any combination of the None, None syntax, or just 'solid', but
> nothing worked.
> Example shown below. I am using 0.90.1.
> Thanks, Mark
>
> from pylab import *
> x,y = meshgrid(linspace(-3,3,10),linspace(-3,3,10))
> rcParams['contour.negative_linestyle']=('None','None')
> contour(x,y,x,colors='b')
>
> Error message:
>
> Traceback (most recent call last):
> File "<pyshell#10>", line 1, in ?
> contour(x,y,x,colors='b')
> File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 1777,
> in contour
> draw_if_interactive()
> File
> "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 59, in draw_if_interactive
> figManager.show()
> File
> "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 311, in show
> self.canvas.draw()
> File
> "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 154, in draw
> FigureCanvasAgg.draw(self)
> File
> "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
> 392, in draw
> self.figure.draw(renderer)
> File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 601,
> in draw
> for a in self.axes: a.draw(renderer)
> File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1286, in
> draw
> a.draw(renderer)
> File "C:\Python24\Lib\site-packages\matplotlib\collections.py", line
> 700, in draw
> transoffset)
> ValueError: invalid literal for float(): None
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: __ <red...@gm...> - 2007-06-10 23:21:48
|
Hello, I'm trying to plot a simple list of x/y coords over an image (.png). I can show the image, or plot the data, but cannot find a way to layer one over the other. I would greatly appreciate someone pointing me in the right direction. Thanks. |
|
From: Eric F. <ef...@ha...> - 2007-06-10 21:35:53
|
Mark,
As a quick workaround, try
rcParams['contour.negative_linestyle']=(6, 0)
This is a hack--using dashes with zero-length spaces.
I expect to have a better solution in svn shortly.
Eric
Mark Bakker wrote:
> Hello -
>
> I tried to turn of the feature that makes contours with negative values
> dashed.
> According to the mailinglist this should go by setting:
> rcParams['contour.negative_linestyle']=('None','None')
> I tried any combination of the None, None syntax, or just 'solid', but
> nothing worked.
> Example shown below. I am using 0.90.1.
> Thanks, Mark
>
> from pylab import *
> x,y = meshgrid(linspace(-3,3,10),linspace(-3,3,10))
> rcParams['contour.negative_linestyle']=('None','None')
> contour(x,y,x,colors='b')
>
> Error message:
>
> Traceback (most recent call last):
> File "<pyshell#10>", line 1, in ?
> contour(x,y,x,colors='b')
> File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 1777,
> in contour
> draw_if_interactive()
> File
> "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 59, in draw_if_interactive
> figManager.show()
> File
> "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 311, in show
> self.canvas.draw()
> File
> "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 154, in draw
> FigureCanvasAgg.draw(self)
> File
> "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", line
> 392, in draw
> self.figure.draw(renderer)
> File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 601,
> in draw
> for a in self.axes: a.draw(renderer)
> File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1286, in
> draw
> a.draw(renderer)
> File "C:\Python24\Lib\site-packages\matplotlib\collections.py", line
> 700, in draw
> transoffset)
> ValueError: invalid literal for float(): None
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Jose Gomez-D. <jgo...@gm...> - 2007-06-10 16:41:14
|
Hi all, First, sorry for the crossposting. I have drafted a small document (it is in Spanish, if there's interest, I'll have a go at translating it) on how to use OGR from Python access geospatial data, which can be further analysed or plotted with matplotlib. It is a very brief introduction, and surely there is much to improve, but I was looking for something like this for a while, and couldn't find it. The page is here: <http://jgomezdans.googlepages.com/ogr%2Cpythonymatplotlib> Cheers, jose |
|
From: Mark B. <ma...@gm...> - 2007-06-10 16:15:38
|
Hello -
I tried to turn of the feature that makes contours with negative values
dashed.
According to the mailinglist this should go by setting: rcParams['
contour.negative_linestyle']=('None','None')
I tried any combination of the None, None syntax, or just 'solid', but
nothing worked.
Example shown below. I am using 0.90.1.
Thanks, Mark
from pylab import *
x,y = meshgrid(linspace(-3,3,10),linspace(-3,3,10))
rcParams['contour.negative_linestyle']=('None','None')
contour(x,y,x,colors='b')
Error message:
Traceback (most recent call last):
File "<pyshell#10>", line 1, in ?
contour(x,y,x,colors='b')
File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 1777, in
contour
draw_if_interactive()
File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 59, in draw_if_interactive
figManager.show()
File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 311, in show
self.canvas.draw()
File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 154, in draw
FigureCanvasAgg.draw(self)
File "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py",
line 392, in draw
self.figure.draw(renderer)
File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 601, in
draw
for a in self.axes: a.draw(renderer)
File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1286, in
draw
a.draw(renderer)
File "C:\Python24\Lib\site-packages\matplotlib\collections.py", line 700,
in draw
transoffset)
ValueError: invalid literal for float(): None
|
|
From: rolandreichel <rol...@we...> - 2007-06-10 07:49:35
|
Hi, I want to plot some timeseries (eg. stockcharts). I use now DateLocator/Formatter, it works fine for me with the exeption, that dataless periods on X-Axis (eg. weekends) are also plotted. Is there an easy way to suppress them? regards |
|
From: Eric F. <ef...@ha...> - 2007-06-09 07:25:12
|
Done in svn. Eric Mark Bakker wrote: > I know for a fact that it used to work for fill( [0,1,1], [0,0,1], > '#FFFF66'). > But maybe I was just lucky. > It would be nice if you can make the change officially, > Mark > > On 6/7/07, *Eric Firing* <ef...@ha... > <mailto:ef...@ha...>> wrote: > > Mark Bakker wrote: > > Hello - > > > > This used to work: > > fill( [0,1,1], [0,0,1], '#FFFF66') > > > > But it doesn't work anymore under 0.90.1. > > I thought it still worked under 0.90.0 > > I don't think this behavior is documented, and a very quick look at > recent changes to axes.py did not reveal a corresponding change, but it > looks like it would be easy add and it seems to me like a useful and > logical extension. The idea is that if a string is a valid mpl > colorspec (including, but not limited to, hex strings as in the example > above), then it sets the color; otherwise the present code is used to > interpret strings like '-k' etc. > > If no one is working on this, and if there is no objection, I can > implement it later today or tomorrow. Does anyone see any ambiguity or > other problem with this? > > Eric > > > > > Anybody see the same problem? > > Plot seems to have the same problem: > > plot([1,2,3],'#afeeee') > > > > Error message for the plot statement: > > Traceback (most recent call last): > > File "<pyshell#11>", line 1, in ? > > plot([1,2,3],'#afeeee') > > File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line > 2028, > > in plot > > ret = gca().plot(*args, **kwargs) > > File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line > 2535, in > > plot > > for line in self._get_lines(*args, **kwargs): > > File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line > 421, in > > _grab_next_args > > for seg in self._plot_2_args(remaining, **kwargs): > > File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line > 313, in > > _plot_2_args > > linestyle, marker, color = _process_plot_format(fmt) > > File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line > 153, in > > _process_plot_format > > raise ValueError, err > > ValueError: Unrecognized character # in format string > > > > Thanks, Mark > > > > > > > ------------------------------------------------------------------------ > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > > > > > > ------------------------------------------------------------------------ > > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > <mailto:Mat...@li...> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Eric F. <ef...@ha...> - 2007-06-09 06:58:15
|
Travis, Do you need to call the draw method explicitly? The more usual way to use a LineCollection is to add it to the axes so that the draw method is called automatically when the figure is rendered. In the examples directory, see line_collection.py, line_collection2.py, and collections_demo.py. Eric Trevis Crane wrote: > Hi all, > > I'm trying to use a LineCollection object to speed up the drawing of a bunch of line segments. I've coded it all up, but when I call the draw method, it expects me to pass it a renderer. I assume this is another object instance of some sort, but I haven't found the appropriate documentation that gives me some hint of how to do this. > > Any help is appreciated. > > thanks, > trevis > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Trevis C. <t_...@mr...> - 2007-06-09 03:57:49
|
Hi all, I'm trying to use a LineCollection object to speed up the drawing of a = bunch of line segments. I've coded it all up, but when I call the draw = method, it expects me to pass it a renderer. I assume this is another = object instance of some sort, but I haven't found the appropriate = documentation that gives me some hint of how to do this. Any help is appreciated. thanks, trevis |
|
From: Christopher B. <Chr...@no...> - 2007-06-08 21:19:14
|
Sturla Molden wrote: >> If you use the new matplotlib 0.90.1 version then this has gone away. > > I do, and it hasn't gone away. I used the binary installer for Python 2.5 > on Windows (matplotlib-0.90.1.win32-py2.5.exe). > > When I looked at the code in SVN, the bug was there as well. That's what I'd expect. in 0.90.0, I think all that was changed was the build code, so that the accelerator no longer builds be default. Sturla Molden wrote: > _wxagg.pyd has a dependency on a unicode version of a "hybrid" (i.e. > debug) wxWidgets library, wxmsw26uh_vc.dll. I verified this using MSVC > dumpbin utility. No users of wxPython 2.8 will have this dll installed. anyone doing a clean install of MPL 0.90 should have _wxagg.pyd either. > At the bottom of the file backends_wxagg.py, there is an import > statement for _wxagg.pyd: > > try: > import _wxagg > except ImportError: > _wxagg = None > > Obviously this import always fails on wxPython 2.8, and is the cause of > the redundant error message. _wxagg.pyd is not needed with wxPython 2.8, > so the import should not be attempted at all. That was supposed to be checking whether _wxagg.pyd was there at all. If it's there with wxPython2.8, something odd happened -- maybe not that odd, it could happen if wxPython were upgraded after MPL was installed, but only if it's an old MPL or the accelerator build was turned on on purpose, overriding the default. I suspect you installed MPL 0.90 over an older version, which causes problems in various errors -- maybe the Windows binary installer could do some clean up first? So the key is this -- the accelerator is deprecated, so this shouldn't come up , and a couple versions down the road, we could probably remove the attempt to import it. > Instead, it should read like this: > > if getattr(wx, '__version__', '0.0')[0:3] < '2.8': > try: > import _wxagg # C++ accelerator with wxPython 2.6 > except ImportError: > _wxagg = None # default to pure Python > else: # wxPython 2.8, no accelerator needed > _wxagg = None That would probably work fine, but I'm not sure it's even worth it, unless anyone wants to run the accelerator with 2.6 and also have 2.8 installed, switching between them with wxversion -- a small pool of people! By the way, why not just: if wx.__version__[0:3] < '2.8' or even wx.__version__ < '2.8' which is think works fine. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Sturla M. <st...@mo...> - 2007-06-08 20:46:40
|
> Hi Sturla, > If you use the new matplotlib 0.90.1 version then this has gone away. I do, and it hasn't gone away. I used the binary installer for Python 2.5 on Windows (matplotlib-0.90.1.win32-py2.5.exe). When I looked at the code in SVN, the bug was there as well. S.M. |
|
From: Trevis C. <t_...@mr...> - 2007-06-08 18:46:29
|
Thanks!
I'll have to play with this a bit to see if it works for what I want to
do.
> -----Original Message-----
> From: John Hunter [mailto:jd...@gm...]
> Sent: Friday, June 08, 2007 12:41 PM
> To: Trevis Crane
> Cc: mat...@li...
> Subject: Re: [Matplotlib-users] interacting with data plot
>=20
> On 6/8/07, Trevis Crane <t_...@mr...> wrote:
> >
> >
> >
> >
> > Hi all,
> >
> >
> >
> > I have a plot of data that I am enabling the user to interact with.
That
> > is, I want them to be able to pick a point, and then have a new plot
pop up
> > in a different figure showing more info about that point.
>=20
> Here is an example that I just committed to svn as
examples/pick_event_demo2.py
>=20
> It made me realize that despite all my protestations not to repeatedly
> call show, we do not have a backend dependent way to raise new figures
> created in mpl callbacks. Since we've mostly made show bullet-proof
> to repeated calls (because we don't restart the mainloops) this works,
> but we do need a backend independent way to raise figures.
>=20
> One approach would be to have the figure creation function (eg in the
> backend) attach a method show() that raises the figure when called, eg
> fig.show()
>=20
> In any case, here is the example code, also attached in case the lines
> get wrapped
>=20
>=20
> """
> compute the mean and stddev of 100 data sets and plot mean vs stddev.
> When you click on one of the mu, sigma points, plot the raw data from
> the dataset that generated the mean and stddev
> """
> import numpy
> from pylab import figure, show
>=20
>=20
> X =3D numpy.random.rand(100, 1000)
> xs =3D numpy.mean(X, axis=3D1)
> ys =3D numpy.std(X, axis=3D1)
>=20
> fig =3D figure()
> ax =3D fig.add_subplot(111)
> ax.set_title('click on point to plot time series')
> line, =3D ax.plot(xs, ys, 'o', picker=3D5) # 5 points tolerance
>=20
>=20
> def onpick1(event):
>=20
> if event.artist!=3Dline: return True
>=20
> N =3D len(event.ind)
> if not N: return True
>=20
> figi =3D figure()
> for subplotnum, dataind in enumerate(event.ind):
> ax =3D figi.add_subplot(N,1,subplotnum+1)
> ax.plot(X[dataind])
> ax.text(0.05, 0.9, 'mu=3D%1.3f\nsigma=3D%1.3f'%(xs[dataind],
ys[dataind]),
> transform=3Dax.transAxes, va=3D'top')
> ax.set_ylim(-0.5, 1.5)
> ax.figure.canvas.draw()
> print 'plotted'
> show() # oops, we need a way to raise figures created in callbacks
> return True
>=20
> fig.canvas.mpl_connect('pick_event', onpick1)
>=20
> show()
|
|
From: Stephan B. <ste...@vi...> - 2007-06-08 18:31:15
|
On June 8, 2007, Darren Dale wrote: > Unfortunately, psfrag produces postscript that can not be embedded in > another file, so we have to distill the output. By default, the ghostscript > distiller is used, but if you have pdftops (available with xpdf), you can > set the ps.usedistiller option to xpdf and the fonts will be embedded. This > is discussed at http://www.scipy.org/Cookbook/Matplotlib/UsingTex. You're right; using 'xpdf' solved my problem. I didn't notice the (last) sentence which mentions using xpdf and poppler as a backend. Thanks for pointing it out. Stephan |
|
From: John H. <jd...@gm...> - 2007-06-08 18:13:36
|
On 6/8/07, John Hunter <jd...@gm...> wrote: > It made me realize that despite all my protestations not to repeatedly > call show, we do not have a backend dependent way to raise new figures > created in mpl callbacks. Since we've mostly made show bullet-proof > to repeated calls (because we don't restart the mainloops) this works, > but we do need a backend independent way to raise figures. I just made a minor modification to the backends (GTK, QT, QT4, Tk, and WX) in the figure managers to attach a show method to the figure class. It's not terribly elegant (and using this approach means it will not show up properly in the class documentation) but it works. If someone has a better, more elegant approach, I'm all for it, but at least now you can do fig.show() in pylab and it will do all the necessary GUI calls to raise the window. I've tested on GTK* and TkAgg -- those of you with svn access and WX* or QT* should test examples/pick_event_demo2.py on those platforms. The downside of this approach is that it makes porting pylab code to embedded GUI code a little harder, but such is the price of convenience. JDH |
|
From: John H. <jd...@gm...> - 2007-06-08 17:40:46
|
On 6/8/07, Trevis Crane <t_...@mr...> wrote:
>
>
>
>
> Hi all,
>
>
>
> I have a plot of data that I am enabling the user to interact with. That
> is, I want them to be able to pick a point, and then have a new plot pop up
> in a different figure showing more info about that point.
Here is an example that I just committed to svn as examples/pick_event_demo2.py
It made me realize that despite all my protestations not to repeatedly
call show, we do not have a backend dependent way to raise new figures
created in mpl callbacks. Since we've mostly made show bullet-proof
to repeated calls (because we don't restart the mainloops) this works,
but we do need a backend independent way to raise figures.
One approach would be to have the figure creation function (eg in the
backend) attach a method show() that raises the figure when called, eg
fig.show()
In any case, here is the example code, also attached in case the lines
get wrapped
"""
compute the mean and stddev of 100 data sets and plot mean vs stddev.
When you click on one of the mu, sigma points, plot the raw data from
the dataset that generated the mean and stddev
"""
import numpy
from pylab import figure, show
X = numpy.random.rand(100, 1000)
xs = numpy.mean(X, axis=1)
ys = numpy.std(X, axis=1)
fig = figure()
ax = fig.add_subplot(111)
ax.set_title('click on point to plot time series')
line, = ax.plot(xs, ys, 'o', picker=5) # 5 points tolerance
def onpick1(event):
if event.artist!=line: return True
N = len(event.ind)
if not N: return True
figi = figure()
for subplotnum, dataind in enumerate(event.ind):
ax = figi.add_subplot(N,1,subplotnum+1)
ax.plot(X[dataind])
ax.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f'%(xs[dataind], ys[dataind]),
transform=ax.transAxes, va='top')
ax.set_ylim(-0.5, 1.5)
ax.figure.canvas.draw()
print 'plotted'
show() # oops, we need a way to raise figures created in callbacks
return True
fig.canvas.mpl_connect('pick_event', onpick1)
show()
|
|
From: Werner F. B. <wer...@fr...> - 2007-06-08 15:43:12
|
Hi Sturla, Sturla Molden wrote: > There is an annoying bug when using wxAgg backend with wxPython 2.8 on > Windows. Whenever matplotlib is imported, we get a modal message box > displaying the error message: > > "This application has failed to start because wxmsw26uh_vc.dll was not > found. Reinstalling the application may fix this problem." > > After clicking OK, everything works fine. > > > Here is a bugfix: > If you use the new matplotlib 0.90.1 version then this has gone away. Werner |
|
From: Werner F. B. <wer...@fr...> - 2007-06-08 15:38:08
|
Hi Andrew, Andrew Straw wrote: > ... > Dear Werner, > > I am reluctant to eliminate the sub-folder structure because I think > it would add the possibility of unnecessary bugs to just the py2exe > built version. Would it be possible for you to re-factor this to > include the directory layout? When you test it, can you test some > interactive plot to make sure all the button icons are loaded properly? I don't know how to change "matplotlib.get_py2exe_datafiles()" to retain the folder structure. But in the attached setup.py I used "matplotlib.get_data_path()" for each of the sub-folders and then define the folder structure again in the py2exe "data_files" section. The enclosed setup.py builds an exe for embedding_in_wx.py and I have no problems running it and the toolbar shows all its icons. I am also enclosing some example files which I have upgraded to the new wxPython namespace - I had sent them some time ago but the examples.zip file I just downloaded contains the old versions. dynamic_demo_wx.py, namespace changes and a OnClose event to stop the timer (otherwise the script can not be stopped by clicking on the X). dynamic_image_wxagg.py, namespace changes dynamic_image_wxagg2.py, namespace changes and removed numarray stuff. embedding_in_wx.py, namespace changes embedding_in_wx2.py, namespace changes embedding_in_wx4.py, namespace changes Can you update the zip file with the above files? Best regards Werner |