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
(8) |
2
(14) |
3
(22) |
4
(13) |
5
(11) |
6
(12) |
7
(4) |
8
(6) |
9
(19) |
10
(14) |
11
(16) |
12
(6) |
13
(15) |
14
(6) |
15
(8) |
16
(22) |
17
(17) |
18
(8) |
19
(16) |
20
(19) |
21
(3) |
22
(6) |
23
(18) |
24
(26) |
25
(17) |
26
(13) |
27
(18) |
28
(8) |
29
|
30
(14) |
31
(30) |
|
|
|
|
From: John H. <jd...@gm...> - 2009-03-24 20:07:52
|
On Tue, Mar 24, 2009 at 3:01 PM, Xavier Gnata <xav...@gm...>wrote: > > > I got some good tips on how to do this from > > examples/event_handling/pick_event_demo.py > > > Thanks!! It works just fine :). IDL is dead. Qt4 python and > numpy/scipy/numpy are great tools. Thanks! You may also want to check out the event handling and picking tutorial at http://matplotlib.sourceforge.net/users/event_handling.html JDH |
From: Xavier G. <xav...@gm...> - 2009-03-24 20:01:08
|
Christopher Brown wrote: > Hi Xavier, > > XG> I'm trying to write a pyqt4 application including pylab plotting > XG> capabilities. > XG> Up to now, it looks like this (see in attachment). > XG> > XG> The picker works fine (I get the msg) *but* I also would like to get > XG> the (x,y) coordinates and the the corresponding value A[x,y]. > XG> Could someone tell me what I should do in on_pick with this "event" > XG> to get these data?? > XG> > XG> Xavier > > This works for me: > > def on_pick(self, event): > tt = event.artist.get_axes() > mouseevent = event.mouseevent > msg = "X is: " + str(mouseevent.xdata) + "\nY is: " + > str(mouseevent.ydata) > QMessageBox.information(self, "Click!", msg) > > I got some good tips on how to do this from > examples/event_handling/pick_event_demo.py > Thanks!! It works just fine :). IDL is dead. Qt4 python and numpy/scipy/numpy are great tools. Xavier |
From: Hatch, S. J <sar...@jp...> - 2009-03-24 20:00:43
|
John and Eric, Thanks for your responses. I think I can do what I want with your suggestions. As for the reason I wanted to know this: I found that when I placed a pdf image created with matplotlib into Adobe Illustrator and then shrunk it down to fit into my poster that the edges of my plot were being cut-off by the clipping mask. In addition, the clipping masks were being grouped with the matplotlib lines (called a path in Illustrator) and it made it more difficult to find an individual path and tweak it in Illustrator. Thanks again, Sara From: John Hunter [mailto:jd...@gm...] Sent: Thursday, March 19, 2009 12:44 PM To: Eric Firing Cc: Hatch, Sara J; mat...@li... Subject: Re: [Matplotlib-users] How to turn off all clipping? On Thu, Mar 19, 2009 at 2:33 PM, Eric Firing <ef...@ha...<mailto:ef...@ha...>> wrote: def noclip(ax): "Turn off all clipping in axes ax; call immediately before drawing" ax.set_clip_on(False) artists = [] Or even better:: for o in fig.findobj(): o.set_clip_on(False) findobj is an artist method that recursive searches all the artists contained in it -- you can optionally specify the type of artist you want returned. See http://matplotlib.sourceforge.net/examples/pylab_examples/findobj_demo.html JDH |
From: John H. <jd...@gm...> - 2009-03-24 19:45:26
|
On Tue, Mar 24, 2009 at 2:33 PM, Christopher Barker <Chr...@no...>wrote: > Eric Firing wrote: > > Maybe it is new, but svn trunk shows that pyplot.axhline is just calling > > the axes method of the same name. > > yes, indeed it is -- arrg! sorry about that -- I really do think I > looked for that! > > I am finding it harder to navigate the API docs than I'd like -- I > m not sure what could be done, however. One thing that might help would > be an index of all methods at the top of the class docs -- there is a > lot of good stuff in each of the methods docs, so it gets hard to > quickly look for a method. The search tool on the website is actually pretty decent http://matplotlib.sourceforge.net/search.html?q=axhline unlike many search tools at many websites... JDH |
From: Christopher B. <Chr...@no...> - 2009-03-24 19:33:23
|
Eric Firing wrote: > Maybe it is new, but svn trunk shows that pyplot.axhline is just calling > the axes method of the same name. yes, indeed it is -- arrg! sorry about that -- I really do think I looked for that! I am finding it harder to navigate the API docs than I'd like -- I m not sure what could be done, however. One thing that might help would be an index of all methods at the top of the class docs -- there is a lot of good stuff in each of the methods docs, so it gets hard to quickly look for a method. -Thanks, and sorry for the noise, -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: Eric F. <ef...@ha...> - 2009-03-24 19:22:59
|
Christopher Barker wrote: > Hi folks, > > Is there an OO way to get pyplot.axhline() ? > > I found Axes.hlines, but it's not as convienent for doing a quick > horizontal line all the way across the axes: I need to specify the x coords. > > thanks, > > -Chris > > Chris, Maybe it is new, but svn trunk shows that pyplot.axhline is just calling the axes method of the same name. Eric def axhline(*args, **kwargs): # allow callers to override the hold state by passing hold=True|False b = ishold() h = kwargs.pop('hold', None) if h is not None: hold(h) try: ret = gca().axhline(*args, **kwargs) draw_if_interactive() except: hold(b) raise hold(b) return ret if Axes.axhline.__doc__ is not None: axhline.__doc__ = dedent(Axes.axhline.__doc__) + """ |
From: Christopher B. <Chr...@no...> - 2009-03-24 19:16:26
|
Hi folks, Is there an OO way to get pyplot.axhline() ? I found Axes.hlines, but it's not as convienent for doing a quick horizontal line all the way across the axes: I need to specify the x coords. thanks, -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: Christopher B. <Chr...@no...> - 2009-03-24 18:37:01
|
John Hunter wrote: > Perhaps we should make this a friendly helper method of the agg backend > canvas -- canvas.toarray() returns an rgba numpy array via > canvas.buffer_rgba? +1 -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...> - 2009-03-24 17:02:34
|
On Tue, Mar 24, 2009 at 10:46 AM, Jae-Joon Lee <lee...@gm...> wrote: > canvas = gcf().canvas > buf = canvas.tostring_rgb() > > img = numpy.fromstring(buf, numpy.uint8) > im_size = canvas.get_width_height() > rgb = img.reshape(im_size[1], im_size[0], 3) > r, g, b = rgb[:,:,0], rgb[:,:,1], rgb[:,:,2] > Perhaps we should make this a friendly helper method of the agg backend canvas -- canvas.toarray() returns an rgba numpy array via canvas.buffer_rgba? |
From: Andy Y. <new...@gm...> - 2009-03-24 16:12:13
|
Wow, right there in the FAQ. That worked great! Thanks for kindly pointing me in the right direction. Andy On Tue, Mar 24, 2009 at 10:56 AM, Jae-Joon Lee <lee...@gm...> wrote: > http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axes-to-make-room-for-tick-labels > > something like "fig.subplots_adjust(left=0.2)" would work. > > -JJ > > > > On Tue, Mar 24, 2009 at 11:43 AM, Andy Yates <new...@gm...> wrote: >> I am trying to generate plots where the y-axis major tick labels are >> date/times. My tick labels are getting cut off. How can I set a >> larger area on the left to allow room for my entire date time stamps? >> >> fig = Figure() >> canvas = FigureCanvas(fig) >> ax = fig.add_subplot(111) >> ax.plot(x,y) >> ax.set_title('Gamma Ray') >> ax.grid(True) >> ax.set_xlabel('counts/sec') >> ax.set_ylabel('time') >> formatter = dates.DateFormatter('%Y-%m-%d %H:%M') >> ax.yaxis.set_major_formatter(formatter) >> ax.yaxis.set_major_locator( MinuteLocator( interval=5 ) ) >> >> fig.set_size_inches( (10, 10) ) >> filename = settings.MEDIA_ROOT + '/images/test1.png' >> fig.savefig(filename) >> >> >> Thanks! >> Andy >> >> ------------------------------------------------------------------------------ >> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >> easily build your RIAs with Flex Builder, the Eclipse(TM)based development >> software that enables intelligent coding and step-through debugging. >> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > |
From: Jae-Joon L. <lee...@gm...> - 2009-03-24 15:56:44
|
http://matplotlib.sourceforge.net/faq/howto_faq.html#move-the-edge-of-an-axes-to-make-room-for-tick-labels something like "fig.subplots_adjust(left=0.2)" would work. -JJ On Tue, Mar 24, 2009 at 11:43 AM, Andy Yates <new...@gm...> wrote: > I am trying to generate plots where the y-axis major tick labels are > date/times. My tick labels are getting cut off. How can I set a > larger area on the left to allow room for my entire date time stamps? > > fig = Figure() > canvas = FigureCanvas(fig) > ax = fig.add_subplot(111) > ax.plot(x,y) > ax.set_title('Gamma Ray') > ax.grid(True) > ax.set_xlabel('counts/sec') > ax.set_ylabel('time') > formatter = dates.DateFormatter('%Y-%m-%d %H:%M') > ax.yaxis.set_major_formatter(formatter) > ax.yaxis.set_major_locator( MinuteLocator( interval=5 ) ) > > fig.set_size_inches( (10, 10) ) > filename = settings.MEDIA_ROOT + '/images/test1.png' > fig.savefig(filename) > > > Thanks! > Andy > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Jae-Joon L. <lee...@gm...> - 2009-03-24 15:46:50
|
canvas = gcf().canvas buf = canvas.tostring_rgb() img = numpy.fromstring(buf, numpy.uint8) im_size = canvas.get_width_height() rgb = img.reshape(im_size[1], im_size[0], 3) r, g, b = rgb[:,:,0], rgb[:,:,1], rgb[:,:,2] Or if you're using PIL, pil_image = PIL.Image.fromstring("RGB", im_size, buf) IHTH, -JJ On Tue, Mar 24, 2009 at 10:34 AM, Philipp Lies <phi...@tu...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I want to convert the current figure to a numpy array w/o saving the > image to disk. I need this to convert a matlab function to python, the > original code is: > F = getframe(gcf); > X = frame2im(F); > > My current workaround is > h = gcf() > h.savefig('tmp.png') > X = imread('tmp.png') > which is obviously not viable. Also I cannot use a different backend. > TkAgg seems to be the only backend running smoothly with ipython on my > machine. > I tried several functions but I couldn't find the right one. I'm using > matplotlib 0.98.6svn and TkAgg as backend. > > Someone knows how to do this neatly? > > Cheers > > Philipp > > - -- > Philipp Lies > > Max Planck Institute for Biological Cybernetics > Computational Vision & Neuroscience Group > Spemannstr. 41 > D-72076 Tuebingen > Germany > > Phone: +49-7071-601-1788 > Fax: +49-7071-601-552 > E-Mail: phi...@tu... > http://www.kyb.mpg.de/bethgegroup > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAknI71kACgkQaEa3WOxVB2w7dwCdFakgnE7RuIQniI0lJyNgUXrK > gsYAmwcdesxLdH6/bS5gQ/LVnsk7lCQm > =zhEv > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Andy Y. <new...@gm...> - 2009-03-24 15:43:05
|
I am trying to generate plots where the y-axis major tick labels are date/times. My tick labels are getting cut off. How can I set a larger area on the left to allow room for my entire date time stamps? fig = Figure() canvas = FigureCanvas(fig) ax = fig.add_subplot(111) ax.plot(x,y) ax.set_title('Gamma Ray') ax.grid(True) ax.set_xlabel('counts/sec') ax.set_ylabel('time') formatter = dates.DateFormatter('%Y-%m-%d %H:%M') ax.yaxis.set_major_formatter(formatter) ax.yaxis.set_major_locator( MinuteLocator( interval=5 ) ) fig.set_size_inches( (10, 10) ) filename = settings.MEDIA_ROOT + '/images/test1.png' fig.savefig(filename) Thanks! Andy |
From: Philipp L. <phi...@tu...> - 2009-03-24 14:34:19
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I want to convert the current figure to a numpy array w/o saving the image to disk. I need this to convert a matlab function to python, the original code is: F = getframe(gcf); X = frame2im(F); My current workaround is h = gcf() h.savefig('tmp.png') X = imread('tmp.png') which is obviously not viable. Also I cannot use a different backend. TkAgg seems to be the only backend running smoothly with ipython on my machine. I tried several functions but I couldn't find the right one. I'm using matplotlib 0.98.6svn and TkAgg as backend. Someone knows how to do this neatly? Cheers Philipp - -- Philipp Lies Max Planck Institute for Biological Cybernetics Computational Vision & Neuroscience Group Spemannstr. 41 D-72076 Tuebingen Germany Phone: +49-7071-601-1788 Fax: +49-7071-601-552 E-Mail: phi...@tu... http://www.kyb.mpg.de/bethgegroup -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknI71kACgkQaEa3WOxVB2w7dwCdFakgnE7RuIQniI0lJyNgUXrK gsYAmwcdesxLdH6/bS5gQ/LVnsk7lCQm =zhEv -----END PGP SIGNATURE----- |
From: Jouni K. S. <jk...@ik...> - 2009-03-24 07:24:14
|
Lou Pecora <lou...@ya...> writes: > I have a question about gnuplot. This may not be the place to ask > this, but I don't know where else (yes, I googled for a Python forum > on gnuplot, but didn't see any -- could have missed it) It seems to me that your problem is not really Python-related even though you use gnuplot through Python, so just try the usual gnuplot forums: http://www.gnuplot.info/help.html > line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list > > I installed AquaTerm after getting this message (and doing some > googling) and reinstalled gnuplot.py, but I still get the message. Sounds like you need to recompile gnuplot, and perhaps pass an --enable-aquaterm option (or similar) to configure (or however it is that you configure gnuplot for compiling). -- Jouni K. Seppänen http://www.iki.fi/jks |
From: Eric F. <ef...@ha...> - 2009-03-24 05:59:45
|
Deltarodigy wrote: > Ok so I have been looking into the Figure class and I still not clear on how > figure works. Does it contain all of the normal functions that are in pylab? > Does it just contain axes which are are where the graphs are, like subplots > in pylab? Do I need to use figure inside of wx widgets or other windowing > toolkit? (It seems from the examples this is true) Any help understanding > this would be appreciated. Please consult the documentation, including examples, to get some background: http://matplotlib.sourceforge.net/contents.html Eric |
From: Deltarodigy <Del...@gm...> - 2009-03-24 03:12:02
|
Ok so I have been looking into the Figure class and I still not clear on how figure works. Does it contain all of the normal functions that are in pylab? Does it just contain axes which are are where the graphs are, like subplots in pylab? Do I need to use figure inside of wx widgets or other windowing toolkit? (It seems from the examples this is true) Any help understanding this would be appreciated. efiring wrote: > > Deltarodigy wrote: >> >> efiring wrote: >>> Deltarodigy wrote: >>>> For my program I have been trying to animate a contour plot, the color >>>> bar, >>>> and a subtitle saying what time step it is. I have gotten the graph to >>>> write >>>> over itself but cannot get it clear the screen properly. Currently >>>> using >>>> the >>>> clf function the wipe is visible messing with animation. >>> This is because all pylab/pyplot functions include a >>> draw_if_interactive. They are intended for interactive use, not for >>> programmed animation. For that you should use the OO interface. Have >>> you worked through the animation examples? >>> http://matplotlib.sourceforge.net/examples/index.html >>> >>> Mpl is not particularly fast, and some operations like contouring are >>> inherently slow, so unless the fields you are contouring are quite >>> simple you may run into performance problems. >>> >>> For animation of contours, you normally want to have contours at fixed >>> intervals, so I expect you will want to specify those contour levels as >>> an argument to the contour and contourf functions (or Axes methods, when >>> you switch to an OO style.) That will allow drawing the colorbar only >>> once. >>> >>> Eric >>> >>>> Here is a link to my project, the graph code is all in gui.py the rest >>>> of >>>> the files are for the generation of the data. >>>> http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d >>> >>> ------------------------------------------------------------------------------ >>> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >>> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >>> easily build your RIAs with Flex Builder, the Eclipse(TM)based >>> development >>> software that enables intelligent coding and step-through debugging. >>> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> >> >> >> I have gotten that far the calculations take so long the rendering speed >> is >> not too important. I have been working on this and I got the subtitle to >> animate. My current problem involves the colorbar. When I update the >> contour >> graph and the titles the written over cleanly, but when the colorbar is >> redrawn it draws a second one right next to it. Reading other threads I >> tried the clf command but the makes the animation kludgy and it has to >> reshrink all of the graphs and such. > > Again, don't use the pyplot interface! For an animation, avoid having > to redraw the colorbar at all; and don't use the pyplot colorbar > command, use the Figure.colorbar method, and explicitly pass in the > colorbar axes to use, via the cax kwarg. Don't leave creation of its > axes to the colorbar method itself more than once, because it will > always create a new one. > > Eric > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/Animate-contour-plot-and-color-bar-tp22671942p22673591.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Eric F. <ef...@ha...> - 2009-03-24 02:07:52
|
Deltarodigy wrote: > > efiring wrote: >> Deltarodigy wrote: >>> For my program I have been trying to animate a contour plot, the color >>> bar, >>> and a subtitle saying what time step it is. I have gotten the graph to >>> write >>> over itself but cannot get it clear the screen properly. Currently using >>> the >>> clf function the wipe is visible messing with animation. >> This is because all pylab/pyplot functions include a >> draw_if_interactive. They are intended for interactive use, not for >> programmed animation. For that you should use the OO interface. Have >> you worked through the animation examples? >> http://matplotlib.sourceforge.net/examples/index.html >> >> Mpl is not particularly fast, and some operations like contouring are >> inherently slow, so unless the fields you are contouring are quite >> simple you may run into performance problems. >> >> For animation of contours, you normally want to have contours at fixed >> intervals, so I expect you will want to specify those contour levels as >> an argument to the contour and contourf functions (or Axes methods, when >> you switch to an OO style.) That will allow drawing the colorbar only >> once. >> >> Eric >> >>> Here is a link to my project, the graph code is all in gui.py the rest of >>> the files are for the generation of the data. >>> http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d >> >> ------------------------------------------------------------------------------ >> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >> easily build your RIAs with Flex Builder, the Eclipse(TM)based development >> software that enables intelligent coding and step-through debugging. >> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > I have gotten that far the calculations take so long the rendering speed is > not too important. I have been working on this and I got the subtitle to > animate. My current problem involves the colorbar. When I update the contour > graph and the titles the written over cleanly, but when the colorbar is > redrawn it draws a second one right next to it. Reading other threads I > tried the clf command but the makes the animation kludgy and it has to > reshrink all of the graphs and such. Again, don't use the pyplot interface! For an animation, avoid having to redraw the colorbar at all; and don't use the pyplot colorbar command, use the Figure.colorbar method, and explicitly pass in the colorbar axes to use, via the cax kwarg. Don't leave creation of its axes to the colorbar method itself more than once, because it will always create a new one. Eric |
From: Deltarodigy <Del...@gm...> - 2009-03-24 01:52:41
|
efiring wrote: > > Deltarodigy wrote: >> For my program I have been trying to animate a contour plot, the color >> bar, >> and a subtitle saying what time step it is. I have gotten the graph to >> write >> over itself but cannot get it clear the screen properly. Currently using >> the >> clf function the wipe is visible messing with animation. > > This is because all pylab/pyplot functions include a > draw_if_interactive. They are intended for interactive use, not for > programmed animation. For that you should use the OO interface. Have > you worked through the animation examples? > http://matplotlib.sourceforge.net/examples/index.html > > Mpl is not particularly fast, and some operations like contouring are > inherently slow, so unless the fields you are contouring are quite > simple you may run into performance problems. > > For animation of contours, you normally want to have contours at fixed > intervals, so I expect you will want to specify those contour levels as > an argument to the contour and contourf functions (or Axes methods, when > you switch to an OO style.) That will allow drawing the colorbar only > once. > > Eric > >> >> Here is a link to my project, the graph code is all in gui.py the rest of >> the files are for the generation of the data. >> http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > I have gotten that far the calculations take so long the rendering speed is not too important. I have been working on this and I got the subtitle to animate. My current problem involves the colorbar. When I update the contour graph and the titles the written over cleanly, but when the colorbar is redrawn it draws a second one right next to it. Reading other threads I tried the clf command but the makes the animation kludgy and it has to reshrink all of the graphs and such. -- View this message in context: http://www.nabble.com/Animate-contour-plot-and-color-bar-tp22671942p22672958.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Eric F. <ef...@ha...> - 2009-03-24 00:49:53
|
Deltarodigy wrote: > For my program I have been trying to animate a contour plot, the color bar, > and a subtitle saying what time step it is. I have gotten the graph to write > over itself but cannot get it clear the screen properly. Currently using the > clf function the wipe is visible messing with animation. This is because all pylab/pyplot functions include a draw_if_interactive. They are intended for interactive use, not for programmed animation. For that you should use the OO interface. Have you worked through the animation examples? http://matplotlib.sourceforge.net/examples/index.html Mpl is not particularly fast, and some operations like contouring are inherently slow, so unless the fields you are contouring are quite simple you may run into performance problems. For animation of contours, you normally want to have contours at fixed intervals, so I expect you will want to specify those contour levels as an argument to the contour and contourf functions (or Axes methods, when you switch to an OO style.) That will allow drawing the colorbar only once. Eric > > Here is a link to my project, the graph code is all in gui.py the rest of > the files are for the generation of the data. > http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d |
From: Deltarodigy <Del...@gm...> - 2009-03-24 00:00:54
|
For my program I have been trying to animate a contour plot, the color bar, and a subtitle saying what time step it is. I have gotten the graph to write over itself but cannot get it clear the screen properly. Currently using the clf function the wipe is visible messing with animation. Here is a link to my project, the graph code is all in gui.py the rest of the files are for the generation of the data. http://code.google.com/p/scc08/source/browse/#svn/branch/realistic2d -- View this message in context: http://www.nabble.com/Animate-contour-plot-and-color-bar-tp22671942p22671942.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: kmilner <km...@us...> - 2009-03-23 21:10:15
|
Hi All, I'm trying to plot evenly grided data to tiles for google maps overlays. Each tile needs to be a 256x256 pixel PNG image, without any borders. The problem that I'm having is that the leftmost column of the resultant PNG image (saved using FigureCanvasAgg.print_figure) is transparent. My real code uses basemap because the output has to be in the mercator projection, but the sample code below is simplified to exclude it. You can view the sample image that is produced at this address: http://earth.usc.edu/ftp/kmilner/trans_test.png Any ideas? Thanks! Kevin #!/usr/bin/env python from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure import numpy dpi = 64 pixels = 256 fig = Figure(linewidth=0, frameon=False) canvas = FigureCanvas(fig) fig.figurePatch.set_alpha(0.0) ax_bounds = [0, 0, 1, 1] ax = fig.add_axes(ax_bounds, axisbg=(1.0,1.0,0.0,0.0), frameon=False ) inches = pixels / dpi fig.set_size_inches(256 / dpi, 256 / dpi) num = 31 z = numpy.empty( (num, num) ) for x in xrange(num): for y in xrange(num): z[x, y] = x * y x, y = numpy.meshgrid( range(num), range(num) ) image = ax.pcolor(x, y, z) image = ax.contourf(x, y, z) canvas.print_figure("/tmp/trans_test.png", dpi=dpi) -- View this message in context: http://www.nabble.com/Leftmost-column-of-PNG-output-is-transparent-tp22669232p22669232.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Lou P. <lou...@ya...> - 2009-03-23 20:58:49
|
I have a question about gnuplot. This may not be the place to ask this, but I don't know where else (yes, I googled for a Python forum on gnuplot, but didn't see any -- could have missed it) Several people have recommended gnuplot (and gnuplot.py) in this email list for 3D plotting (now missing in matplotlib). So I tried it and I get the following errors when I run the demo.py: [myterm] : python demo.py gnuplot> set terminal aqua gnuplot> set title "A simple example" gnuplot> set data style linespoints gnuplot> set terminal aqua ^ line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list I installed AquaTerm after getting this message (and doing some googling) and reinstalled gnuplot.py, but I still get the message. Any clues are welcome. Thank you. -- Lou Pecora, my views are my own. |
From: Cohen-Tanugi J. <co...@lp...> - 2009-03-23 19:19:25
|
http://gael-varoquaux.info/physics/slides_Scipy2007.pdf for a good intro to the high level mayavi API. Johann Etienne Gaudrain wrote: > Ok, I'll go for Mayavi. I am reasonably impressed by the demos. I > haven't been to far into the documentation and I hop I won't regret my > choice. But it looks great so far. > > Thanks for your help !! > > -Etienne > > > > Etienne Gaudrain wrote: > >> Hello list ! >> >> This is probably a recurrent topic, or even more probably HAVE been a >> recurrent topic... So sorry, sorry, sorry... I wanted to search the >> archives but Sourceforge is very slow today (...). >> >> Anyway, here is my question: >> >> Is it right that Matplotlib can no longer plot 3D graphes? >> The scipy Cookbook / Matplotlib / mplot3D says: >> >> >>> The examples below show simple 3D plots using matplotlib. matplotlib's >>> 3D capabilities were added by incorporating John Porter's mplot3d >>> module, thus no additional download is required any more, the >>> following examples will run with an up to date matplotlib >>> installation. Note, this code is not supported in matplotlib-0.98 and >>> later, so please use the 0.91 maintenance release of matplotlib if you >>> need this functionality. >>> >>> >> Which seems a bit like saying one thing and the opposite in the next >> sentence... >> >> So if I understand correctly, for some obscure reason, Matplotlib has >> been stripped from its 3D plot capabilities... and this same website >> suggest the use of another package instead... >> >> Does it mean that all my efforts to understand and learn Matplotlib are >> just a big waste of time since I need another package now that I need 3D >> plot? So I ask you for advice: should I forget completely Matplotlib and >> move to MayaVI2? Or is there any plan to bring 3D back into Matplotlib, >> I mean to make a proper and complete alternative to Matlab? >> >> Or am I just upset because I am missing something. I only plot data >> every 4 or 6 months, and I really don't expect to see major >> functionalities to have disappeared when I come back to plotting data... >> is it a wrong expectation? >> >> Thanks !! >> -Etienne >> >> >> > > > |
From: Christopher B. <c-...@as...> - 2009-03-23 18:17:53
|
Hi Xavier, XG> I'm trying to write a pyqt4 application including pylab plotting XG> capabilities. XG> Up to now, it looks like this (see in attachment). XG> XG> The picker works fine (I get the msg) *but* I also would like to get XG> the (x,y) coordinates and the the corresponding value A[x,y]. XG> Could someone tell me what I should do in on_pick with this "event" XG> to get these data?? XG> XG> Xavier This works for me: def on_pick(self, event): tt = event.artist.get_axes() mouseevent = event.mouseevent msg = "X is: " + str(mouseevent.xdata) + "\nY is: " + str(mouseevent.ydata) QMessageBox.information(self, "Click!", msg) I got some good tips on how to do this from examples/event_handling/pick_event_demo.py -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University |