SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S






1
(5)
2
3
(3)
4
(16)
5
(8)
6
(22)
7
(10)
8
(18)
9
(11)
10
(7)
11
(16)
12
(1)
13
(10)
14
(14)
15
(2)
16
(3)
17
(19)
18
(24)
19
(35)
20
(38)
21
(27)
22
(1)
23
(9)
24
(6)
25
(24)
26
(9)
27
(7)
28
(5)
29
(9)
30
(4)






Showing results of 362

<< < 1 2 3 4 5 6 .. 15 > >> (Page 4 of 15)
From: Christopher B. <Chr...@no...> - 2008年11月21日 22:04:35
John Hunter wrote:
> <Chr...@no...> wrote:
>> Yes -- even if Ken does come back online, I'd like to see wxMPL hosted
>> by the MPL project anyway -- it would be easier to find, and more likely
>> to get tested and patched. Maybe as a toolkit?
> 
> I'd be happy to host it in the mpl_toolkits dir if someone brings it
> up to 0.98 and will maintain it.
That would be great, John. I hope someone can take this on -- I'm doing 
non-MPL stuff at the moment, so I can't take it no right now. Maybe in 
the future.
-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: Mauro C. <mau...@gm...> - 2008年11月21日 20:34:57
Dear Stef,
2008年11月21日 Stef Mientki <ste...@gm...>:
>
> maybe you could send an explicit resize event to the panel or to the
> splitter:
> self.Panel_Bottom.SendSizeEvent ()
Yes, it worked! I just was not aware of this SendEvent() in wxPython,
it is handy. Now, I have to work out the correct display of the map
when the window is resized.
Will also use a CheckList control in place of the current Listbox, so
that plotting of points on the map can be turned on or off by the
user.
Of course, this is just a sample demonstration (but just plot a "Blue
Marble" image on the map panel and use an orthographic projection and
you can see what this humble sample will look like... ).
Thanks a lot for your help.
With best regards,
-- 
Dr. Mauro J. Cavalcanti
Ecoinformatics Studio
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: mau...@gm...
Web: http://studio.infobio.net
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."
From: Stef M. <ste...@gm...> - 2008年11月21日 20:05:40
hello Mauro,
On Fri, Nov 21, 2008 at 3:45 AM, Mauro Cavalcanti <mau...@gm...>wrote:
> Dear Stef,
>
> Thanks for the message. Your PyLab-Works looks really great (and I
> liked the interface).
>
I'm glad you liked it, hope to release PyLab_Works this month.
>
> I could not progress much further than applying the last advice from
> Chris Baker, which at least allowed the plot to be shown in its
> correct place.
>
> Indeed, the sample applications now *almost* works, except when the
> window is resized. Also, the points plotted on the map only appears
> when the map panel is resized using the splitter (because in this
> case, the entire panel is redrawn and it seems that this is the
> missing trick).
maybe you could send an explicit resize event to the panel or to the
splitter:
 self.Panel_Bottom.SendSizeEvent ()
>
>
> I am attaching the current version of source code plus a screenshot.
>
nice screenshot, thanks.
Stef
>
> With best regards,
>
> 2008年11月20日 Stef Mientki <ste...@gm...>:
> > I agree (coming from Delphi), they either don't work or are too limited.
> > For wxPython I developed a very simple method, which even has the F12
> > function ;-)
> > http://mientki.ruhosting.nl/data_www/pylab_works/pw_gui_support.htm
> > code can be downloaded here
> > http://code.google.com/p/pylab-works/downloads/list
> >
> > btw I would love to see your Basemap,
> > (but as I'm in the iddle of releasing a large project based on an old
> > version of MatPlatLib,
> > so I don't dare to update),
> > are there any screenshots ?
> >
> > thanks,
> > Stef Mientki
>
>
> --
> Dr. Mauro J. Cavalcanti
> Ecoinformatics Studio
> P.O. Box 46521, CEP 20551-970
> Rio de Janeiro, RJ, BRASIL
> E-mail: mau...@gm...
> Web: http://studio.infobio.net
> Linux Registered User #473524 * Ubuntu User #22717
> "Life is complex. It consists of real and imaginary parts."
>
Many thanks to Paulo Meira for his modifications to wxmpl.py to make it compatible with matplotlib-0.98.3. However, I had to make one change to his file for it to work with my application. Also, I had to modify one line in matplotlib/backends/backend_wx.py. I'm not sure why I had to make these changes--maybe I'm doing something wrong in my python/wx/wxmpl/matplotlib application. Anyway, here are patches that illustrate the changes I had to make. The patches are attached, but I'm not sure how this list handles patches, so the text is also pasted below. I hope this helps someone...if I'm doing something wrong, suggestions will be appreciated.
 Craig Finch
--- ./wxmpl.py 2008年11月21日 13:03:02.000000000 -0500
+++ ./wxmpl_new.py 2008年11月21日 14:28:35.000000000 -0500
@@ -1203,7 +1203,8 @@
 if doRepaint:
 self.gui_repaint()
 else:
- FigureCanvasWxAgg.draw(self, repaint)
+# FigureCanvasWxAgg.draw(self, repaint)
+ FigureCanvasWxAgg.draw(self)
 
 # Don't redraw the decorations when called by _onPaint()
 if doRepaint:
--- backend_wx.py 2008年11月21日 14:24:17.000000000 -0500
+++ backend_wx_new.py 2008年11月21日 14:26:24.000000000 -0500
@@ -1098,7 +1098,7 @@
 DEBUG_MSG("_onPaint()", 1, self)
 drawDC = wx.PaintDC(self)
 if not self._isDrawn:
- self.draw(drawDC=drawDC)
+ FigureCanvasWx.draw(self, drawDC=drawDC)
 else:
 self.gui_repaint(drawDC=drawDC)
 evt.Skip()
 
From: John H. <jd...@gm...> - 2008年11月21日 19:20:20
On Fri, Nov 21, 2008 at 12:26 PM, Eric Bruning <eri...@gm...> wrote:
> My preference would be to see the error rather than mysteriously not
> see text. The latter would be more frustrating to debug - hard to
> track down. A scientific user should probably know that he's
> overextending the floating point capability, which was my case.
Actually you are overflowing the int. In the backend, we transform
everything to pixel space, and the call fails when it tries to
initialize an int with the transformed coordinate.
JDH
From: Eric B. <eri...@gm...> - 2008年11月21日 18:26:46
On Fri, Nov 21, 2008 at 12:24 PM, John Hunter <jd...@gm...> wrote:
> On Fri, Nov 21, 2008 at 10:37 AM, Eric Bruning <eri...@gm...> wrote:
>>> Can you post a complete, free-standing example script which replicates
>>> the problem
>>
>> import matplotlib.pyplot as plt
>> f=plt.figure()
>> ax=f.add_subplot(111)
>> ax.plot(range(10))
>> ax.text(-10, 5, 'this one is ok')
>> ax.text(-1202255993.82, 5, 'this one fails')
>> plt.show()
>>
>>> and also the output of the script run with --verbose-debug?
>> See attached.
>
> OK, thanks. I can replicate this on one machine (on which python is
> compiled for 32bit)
And I can confirm that my Python is running as 32 bit.
> My guess is the transformation is putting this int out of bounds on
> the 32 bit system triggering an exception in the cxx code.
>
> From the exception, it looks like the exception is being set in cxx
> extension code but is not being raised at the time the exception is
> set, because there is no reason the iteration over the info should be
> triggering the exception at that time. I fixed backend agg to raise
> the proper exception so it is at least less confusing -- it now raises
> ...
> TypeError: Invalid input arguments to draw_text_image
>
> I'm not sure what the desired behavior here is. We could make it fail
> silently (not plot the text rather than raise)....
My preference would be to see the error rather than mysteriously not
see text. The latter would be more frustrating to debug - hard to
track down. A scientific user should probably know that he's
overextending the floating point capability, which was my case.
I would be interested to see a concise form of John [H2O]'s bug,
though - it might get more subtle if it's doing something funny on a
map projection, like plotting on the backside of a sphere.
Thanks,
Eric
From: Jeff M. <jm...@nr...> - 2008年11月21日 18:14:16
Robert Kern-2 wrote:
> 
> Jeff Mangum wrote:
> 
>> Hmmm. Got it from python.org
>> (http://python.org/download/releases/2.5.2/)
>> and just reinstalled to make sure. Indeed the binary is in
>> /Library/Frameworks/Python.framework/Versions/Current/bin/python.
> 
> I know that you have the python.org Python installed. However, it may not
> be the 
> Python that the easy_install script is using. Check the contents of the 
> easy_install file. It ought to point to /Library/Frameworks/.../Python at
> the 
> top. Try explicitly running /Library/Frameworks/.../bin/easy_install
> instead.
> 
>> I am seeing some other problems (like PPC binaries in /opt/local/bin). I
>> have recently migrated from PPC to Intel Mac, and I suspect that the
>> migration assistant may have been too thorough...
> 
> Your PYTHONPATH may also be messed up.
> 
> -- 
> Robert Kern
> 
The easy_install script checked out ok. Must have been a path issue, as I
was able to get the egg to install after starting a new shell. Seems to
work now. Thanks for your help!
-- Jeff
-- 
View this message in context: http://www.nabble.com/matplotlib-egg-finds-wrong-version-of-numpy-tp20544369p20626848.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: John H. <jd...@gm...> - 2008年11月21日 17:48:14
On Fri, Nov 21, 2008 at 11:38 AM, Christopher Barker
<Chr...@no...> wrote:
> massimo sandal wrote:
>> I tried to wrote to Ken McIvor (wxmpl author) about this but received no
>> answer.
>
> How long has it been -- he could be on vacation or something.
>
>> - If wxmpl has been abandoned by its author, is there anyone interested
>> (beyond myself) in continuing its development?
>
> Yes -- even if Ken does come back online, I'd like to see wxMPL hosted
> by the MPL project anyway -- it would be easier to find, and more likely
> to get tested and patched. Maybe as a toolkit?
I'd be happy to host it in the mpl_toolkits dir if someone brings it
up to 0.98 and will maintain it.
From: Shailesh K. <ko...@me...> - 2008年11月21日 17:40:42
John Hunter wrote:
> On Thu, Nov 20, 2008 at 10:09 PM, Eric Firing <ef...@ha...> wrote:
>> Shailesh Kochhar wrote:
>>> Hello,
>>>
>>> I am trying to fill the space below a curve where my x-axis is indexed
>>> by time. The matplotlib api documentation and the examples don't touch
>>> on this subject and I haven't had much luck trying a few different
>>> variations. Here's what I've tried so far, maybe someone can point out
>>> what I'm doing wrong.
>>>
>>> import time
>>> import matplotlib.pyplot as plt
>>> import matplotlib.mlab as mlab
>>>
>>> time_strings = [ list of times as strings ]
>>> xs = [ date2num(time.strptime(string) for string in time_strings ]
>>> ys = [ list of float values ]
>>>
>>> fig = plt.figure()
>>> ax = fig.add_subplot(111)
>>> ax.plot_date(xs, ys)
>>>
>>> xv, yv = mlab.poly_below(0, xs, ys)
>>> ax.fill(xv, yv)
>>>
> 
> I think there is a bug in poly_below -- try usin poly_between
> 
> xv, yv = mlab.poly_between(xs, ys, 0)
> 
> I've fixed the bug in svn r6429, so you can also use svn if you have
> access to it.
Thanks, that works like a charm.
 ~sk
From: Christopher B. <Chr...@no...> - 2008年11月21日 17:38:10
massimo sandal wrote:
> I tried to wrote to Ken McIvor (wxmpl author) about this but received no 
> answer.
How long has it been -- he could be on vacation or something.
> - If wxmpl has been abandoned by its author, is there anyone interested 
> (beyond myself) in continuing its development?
Yes -- even if Ken does come back online, I'd like to see wxMPL hosted 
by the MPL project anyway -- it would be easier to find, and more likely 
to get tested and patched. Maybe as a toolkit?
I don't have a lot of time for it, but I need it too, so I'll help some.
-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: John H. <jd...@gm...> - 2008年11月21日 17:24:46
On Fri, Nov 21, 2008 at 10:37 AM, Eric Bruning <eri...@gm...> wrote:
>> Can you post a complete, free-standing example script which replicates
>> the problem
>
> import matplotlib.pyplot as plt
> f=plt.figure()
> ax=f.add_subplot(111)
> ax.plot(range(10))
> ax.text(-10, 5, 'this one is ok')
> ax.text(-1202255993.82, 5, 'this one fails')
> plt.show()
>
>> and also the output of the script run with --verbose-debug?
> See attached.
OK, thanks. I can replicate this on one machine (on which python is
compiled for 32bit)
 johnh@flag:~> uname -a
 SunOS flag 5.10 Generic_118855-15 i86pc i386 i86pc
 johnh@flag:~> python -V
 Python 2.4.5
 johnh@flag:~> gcc --version
 gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
 johnh@flag:~> python -c 'import sys; print sys.maxint'
 2147483647
but not on another (on which python supports 64 bit)
 jdhunter@bic128:unit> uname -a
 Linux bic128.bic.berkeley.edu 2.6.26.6-49.fc8 #1 SMP Fri Oct 17
15:33:32 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
 jdhunter@bic128:unit> python -V
 Python 2.5.1
 jdhunter@bic128:unit> gcc --version
 gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)\
 jdhunter@bic128:unit> python -c 'import sys; print sys.maxint'
 9223372036854775807
My guess is the transformation is putting this int out of bounds on
the 32 bit system triggering an exception in the cxx code.
>From the exception, it looks like the exception is being set in cxx
extension code but is not being raised at the time the exception is
set, because there is no reason the iteration over the info should be
triggering the exception at that time. I fixed backend agg to raise
the proper exception so it is at least less confusing -- it now raises
johnh@flag:~> python test.py
Traceback (most recent call last):
 File "test.py", line 9, in ?
 fig.canvas.draw()
 File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 283, in draw
 self.figure.draw(self.renderer)
 File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/figure.py",
line 767, in draw
 for a in self.axes: a.draw(renderer)
 File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py",
line 1590, in draw
 a.draw(renderer)
 File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/text.py",
line 496, in draw
 ismath=self.is_math_text(line))
 File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 135, in draw_text
 self._renderer.draw_text_image(font.get_image(), int(x), int(y) +
1, angle, gc)
TypeError: Invalid input arguments to draw_text_image
I'm not sure what the desired behavior here is. We could make it fail
silently (not plot the text rather than raise)....
JDH
From: Eric B. <eri...@gm...> - 2008年11月21日 16:47:13
Attachments: animation.py
Hi Eric,
>
> On Fri, Nov 21, 2008 at 11:19 AM, Eric Jonas <jo...@mi...> wrote:
>> I've looked through the latest examples as well as google and the list
>> archives, and am still at a loss -- can anyone point me to an example of
>> how to animate a scatter plot?
I've attached a somewhat unpolished but functional example that shows
time-synchronized animation of multiple scatter plots. It uses the wx
backend explicitly, due to some issues with the idle event handling.
>> The collection returned by scatter() lacks anything akin to a set_data method.
Yup, you want this instead:
collection.set_offsets(xy)
collection.set_array(s)
-Eric
From: Eric B. <eri...@gm...> - 2008年11月21日 16:37:55
Attachments: mpl_debug.txt
> Can you post a complete, free-standing example script which replicates
> the problem
import matplotlib.pyplot as plt
f=plt.figure()
ax=f.add_subplot(111)
ax.plot(range(10))
ax.text(-10, 5, 'this one is ok')
ax.text(-1202255993.82, 5, 'this one fails')
plt.show()
> and also the output of the script run with --verbose-debug?
See attached.
Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007;
root:xnu-792.25.20~1/RELEASE_I386 i386 i386 (Mac OS X 10.4.11)
I'm running svn r6360 (with my draw_wrapper patch to handle per-artist
rasterizing)
From: Eric J. <jo...@MI...> - 2008年11月21日 16:20:06
I've looked through the latest examples as well as google and the list
archives, and am still at a loss -- can anyone point me to an example of
how to animate a scatter plot? The collection returned by scatter()
lacks anything akin to a set_data method. 
Thanks!
		...Eric
From: John H. <jd...@gm...> - 2008年11月21日 14:02:20
On Thu, Nov 13, 2008 at 10:38 PM, John [H2O] <was...@gm...> wrote:
>
> Hello, using matplotlib 0.98 with mpl_toolkit Basemap:
>
> I'm trying to create a plot with a series of ellipses over a map. I've
> followed the tutorial, and can create the same figure as shown here:
> http://matplotlib.sourceforge.net/users/screenshots.html#ellipses
>
> I can also create a series of ellipses over a map.
>
> Now I am trying to label each circle using the following snippet:
> for item in ells:
> #ells is now a tuple in the form: (Ellipse, (x,y)) and (x,y) is the same
> as for the Ellipse
> e = item[0]
> xy = item[1]
> ax.add_artist(e)
> e.set_clip_box(ax.bbox)
> e.set_alpha(.7)
> pyplot.text(xy[0],xy[1],e.get_label())
>
> however, for some reason it fails. Can someone provide some ideas on what I
> am doing wrong? Also, is there more direct way to set the plots so that the
> labels are drawn?
Can you post a complete, free-standing example script which replicates
the problem and also the output of the script run with
--verbose-debug? See
 http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-problem
JDH
From: John H. <jd...@gm...> - 2008年11月21日 13:52:43
On Fri, Nov 21, 2008 at 2:45 AM, Simon Kammerer <ko...@we...> wrote:
> After looking at the source of matplotlib.colors, it seems to me that
> different alpha values are something Colormap is not designed for.
Yes, it looks like the colormap only holds the RGB channels, but it
also looks fairly straightforward to patch the code to support the
fourth channel. Is this something you'd like to tackle?
JDH
From: John H. <jd...@gm...> - 2008年11月21日 11:29:01
On Thu, Nov 20, 2008 at 10:09 PM, Eric Firing <ef...@ha...> wrote:
> Shailesh Kochhar wrote:
>> Hello,
>>
>> I am trying to fill the space below a curve where my x-axis is indexed
>> by time. The matplotlib api documentation and the examples don't touch
>> on this subject and I haven't had much luck trying a few different
>> variations. Here's what I've tried so far, maybe someone can point out
>> what I'm doing wrong.
>>
>> import time
>> import matplotlib.pyplot as plt
>> import matplotlib.mlab as mlab
>>
>> time_strings = [ list of times as strings ]
>> xs = [ date2num(time.strptime(string) for string in time_strings ]
>> ys = [ list of float values ]
>>
>> fig = plt.figure()
>> ax = fig.add_subplot(111)
>> ax.plot_date(xs, ys)
>>
>> xv, yv = mlab.poly_below(0, xs, ys)
>> ax.fill(xv, yv)
>>
I think there is a bug in poly_below -- try usin poly_between
 xv, yv = mlab.poly_between(xs, ys, 0)
I've fixed the bug in svn r6429, so you can also use svn if you have
access to it.
JDH
From: John H. <jd...@gm...> - 2008年11月21日 11:07:35
On Fri, Nov 21, 2008 at 3:31 AM, Søren Nielsen
<sor...@gm...> wrote:
> Is it possible to change say the centre point of a circle patch and do a
> redraw? (couldn't find a function in the documentation) or do I have to
> remove the old patch and plot a new one. I want to bind mouse movement to a
> function that changes the location of the patch, so that a user can move a
> patch with the mouse.
There is a tutorial on this at
http://matplotlib.sourceforge.net/users/event_handling.html
JDH
From: massimo s. <mas...@un...> - 2008年11月21日 11:05:43
Attachments: massimo_sandal.vcf
Hi,
I am a wxMPL user. I use it as a component to blend MPL into a wx GUI 
for a data analysis application I develop ( 
http://code.google.com/p/hooke ).
I was extremly satisfied by that package, but I've noticed it doesn't 
play well with latest mpl and needs to be patched. Another wonderful guy 
on this list (Paulo Meira) managed to patch it get it working but I am 
receiving reports it could be still buggy and it is a completely 
unofficial patch.
I tried to wrote to Ken McIvor (wxmpl author) about this but received no 
answer.
So, I'd like to know:
- Is anyone able to contact Ken McIvor?
- Does anyone know about the wxmpl status?
- If wxmpl has been abandoned by its author, is there anyone interested 
(beyond myself) in continuing its development?
Thanks a lot,
Massimo
-- 
Massimo Sandal , Ph.D.
University of Bologna
Department of Biochemistry "G.Moruzzi"
snail mail:
Via Irnerio 48, 40126 Bologna, Italy
email:
mas...@un...
web:
http://www.biocfarm.unibo.it/samori/people/sandal.html
tel: +39-051-2094388
fax: +39-051-2094387
From: Simon K. <ko...@we...> - 2008年11月21日 09:49:33
Hi all,
I'd like to create a ListedColormap with different alpha values, like
...
 [ 1. , 1. , 1. , 0.65],
 [ 1. , 1. , 1. , 0.66],
 [ 1. , 1. , 1. , 0.67],
 [ 1. , 1. , 1. , 0.68],
 [ 1. , 1. , 1. , 0.69],
 [ 1. , 1. , 1. , 0.7 ],
 [ 1. , 1. , 1. , 0.71],
 [ 1. , 1. , 1. , 0.72],
 [ 1. , 1. , 1. , 0.73],
 [ 1. , 1. , 1. , 0.74],
 [ 1. , 1. , 1. , 0.75],
 [ 1. , 1. , 1. , 0.76],
 [ 1. , 1. , 1. , 0.77],
 [ 1. , 1. , 1. , 0.78],
 [ 1. , 1. , 1. , 0.79],
...
meaning "map all my values to white, but with different alpha".
When I do something like this:
myColormap = matplotlib.colors.ListedColormap(my_rgba_array)
contourf(x,y,data,arange(0.1,1.05,0.05), cmap=myColormap)
it seems like my alpha values get changed to "1" deep inside 
matplotlib.colors.Colormap/LinearSegmentedColormap/ListedColormap.
After looking at the source of matplotlib.colors, it seems to me that 
different alpha values are something Colormap is not designed for.
Something like:
myColormap._lut = my_rgba_array
doesn't work.
What would be the best approach to create a Colormap with different 
alphas? ListedColormap would be convinient, but I can also go with 
LinearSegmentedColormap.
Regards
Simon
From: S. N. <sor...@gm...> - 2008年11月21日 09:31:22
Is it possible to change say the centre point of a circle patch and do a
redraw? (couldn't find a function in the documentation) or do I have to
remove the old patch and plot a new one. I want to bind mouse movement to a
function that changes the location of the patch, so that a user can move a
patch with the mouse.
Thanks,
Soren
From: Scott S. <sco...@gm...> - 2008年11月21日 05:22:17
2008年11月21日 Eric Firing <ef...@ha...>:
> Michael Outhouse wrote:
>> I was wondering if it is possible to change the colorbar tick labeling in
>> matplotlib from numeric to text. Essentially, I want the colorbar to be a
>> qualitative indicator; in the jet scheme, I'd like blue to be labeled
>> as 'unstable', green as 'neutral', and red as 'stable'. I can change it so I
>> just show the underlying values - colorbar(ticks = (-1, 0, 1)), but I cannot
>> change the the tick labels to text. Is there any way to accomplish this?
>> Thanks in advance for any help.
>
> Your message came more than a month ago, but it looks like no one
> answered, so here is an answer:
>
> with ipython -pylab:
>
> imshow(2*rand(10,10) - 1, vmin=-1, vmax=1)
> cbar = colorbar(ticks=[-1,0,1])
> cbar.ax.set_yticklabels(['unstable', 'neutral', 'stable'])
> draw()
Also see the example here
http://matplotlib.sourceforge.net/examples/pylab_examples/colorbar_tick_labelling_demo.html.
Cheers,
Scott
From: Eric F. <ef...@ha...> - 2008年11月21日 04:09:36
Shailesh Kochhar wrote:
> Hello,
> 
> I am trying to fill the space below a curve where my x-axis is indexed 
> by time. The matplotlib api documentation and the examples don't touch 
> on this subject and I haven't had much luck trying a few different 
> variations. Here's what I've tried so far, maybe someone can point out 
> what I'm doing wrong.
> 
> import time
> import matplotlib.pyplot as plt
> import matplotlib.mlab as mlab
> 
> time_strings = [ list of times as strings ]
> xs = [ date2num(time.strptime(string) for string in time_strings ]
> ys = [ list of float values ]
> 
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.plot_date(xs, ys)
> 
> xv, yv = mlab.poly_below(0, xs, ys)
> ax.fill(xv, yv)
> 
> 
> When I do this, I get a 'year out of range' error. If I try and fill the 
> area before the call to ax.plot_date, The fill looks like a solid bar 
> about the height of the max y-value.
What is the actual traceback?
Please provide a simple but complete example that shows the 
problem--that is, flesh out your pseudocode above into a small 
standalone script that triggers the error.
Eric
> 
> From, looking at the posts on the mailing list it doesn't seem that I'm 
> doing something terribly wrong, maybe I'm missing something subtle?
> 
> Thanks,
> - Shailesh
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Shailesh K. <ko...@me...> - 2008年11月21日 03:52:11
Hello,
I am trying to fill the space below a curve where my x-axis is indexed 
by time. The matplotlib api documentation and the examples don't touch 
on this subject and I haven't had much luck trying a few different 
variations. Here's what I've tried so far, maybe someone can point out 
what I'm doing wrong.
import time
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
time_strings = [ list of times as strings ]
xs = [ date2num(time.strptime(string) for string in time_strings ]
ys = [ list of float values ]
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot_date(xs, ys)
xv, yv = mlab.poly_below(0, xs, ys)
ax.fill(xv, yv)
When I do this, I get a 'year out of range' error. If I try and fill the 
area before the call to ax.plot_date, The fill looks like a solid bar 
about the height of the max y-value.
From, looking at the posts on the mailing list it doesn't seem that I'm 
doing something terribly wrong, maybe I'm missing something subtle?
Thanks,
 - Shailesh
From: Mauro C. <mau...@gm...> - 2008年11月21日 02:45:33
Attachments: Gaia.py screenshot.png
Dear Stef,
Thanks for the message. Your PyLab-Works looks really great (and I
liked the interface).
I could not progress much further than applying the last advice from
Chris Baker, which at least allowed the plot to be shown in its
correct place.
Indeed, the sample applications now *almost* works, except when the
window is resized. Also, the points plotted on the map only appears
when the map panel is resized using the splitter (because in this
case, the entire panel is redrawn and it seems that this is the
missing trick).
I am attaching the current version of source code plus a screenshot.
With best regards,
2008年11月20日 Stef Mientki <ste...@gm...>:
> I agree (coming from Delphi), they either don't work or are too limited.
> For wxPython I developed a very simple method, which even has the F12
> function ;-)
> http://mientki.ruhosting.nl/data_www/pylab_works/pw_gui_support.htm
> code can be downloaded here
> http://code.google.com/p/pylab-works/downloads/list
>
> btw I would love to see your Basemap,
> (but as I'm in the iddle of releasing a large project based on an old
> version of MatPlatLib,
> so I don't dare to update),
> are there any screenshots ?
>
> thanks,
> Stef Mientki
-- 
Dr. Mauro J. Cavalcanti
Ecoinformatics Studio
P.O. Box 46521, CEP 20551-970
Rio de Janeiro, RJ, BRASIL
E-mail: mau...@gm...
Web: http://studio.infobio.net
Linux Registered User #473524 * Ubuntu User #22717
"Life is complex. It consists of real and imaginary parts."
1 message has been excluded from this view by a project administrator.

Showing results of 362

<< < 1 2 3 4 5 6 .. 15 > >> (Page 4 of 15)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /