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) |
|
|
|
|
http://eli.thegreenplace.net/2009/01/20/matplotlib-with-pyqt-guis/ Once you have seen this example (+the picking), you are able do whatever you want ;) You have python, you have the best toolkit I konw (qt4 with qtdesigner) and you have a very nice way to plot 2D data. What else ;) Xavier > I hope to see the project on the web. I'm very intersting by simple > examples using mpl with PyQt. > > Christophe > > >>>> 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 >> >> ------------------------------------------------------------------------------ >> 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 >> >> >> > > > > ------------------------------------------------------------------------------ > 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 >
Hi, everyone, I am a matplotlib beginner. I am trying to do a chart with 2 y axes using twinx() I keep getting error message "malformed header from script. Bad header= is masked in one or more l: test.cgi" when I do two bar charts on two axes. if I do one bar chart and one line chart, I wouldnt get the error. if I refresh the web page, the chart would show up. the following is my code. ... ax = self.fig.add_axes( self.rectMain, axisbg=self.axesBG) ticks = self.setTickInterval( 10, 0, buybackDataobj.sharesMax) ind = na.array(range(len(buybackDataobj.quarters))) majorFormatter = FormatStrFormatter('%2.1f') ax.yaxis.set_major_locator(MultipleLocator( ticks ) ) ax.yaxis.set_major_formatter(majorFormatter) bar(ind, buybackDataobj.shares, self.barwidth, color=self.draw.color['DarkGreen'] ) t = arange(0, float(buybackDataobj.sharesMax), ticks ) ax.set_ylim(0, buybackDataobj.sharesMax * 1.1) ax.set_xlim(0, ind[-1] + self.barwidth*2) ax.set_ylabel("Value Bought " + buybackDataobj.scale, fontsize = self.fontsize ) ax.set_xticks(ind + self.barwidth) ax.set_xticklabels( buybackDataobj.quarters, fontsize = self.fontsize) setp( ax.get_xticklabels(), rotation = self.rotation, horizontalalignment='center', family= 'sans-serif', fontsize = self.xaxisfs ) if buybackDataobj.charttype == 'sells': ax2 = twinx() #ax2.plot(ind + self.barwidth/2, buybackDataobj.sells, ls='-', marker ='.', ms=11, c='#FF3300') // I wouldnt get the error message if I do this plot bar(ind + self.barwidth, buybackDataobj.sells, self.barwidth, color='#FF3300' ) // malformed header from script. Bad header= is masked in one or more l: test.cgi ax2.set_xticklabels(buybackDataobj.quarters, visible=False ) ax2.set_ylim(buybackDataobj.sellsMin * 0.75, buybackDataobj.sellsMax * 1.1) ax2.set_ylabel("Insider Selling $" + buybackDataobj.sellsScale, verticalalignment='center', fontsize = self.fontsize) setp( ax2.get_yticklabels(), rotation = 0, horizontalalignment='left', family='sans-serif', fontsize=self.fontsize ) ............. Can anyone give me some hints on what the problem is? I appreciate your help. Jian
I have been trying to install matplotlib under various versions of python. I was able to get it installed in a 2.4.2 version, but, attempts to install it in 2.5.3 and 2.6.1 have run into the same problem, that being the inability of the setup script to locate numpy and freetpye2, both of which are present on the system, and in the case of numpy, installed under the version I am attempting to install matplotlib into. Our system is running SLES 10, and there is a version of python installed in the standard place. However, I am trying to build this into a different version in a different location. This worked just fine with Python 2.4.2. However, when I try 2.5.3 for example I am getting the following: 12345678911234567892123456789312345678941234567895123456789612345678971234567890 70> python setup.py build ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.98.5.2 python: 2.5.3 (r253:67855, Mar 13 2009, 14:22:40) [GCC 4.1.2 20070115 (prerelease) (SUSE Linux)] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.2.1 freetype2: 9.8.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.8 X11 connection rejected because of wrong authentication. X connection to cfe3:42.0 broken (explicit kill or server shutdown). cfe3.hsp 73> rpm -qa | grep freetype2 freetype2-2.1.10-18.14 freetype2-x86-2.1.10-18.14 freetype2-devel-2.1.10-18.14 s /nasa/pd/python/2.5.3/gcc/lib/python2.5/site-packages/numpy COMPATIBILITY __config__.pyc core f2py numarray site.cfg.example DEV_README.txt __init__.py ctypeslib.py fft oldnumeric testing INSTALL.txt __init__.pyc ctypeslib.pyc lib random tests LICENSE.txt _import_tools.py distutils linalg setup.py version.py README.txt _import_tools.pyc doc ma setup.pyc version.pyc THANKS.txt add_newdocs.py dual.py matlib.py setupscons.py __config__.py add_newdocs.pyc dual.pyc matlib.pyc setupscons.pyc Running the test in python to see the version of numpy works just fine. So, the question is why doesn't the setup.py script find numpy and freetype2. Or, perhaps the question is what do I need to do to get it to find them? The version for numpy is the same as referenced in the "REQUIRED DEPENDENCIES." Perhaps there is a step that I need to do before running python setup.py build that I am unaware of. I am not all that familiar with python in general. If this is not the best place for this kind of question, please let me know. Additional info: uname -a Linux cfe3 2.6.16.54-0.2.5schamp-nasa #1 SMP Mon Jan 21 13:29:51 UTC 2008 ia64 ia64 ia64 GNU/Linux While this system is an IA64, I have run into the same problem on an X86_64 system as well.
I hope to see the project on the web. I'm very intersting by simple examples using mpl with PyQt. Christophe >> >> > 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 > >------------------------------------------------------------------------------ >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 hope to see the project on the web. I'm very intersting by simple examples using mpl with PyQt. Christophe >> >> > 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 > >------------------------------------------------------------------------------ >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 > >
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
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
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
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
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...
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__) + """
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...
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...
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?
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 >> >
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 >
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 >
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
-----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-----
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
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
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.
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
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.
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