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
|
From: Ryugan M. <ryu...@sb...> - 2004-06-16 16:26:56
|
I ran the following script on IDLE and the Boa-constructor. I had a problem on both of these when I didn't include: matplot.interactive(False) Thanks for the info on matplotlibrc. ----- Original Message ----- From: "John Hunter" <jdh...@ac...> To: "Ryugan Mizuta" <ryu...@sb...> Cc: <mat...@li...>; "Barry Drake" <bl...@ad...> Sent: Wednesday, June 16, 2004 6:56 AM Subject: Re: [Matplotlib-users] Re:Newbie Question... > >>>>> "Ryugan" == Ryugan Mizuta <ryu...@sb...> writes: > > Ryugan> Thanks for all who gave me a reply.... Somehow the > Ryugan> following script worked...: > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > from matplotlib.matlab import * > plot([1,2,3,4]) > show() > > > I just want to point out that in my opinion, the easiest way to set > the default backend is to use your matplotlibrc file - > http://matplotlib.sourceforge.net/faq.html#MATPLOTLIBRC. For windows, > this is found at C:\Python23\share\matplotlib\.matplotlibrc. > > You can achieve the same effect by setting > > backend : WX # the default backend > interactive : False # see http://matplotlib.sourceforge.net/interactive.html > > which will not be so invasive to your script (ie, you can change the > default behavior of your scripts w/o changing the scripts > themselves). Using > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > should be something you reserve to depart from the desired default > behavior. > > Glad it's working for you! I have two more questions I am curious > about, for both you and Barry > > * Does WXAgg also work? > > * In which IDEs do you find this combination works? > > Following your question yesterday I added the FAQ entry > http://matplotlib.sourceforge.net/faq.html#FREEZE, and I'd like to > update it to make it as complete as possible. > > JDH |
From: Barry D. <bl...@ad...> - 2004-06-16 13:23:36
|
John, I ran the tests mentioned in a previous msg with both WX and WXAgg. Should also mention that the test with Idle doesn't completely fail. That is the graph window is displayed and the program "appears" to terminate normally. It looks like some memory is being left hanging and Idle, the OS, or matplotlib is trying to write there on subsequent runs of the program (?). Barry --- John Hunter wrote: > >>>>> "Barry" == Barry Drake > writes: > > Barry> Ryugan, Thanks. That fixed my problem as > well: the graph > Barry> window disappearing after the call to > show(). > > Hi Barry, > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > from matplotlib.matlab import * > plot([1,2,3,4]) > show() > > Which line is responsible for the fix? And are you > using WX or WXAgg? > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 > JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's > Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center > in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf > Priority Code NWMGYKND > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: John H. <jdh...@ac...> - 2004-06-16 13:12:12
|
>>>>> "Colin" == Colin Rundel <ru...@ma...> writes: Colin> I'm trying to 'freeze' a script of mine using py2exe and I Colin> cant seem to get it to play nicely with matplotlib. More Colin> specifically, my script is a wxpython frame that displays Colin> several data plots that are created with the Agg backend Colin> and converted to bitmaps. From my limited knowledge of Colin> py2exe it appears that the problem arises from py2exe Colin> trying to import several backends at once. Hi Colin, Sorry for the delay in getting back to you. I just started playing with py2exe. I have an app that uses matplotlib that I would like to freeze as well, so may as well take the plunge. I found I could freeze a simple plot with # setup.py from distutils.core import setup import glob import py2exe data = glob.glob(r'C:\Python23\share\matplotlib\*') data.append(r'C:\Python23\share\matplotlib\.matplotlibrc') setup(console=["simple_plot.py"], data_files=[("share",data)], ) where simple_plot.py is from matplotlib.matlab import * plot([1,2,3]) show() I also got a similar warning message at the end like you about "The following modules appear to be missing" but it appears to be harmless. A simple_plot.exe was created in my dist dir, as were a number of dlls and the matplotlib share data dir. I had to set the MATPLOTLIB env var to point to the share dir, ie set MATPLOTLIBDATA=c:\python\jdh\py2exe\simple_plot\dist\share but then it (partly) worked. TkAgg and WXAgg worked out of the box (I could change the default backend in the rc file). Plain vanilla WX behaved strangely: The WX frame with navigation bars etc popped up but no graph. I could click 'save' and save the graph to a jpeg which viewed correctly. But no image in the wx frame. Hmm. Haven't gotten GTK* working yet. Are you using the latest py2exe? Notably, I didn't get the gtk dll error when I left out the excludes. JDH |
From: Barry D. <bl...@ad...> - 2004-06-16 13:07:55
|
John, I tested with DrPython 2.4.2, PyPe 1.9, PythonWin, Idle, SciTE 1.6, and, my usual dev environment, UltraEdit 10.20b. Only SciTE hasn't worked so far; it exits with the error: Fatal Python error: PyEval_RestoreThread: NULL tstate Even from a Win shell (DOS) the disappearing window problem occurred until I inserted the line matplotlib.interactive(False) Idle seems to fail on the second run with error: Unhandled exception at 0x1e0078d4 in pythonw.exe: 0xC0000005: Access violation reading location 0x00000004. In the MS debugger I see the disassembled code: 1E0078CF nop 1E0078D0 mov edx,dword ptr [esp+4] 1E0078D4 mov ecx,dword ptr [edx+4] where it breaks on the last line. Thanks for the pointer on the matplotlibrc file. I'll switch to using that from now on (more *nix-like anyway). Barry --- John Hunter wrote: > >>>>> "Ryugan" == Ryugan Mizuta > <ryu...@sb...> writes: > > Ryugan> Thanks for all who gave me a reply.... > Somehow the > Ryugan> following script worked...: > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > from matplotlib.matlab import * > plot([1,2,3,4]) > show() > > > I just want to point out that in my opinion, the > easiest way to set > the default backend is to use your matplotlibrc file > - > http://matplotlib.sourceforge.net/faq.html#MATPLOTLIBRC. > For windows, > this is found at > C:\Python23\share\matplotlib\.matplotlibrc. > > You can achieve the same effect by setting > > backend : WX # the default backend > interactive : False # see > http://matplotlib.sourceforge.net/interactive.html > > which will not be so invasive to your script (ie, > you can change the > default behavior of your scripts w/o changing the > scripts > themselves). Using > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > should be something you reserve to depart from the > desired default > behavior. > > Glad it's working for you! I have two more > questions I am curious > about, for both you and Barry > > * Does WXAgg also work? > > * In which IDEs do you find this combination > works? > > Following your question yesterday I added the FAQ > entry > http://matplotlib.sourceforge.net/faq.html#FREEZE, > and I'd like to > update it to make it as complete as possible. > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 > JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's > Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center > in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf > Priority Code NWMGYKND > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: John H. <jdh...@ac...> - 2004-06-16 12:32:32
|
>>>>> "Barry" == Barry Drake <bl...@ad...> writes: Barry> Ryugan, Thanks. That fixed my problem as well: the graph Barry> window disappearing after the call to show(). Hi Barry, import matplotlib matplotlib.interactive(False) matplotlib.use("WX") from matplotlib.matlab import * plot([1,2,3,4]) show() Which line is responsible for the fix? And are you using WX or WXAgg? JDH |
From: John H. <jdh...@ac...> - 2004-06-16 12:20:29
|
>>>>> "Ryugan" == Ryugan Mizuta <ryu...@sb...> writes: Ryugan> Thanks for all who gave me a reply.... Somehow the Ryugan> following script worked...: import matplotlib matplotlib.interactive(False) matplotlib.use("WX") from matplotlib.matlab import * plot([1,2,3,4]) show() I just want to point out that in my opinion, the easiest way to set the default backend is to use your matplotlibrc file - http://matplotlib.sourceforge.net/faq.html#MATPLOTLIBRC. For windows, this is found at C:\Python23\share\matplotlib\.matplotlibrc. You can achieve the same effect by setting backend : WX # the default backend interactive : False # see http://matplotlib.sourceforge.net/interactive.html which will not be so invasive to your script (ie, you can change the default behavior of your scripts w/o changing the scripts themselves). Using import matplotlib matplotlib.interactive(False) matplotlib.use("WX") should be something you reserve to depart from the desired default behavior. Glad it's working for you! I have two more questions I am curious about, for both you and Barry * Does WXAgg also work? * In which IDEs do you find this combination works? Following your question yesterday I added the FAQ entry http://matplotlib.sourceforge.net/faq.html#FREEZE, and I'd like to update it to make it as complete as possible. JDH |
From: Barry D. <bl...@ad...> - 2004-06-16 12:16:22
|
Ryugan, Thanks. That fixed my problem as well: the graph window disappearing after the call to show(). Barry --- Ryugan Mizuta wrote: > Thanks for all who gave me a reply.... > > Somehow the following script worked...: > > import matplotlib > matplotlib.interactive(False) > matplotlib.use("WX") > > from matplotlib.matlab import * > plot([1,2,3,4]) > show() > > Thanks all for the help. > > Ryugan > > |
From: Ryugan M. <ryu...@sb...> - 2004-06-16 09:06:34
|
Thanks for all who gave me a reply.... Somehow the following script worked...: import matplotlib matplotlib.interactive(False) matplotlib.use("WX") from matplotlib.matlab import * plot([1,2,3,4]) show() Thanks all for the help. Ryugan |
From: John H. <jdh...@ac...> - 2004-06-16 03:05:00
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: Flavio> how do I force the second plot to have the same limits on Flavio> the x axis as the first? The short answer is you can't. You could write some helper functions or classes to force axes to behave similarly. The example code below will call any function on all the axes. Use with caution! class CallAll: def __init__(self, seq, name): self.seq = seq self.name = name def __call__(self, *args, **kwargs): for a in self.seq: func = getattr(a, self.name) func(*args, **kwargs) class SharedAxes: def __init__(self, axlist): self.axlist = axlist def __getattr__(self, key): return CallAll(self.axlist, key) ax1 = subplot(211) plot(blah, blah) ax2 = subplot(212) plot(blah, blah) shared = SharedAxes((ax1, ax2)) shared.set_xlim(0,2) |
From: Barry D. <bl...@ad...> - 2004-06-15 20:12:26
|
Sorry, just realized that I didn't send this to the list: John, I've been running the same examples in all of the IDE's with the WX backend without any problems. I ran them again when I saw this message. To the examples I just add the two lines: import matplotlib matplotlib.use("WXAgg") and all is well. Without these lines the graph windows freeze (in WinXP). However, after upgrading to version 0.5.4.2 there is a new problem: after show() is run, the app quits and the window disappears without any diagnostic output. This happens with all of the examples that I've tried so far. Before the upgrade they were working fine. I haven't started debugging this yet. Any ideas? System: Win XP Pro, 1GB RAM, Pentium 4 2.6GHz Python 2.3.3, GTK-Runtime-Environment-2.2.4-3, pygtk-2.2.0-1.win32-py2.3 Regaards, Barry Drake --- John Hunter wrote: > >>>>> "Ryugan" == Ryugan Mizuta > <ryu...@sb...> writes: > > Ryugan> Sorry, I'm a newbie and needed some help > to get started. > Ryugan> I downlaoded the Enthought version(for > WXPython) which is > Ryugan> recommended in the web-site and > downloaded the latest > Ryugan> version of matplot. I'm trying to go > through the tutorial > Ryugan> and I'm stuck with the first example. > The following is > Ryugan> what I wrote down on the script: > > Ryugan> import matplotlib matplotlib.use("WX") > > Ryugan> from matplotlib.matlab import * > plot([1,2,3,4]) show() > > Ryugan> When I run this script it creates a > graph but the the > Ryugan> window freezes.... > > Ryugan> Anybody have any suggestions on how I > can fix this...???? > > I'll bet dollars to donuts you are running > matplotlib inside an IDE, > eg Idle, PythonWin, Scintilla, etc. Quoting from > http://matplotlib.sourceforge.net/installing.html > > Important: There are known conflicts with some of > the backends with > some python IDEs such as pycrust, idle. If you > want to use > matplotlib from an IDE, please consult the > backends documentation > for compatibility information. You will have the > greatest likelihood > of success if you run the examples from the > command shell or by > double clicking on them, rather than from an IDE. > If you are > interactively generating plots, your best bet is > TkAgg from the > standard python shell. > > The "backends" page, referred to above, is at > http://matplotlib.sourceforge.net/backends.html. > Basically, you > should open up a command shell and try to run one of > the examples from > the matplotlib src distribution (the *.zip file for > windows users); > Eg, > > c:\matplotlib\examples> python simple_plot.py > > if this works fine (my guess is it will), then > you'll know you have an > IDE problem and not a matplotlib specific problem. > Unfortunately, > this problem tends to crop up a lot. See for > example > http://sourceforge.net/mailarchive/message.php?msg_id=8610351 > and the > responses to that post for more information > > > Let me know if this is the case. > > JDH > > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 > JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's > Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center > in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf > Priority Code NWMGYKND > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: John H. <jdh...@ac...> - 2004-06-15 17:56:24
|
>>>>> "Istvan" == Istvan Albert <iu...@ps...> writes: Istvan> Hello Folks, At the end of a batch script using Istvan> matplotlib, once I close the plot window I'm getting a Istvan> python prompt: >>>> This question comes up fairly often, so I added a FAQ entry to cover it http://matplotlib.sourceforge.net/faq.html#PROMPT Cheers! JDH |
From: Istvan A. <iu...@ps...> - 2004-06-15 14:19:46
|
Hello Folks, At the end of a batch script using matplotlib, once I close the plot window I'm getting a python prompt: >>> that waits for input. I searched the docs but I did not see this mentioned. What do I need to do to have the script exit once I close the plot window? thanks, Istvan. |
From: John H. <jdh...@ac...> - 2004-06-15 14:07:20
|
>>>>> "Ryugan" == Ryugan Mizuta <ryu...@sb...> writes: Ryugan> Sorry, I'm a newbie and needed some help to get started. Ryugan> I downlaoded the Enthought version(for WXPython) which is Ryugan> recommended in the web-site and downloaded the latest Ryugan> version of matplot. I'm trying to go through the tutorial Ryugan> and I'm stuck with the first example. The following is Ryugan> what I wrote down on the script: Ryugan> import matplotlib matplotlib.use("WX") Ryugan> from matplotlib.matlab import * plot([1,2,3,4]) show() Ryugan> When I run this script it creates a graph but the the Ryugan> window freezes.... Ryugan> Anybody have any suggestions on how I can fix this...???? I'll bet dollars to donuts you are running matplotlib inside an IDE, eg Idle, PythonWin, Scintilla, etc. Quoting from http://matplotlib.sourceforge.net/installing.html Important: There are known conflicts with some of the backends with some python IDEs such as pycrust, idle. If you want to use matplotlib from an IDE, please consult the backends documentation for compatibility information. You will have the greatest likelihood of success if you run the examples from the command shell or by double clicking on them, rather than from an IDE. If you are interactively generating plots, your best bet is TkAgg from the standard python shell. The "backends" page, referred to above, is at http://matplotlib.sourceforge.net/backends.html. Basically, you should open up a command shell and try to run one of the examples from the matplotlib src distribution (the *.zip file for windows users); Eg, c:\matplotlib\examples> python simple_plot.py if this works fine (my guess is it will), then you'll know you have an IDE problem and not a matplotlib specific problem. Unfortunately, this problem tends to crop up a lot. See for example http://sourceforge.net/mailarchive/message.php?msg_id=8610351 and the responses to that post for more information Let me know if this is the case. JDH |
From: Ryugan M. <ryu...@sb...> - 2004-06-15 08:12:50
|
Sorry, I'm a newbie and needed some help to get started. I downlaoded the Enthought version(for WXPython) which is recommended = in the web-site and downloaded the latest version of matplot. I'm = trying to go through the tutorial and I'm stuck with the first example. = The following is what I wrote down on the script: import matplotlib matplotlib.use("WX") from matplotlib.matlab import * plot([1,2,3,4]) show() When I run this script it creates a graph but the the window freezes.... Anybody have any suggestions on how I can fix this...???? Thanks. Ryugan |
From: Peter G. <pgr...@ge...> - 2004-06-15 03:26:44
|
Hi John: > plot_date looks at the range of your date data and tries to pick the > appropriate > date tick locator based on that range (ie a YearLocator, MonthLocator, > MinuteLocator, etc). It does?! Do you mean that this is done automatically? Can you show me an example of this using only the time module (since I use python2.2, dont have datetime)? I thought that I had to manually set things up and tell matplotlib whether to use YearLocator, MonthLocator, etc.. via calls to: axes.xaxis.set_minor_locator(), axes.xaxis.set_major_locator(), axes.xaxis.set_major_formatter(). In other words for every plot, check the time range of my data, figure out how many ticks I want, and decide whether to use months, days, hours, etc... In fact, because I was getting some inconsistent results with using the above, I decided that for the most part (excluding a few special cases), I would print the time ticks myself 'manually'. The script below shows what I mean. On the other note, regarding the weird scaling that I talked about (and showed pretty pics for) in my last mail, I finally put together a small script that exposes the problem. It is a bit rough because I ripped bits and pieces from here and there, but shows the issue. Use the 'wantBadPlot' and 'wantStandardDateTics' to see how things go wrong. -------------------------------- #!/usr/bin/env python import time from matplotlib.dates import EpochConverter from matplotlib.matlab import * from matplotlib.ticker import FuncFormatter, NullLocator, MinuteLocator, DayLocator, HourLocator, MultipleLocator, DateFormatter wantBadPlot=1 wantStandardDateTics=1 wantLegend=1 if wantBadPlot: time1=[1087192789.89] data1=[-65.54] else: time1=[1087192289.89, 1087193789.89] data1=[-44.343, -65.54] time2=[ 1087161589.89 , 1087192289.0, 1087192389.0, 1087192489.0, 1087192589.0, 1087192689.0, 1087192789.89 , 1087192889.0, 1087192989.0, 1087193089.0, 1087193189.0, 1087193289.0, 1087238100.0 , ] data2=[ -55.44 -64.54 , -66.54 , -61.54 , -69.54 , -45.66, -55.54 , -77.54, -65.54 , -49.54 , -57.54 , -68.54 , -55.54 , -23.44 ] ax = subplot(111) p1Size=len(time1) p2Size=len(time2) p1=plot_date(time1, data1, None, '-', color='r') p2=plot_date(time2, data2, None, '-', color='b') if wantStandardDateTics: fmt=DateFormatter('%H:%M') hours=HourLocator(4) ax.xaxis.set_minor_locator(NullLocator()) ax.xaxis.set_major_locator(hours) ax.xaxis.set_major_formatter(fmt) ax.autoscale_view() else: #Manually display dates for tick-labels. Technically could use plot() and #get the same result. now=time2[-1] then=time2[0] deltaSec=now-then deltaTickSec=deltaSec/7.0 tickList=[item for item in list(arange(then, now, deltaTickSec))] def tickString(x, pos): return time.strftime("%H:%M:%S", time.localtime(x)) formatter = FuncFormatter(tickString) ax.set_xticks(tickList) ax.xaxis.set_major_formatter(formatter) ax.xaxis.set_minor_locator(NullLocator()) ax.autoscale_view() #This will fix the problem!! #ax.set_xlim((then, now)) if wantLegend: legend((p1, p2), ('small data set (%d)' % p1Size, 'large data set (%d)' % p2Size)) xlabel('time') grid(True) show() #savefig('./blah.png') ------------------------------- Any ideas? Finally, just want to verify (form my last email) that in axes.py: def get_ylim(self): "Get the y axis range [ymin, ymax]" return self.viewLim.intervalx().get_bounds() should intervax() be intervaly()?? Thanks, -- Peter Groszkowski Gemini Observatory Tel: +1 808 974-2509 670 N. A'ohoku Place Fax: +1 808 935-9235 Hilo, Hawai'i 96720, USA John Hunter wrote: >>>>>> "Peter" == Peter Groszkowski <pio...@ho...> writes: >>>>>> >>>>> > > Peter> I found another issue with plot_date. Dont have a simple > Peter> example yet, and hope that this is something 'obvious' and > Peter> I don't have to bother. > > There is clearly something wrong with the autoscale function of one of > the date tick locators. It would help to know which one. plot_date > looks at the range of your date data and tries to pick the appropriate > date tick locator based on that range (ie a YearLocator, MonthLocator, > MinuteLocator, etc). If I knew which tick locator was behaving badly, > it would help me fix the problem. > > If you > print ax.xaxis._majorLocator > > after the call to plot_date, and let me know which locator it is, I > can probably figure out where the problem is. To simplify, don't > explicitly set the date xlim range when you do this. > > On a side note, in your example code you call > > ax.viewLim.intervalx().set_bounds(minXValueImPlotting, > maxXValueImPlotting) > > I assume you did this to narrow down the possible causes of problems. > As you know, this is the call that ax.set_xlim makes under the hood. > But in general, it's safest to stick to the axes API, ie, call > > ax.set_xlim(minXValueImPlotting, maxXValueImPlotting) > > since this interface is guaranteed to be stable. > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the > one installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: John H. <jdh...@ac...> - 2004-06-15 02:03:17
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: Flavio> Hi, This subject has already come up before and John Flavio> suggested using Flavio> f = figure(1, frameon=False) Flavio> for a totally transparent background which works fine as Flavio> an optional argumento to subplot in the matlab interface Flavio> subplot(111, frameon=False) Flavio> I want to know what would be the equivalent to Flavio> f._figurePatch.set_alpha(0.0) Flavio> for the matlab interface, since subplot does not have a Flavio> _figurePatch atribute. I'm not sure exactly what you are asking. Axes and Subplot don't have a _figurePatch, but they do have an _axesPatch, which as you note you can turn off by using frameon=False. If you want to set it's alpha, do ax = subplot(111) frame = ax.get_frame() frame.set_alpha(0.0) Is this what you are looking for? JDH |
From: John H. <jdh...@ac...> - 2004-06-15 01:57:06
|
>>>>> "Mark" == Mark Engelhardt <ma...@st...> writes: Mark> If I have axis labels with line returns in them, they end up Mark> overlapping with the plot area and other elements in the Mark> figure. Is there a way to change their placement to move Mark> them away from the plot? Is there a way to define the area Mark> occupied by a subplot to include the axis labels and titles Mark> such that multiple subplots do not have overlapping text? Mark> (This is related to another question I just posted, but I Mark> tried to separate these issues for easier referencing by Mark> others later on). There is no way to do this automatically at present. You can explicitly define the size of your axes so that they don't overlap each other, but this can take some trial and error. subplot is just a special case of axes that specifies the left, bottom, width, height rectangle of the axes in a matlab consistent way. The axes coordinates are normalized as fractions of the entire figure. See ganged_plots and axes_demo.py in the examples directory of the matplotlib src distribution for examples of setting the axes boundaries explicitly. It is possible to write some automatic axes layout functions similar to the ones you are looking for, eg, place axes 2 below axes 1 taking into account tick labels and so on, but they doesn't currently exist. It's also possible to write some GUI interaction code so these can be dynamically resized - I can post some example code if you like. The other things you may want to consider are * decreasing the tick padding (the spacing between the axes and tick label With the latest matplotlib this is controlled by tick.major.pad in the rc file * use a smaller tick font size, controlled by tick.labelsize Hope this helps, JDH |
From: Mark E. <ma...@st...> - 2004-06-15 01:03:15
|
Hi, I've spent a while searching for the answer to this, and I'm at the point of giving up... but it seems like it should be easy. If I have axis labels with line returns in them, they end up overlapping with the plot area and other elements in the figure. Is there a way to change their placement to move them away from the plot? Is there a way to define the area occupied by a subplot to include the axis labels and titles such that multiple subplots do not have overlapping text? (This is related to another question I just posted, but I tried to separate these issues for easier referencing by others later on). Thanks, Mark |
From: Mark E. <ma...@st...> - 2004-06-15 00:59:14
|
Hi, Is there a way to change the spacing between subplots when using multiple subplots per figure? I'm getting overlap between titles and x-labels. Thanks, Mark |
From: Curtis C. <cu...@hi...> - 2004-06-14 16:42:45
|
Mr. Hunter, Thank you for your reply. I am considering trying to develop the 2D vector field plots myself using line collections, as you suggest. Cheers, Curtis On Sat, 12 Jun 2004, John Hunter wrote: > >>>>> "Curtis" == Curtis Cooper <cu...@hi...> writes: > > Curtis> Hi, I am excited about the relatively new imshow and > Curtis> pcolor features in matplotlib. I am using numarray to > Curtis> reduce/diagnose planetary atmospheres simulations, which > Curtis> consist of temperature and velocity data on gridpoints in > Curtis> longitude, latitude, and pressure. > > Curtis> In addition to contour plots, which is on the goals list > Curtis> for this project, I would like a feature added that allows > Curtis> me to make velocity arrows overlaying the pcolor or imshow > Curtis> images, as is common in meteorology maps. Will such a > Curtis> feature be available in matplotlib, and if so, how soon? > Curtis> Thanks for all the great work so far! > > Hi Curtis, > > Actually this is on the goals page, listed as 2D vector plots - could > be more descriptive there. So yes, it is a priority. But I can't > really give an estimate at this point of when it will be done. > > Working in your favor is that it should be fairly easy now that line > collections exist. These were implemented in 0.54 and allow the fast > drawing of a bunch of independent line segments, which both contours > and vector fields have. Now that the infrastructure exists to do > these efficiently, it makes it more likely that they will be added > sooner rather than later. But there are a number of other equally important > features on the TODO list, which is why I don't have a definite > estimate. > > As the goals page states > > Priorities can be changed in one of two ways: convincing one of the > existing developers to make an item a higher priority (for example, > if many users request the feature) or by helping to add the feature > yourself (i.e., becoming a new developer). > > You've just done option 1. You're invited to try option 2! > > Cheers, > JDH > |
From: Yann Le Du <yan...@no...> - 2004-06-13 22:16:20
|
Hello, Just to report a very minor thing, a broken link on the matplotlib website : in the tutorial page, in the table summarising the "Lines properties", the "color" hyperlink is broken. -- Yann Le Du http://www-thphys.physics.ox.ac.uk/users/YannLeDu |
From: Colin R. <ru...@ma...> - 2004-06-13 17:37:32
|
I'm trying to 'freeze' a script of mine using py2exe and I cant seem to get it to play nicely with matplotlib. More specifically, my script is a wxpython frame that displays several data plots that are created with the Agg backend and converted to bitmaps. From my limited knowledge of py2exe it appears that the problem arises from py2exe trying to import several backends at once. My specific setup is as follows: Followed all the steps listed here: http://sourceforge.net/mailarchive/forum.php?thread_id=4031953&forum_id=33405 Also attempted using excludes as mentioned here: http://starship.python.net/crew/theller/moin.cgi/MatPlotLib # setup.py from distutils.core import setup import py2exe import glob data = glob.glob(r"C:\Python23\share\matplotlib\*") opts = {'py2exe': { 'excludes': ['_gtkagg', '_tkagg'], 'dll_excludes': ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll'] } } setup( name="Sleepy", version="0.5.0", console=["sleepy.py"], data_files=[("share",data)], options = opt ) #fsleepy.py import list if it helps at all import wx from wxPython.wx import * from wxPython.gizmos import wxTreeListCtrl from wxPython.lib.buttons import * import matplotlib import matplotlib.ft2font import matplotlib.backends.backend_agg import ttfquery from matplotlib.matlab import * matplotlib.use('Agg') from matplotlib.backends.backend_agg import FigureCanvasAgg from matplotlib.figure import Figure from matplotlib.axes import Subplot import win32com.client import pickle, math, string, calendar, time, os, os.path Finally, I'll attach output from two runs of py2exe on the target with and without the excludes listed in the py2exe wiki. Thanks, -Colin |
From: John H. <jdh...@ac...> - 2004-06-13 02:40:45
|
>>>>> "Peter" == Peter Groszkowski <pio...@ho...> writes: Peter> I found another issue with plot_date. Dont have a simple Peter> example yet, and hope that this is something 'obvious' and Peter> I don't have to bother. There is clearly something wrong with the autoscale function of one of the date tick locators. It would help to know which one. plot_date looks at the range of your date data and tries to pick the appropriate date tick locator based on that range (ie a YearLocator, MonthLocator, MinuteLocator, etc). If I knew which tick locator was behaving badly, it would help me fix the problem. If you print ax.xaxis._majorLocator after the call to plot_date, and let me know which locator it is, I can probably figure out where the problem is. To simplify, don't explicitly set the date xlim range when you do this. On a side note, in your example code you call ax.viewLim.intervalx().set_bounds(minXValueImPlotting, maxXValueImPlotting) I assume you did this to narrow down the possible causes of problems. As you know, this is the call that ax.set_xlim makes under the hood. But in general, it's safest to stick to the axes API, ie, call ax.set_xlim(minXValueImPlotting, maxXValueImPlotting) since this interface is guaranteed to be stable. JDH |
From: John H. <jdh...@ac...> - 2004-06-13 00:02:43
|
>>>>> "Curtis" == Curtis Cooper <cu...@hi...> writes: Curtis> Hi, I am excited about the relatively new imshow and Curtis> pcolor features in matplotlib. I am using numarray to Curtis> reduce/diagnose planetary atmospheres simulations, which Curtis> consist of temperature and velocity data on gridpoints in Curtis> longitude, latitude, and pressure. Curtis> In addition to contour plots, which is on the goals list Curtis> for this project, I would like a feature added that allows Curtis> me to make velocity arrows overlaying the pcolor or imshow Curtis> images, as is common in meteorology maps. Will such a Curtis> feature be available in matplotlib, and if so, how soon? Curtis> Thanks for all the great work so far! Hi Curtis, Actually this is on the goals page, listed as 2D vector plots - could be more descriptive there. So yes, it is a priority. But I can't really give an estimate at this point of when it will be done. Working in your favor is that it should be fairly easy now that line collections exist. These were implemented in 0.54 and allow the fast drawing of a bunch of independent line segments, which both contours and vector fields have. Now that the infrastructure exists to do these efficiently, it makes it more likely that they will be added sooner rather than later. But there are a number of other equally important features on the TODO list, which is why I don't have a definite estimate. As the goals page states Priorities can be changed in one of two ways: convincing one of the existing developers to make an item a higher priority (for example, if many users request the feature) or by helping to add the feature yourself (i.e., becoming a new developer). You've just done option 1. You're invited to try option 2! Cheers, JDH |
From: Peter G. <pio...@ho...> - 2004-06-12 06:01:43
|
hmm... forgot to attach the images... --- I found another issue with plot_date. Dont have a simple example yet, and hope that this is something 'obvious' and I don't have to bother. I attach two images showing the issue. I can go get rid of the weird scaling in 'bad.png' when I do: ax.viewLim.intervalx().set_bounds(minXValueImPlotting, maxXValueImPlotting) after: ax.autoscale_view() I also noticed a couple of things inside axes.py, that might be wrong: 1) def get_ylim(self): "Get the y axis range [ymin, ymax]" return self.viewLim.intervalx().get_bounds() should that intervax() be intervaly() ?? 2) panx() and pany() are different as well, but perhaps they should be.. Changin these two things does not fix my problem so it has to be something else - hoping a simple typo. Will try to write a demo script that shows this... (I have matplotlib wrapped into other code so its not really a copy/paste-all type deal). Peter John Hunter wrote: >>>>>>"Michael" == Michael Hauser <ha...@na...> writes: > > > > Michael> Hello, I am having a problem with plot_date. I keep > Michael> getting the error: > > Michael> Am I missing something obvious? > >No, there is a bug in plot_date in setting the tick formatter object. >I didn't find this in any of my test or example scripts since all >those explicitly set the formatter and hence hid the bug. At the end >of the Axes.plot_date function in matplotlib.axes, replace > > self.xaxis.set_minor_locator(formatter) > >with self.xaxis.set_major_formatter(formatter) > >and you'll be good to go. Note however that there is a problem with >your script in that the length of your x and y arrays must be the >same. After making the changes above, try > >from datetime import datetime >from matplotlib.dates import EpochConverter >from matplotlib.matlab import * > >times = [1084195314, 1084195375, 1084195436, 1084195497, 1084195557] >vals = [10.2, 11.1, 8.7, 12.1, 12.2] >converter = EpochConverter() >ax = subplot(111) >plot_date(times, vals, converter) >savefig('test') >show() > > > > >------------------------------------------------------- >This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the >one installation-authoring solution that does it all. Learn more and >evaluate today! http://www.installshield.com/Dev2Dev/0504 >_______________________________________________ >Matplotlib-users mailing list >Mat...@li... >https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |