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: Daniele V. <dva...@vi...> - 2004-06-24 16:59:58
|
I am testing matplotlib for the first time, but it continuously hang after a really short time. I read all the troubles about running it from an ide, so i'm using plain cmd. Microsoft Windows 2000 [Versione 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\Documents and Settings\daniele>python Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib.matlab import * >>> t = arange(0.0, 5.2, 0.2) >>> plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^') [<matplotlib.lines.Line2D instance at 0x0100F6E8>, <matplotlib.lines.Line2D inst ance at 0x0100F788>, <matplotlib.lines.Line2D instance at 0x0100F7B0>] The window pops up as expected. Now i switch to an ie window to watch online docs looking for axis command syntax... When i'm back to the prompt, the plot window is frozen. If visualized it doesn't redraw itself and clicking on the close button in the menu bar pops it up the not-responding-app dialog. The Python prompt is still functional. When i try to exit i get (WXAgg backend): >>> ^Z Fatal Python error: PyEval_RestoreThread: NULL tstate abnormal program termination C:\Documents and Settings\daniele> The problem doesn't depend from the backend used: i tried, TkAgg, WX, WXAgg. Sontimes i can add a title to a graph but it will always hang within a minute. I have a pretty fresh installation of Python 2.3.4 with numpy 0.9. I used matplotlib-0.54.2-numarray0.9.win32-py2.3.exe. I also tried to use matplotlib 0.54.1 but it looks like it need numpy to work (i think it's wrong, i installed the numarray version) and i don't want to install it. No tries with other releases. I currently don't have any problem in running neither wxwindows nor tk apps. Does anybody experienced the same problem? Regards -- Daniele Varrazzo Dipartimento di Biologia Molecolare Universita' di Siena Via Fiorentina, 1 53100 SIENA (Italy) |
From: Gregory L. <gre...@ff...> - 2004-06-24 12:56:13
|
I checked on another WinXP computer, and it works on this one - seems that I have to play the windows re-install game, or hunt down what the exact differences between these 2 WinXP computers are :-/... The fact that only matplotlib exhibit this behavior is strange though, I checked in the code (hence cc to the devel list) and the problem is linked to an assert in the destructor of PythonExtensionBase, checking that the ref counting of this object is 0 and exiting Python interpreter if it is not the case...Hum, obviously I do not know the code at all, but could the problem be linked to a destruction sequence beeing somewhat different on my computer (for whatever reasons :-/)? This worry me (in addition to bother me not beeing able to run matplotlib on my laptop for the moment ;-) ), cause it may be the sign of "difficult to solve and reproduce" installation problems for a package we may use in a distributed software package in the future... I will keep investigating, but if there is a developer have any idea about this (like, a hint about why there is this assert there and what can cause it to fail), it would be great! Thanks a lot, and congratulation for matplotlib, it looks the most promising python plotting packages I have found yet! :-) |
From: Gregory L. <gre...@ff...> - 2004-06-24 11:32:23
|
Thanks for helping with this problem! I just tried on a win2000 Pro computer, and indeed, no problem... Then, on my WinXP laptop, I removed python, reinstalled it (2.3.4), next numarray (0.9), then matplotlib (0.54.2), the exact same windows installers that were used on the Win2000 computer, and same problem as before, crash on matplotlib.matlab import...Weird! I will try to perform the same installation on another WinXP computer, to be sure the problem is not related to incompatibilities with other softwares installed on my laptop, or some registery entries, and keep the list informed of the results of this test. Best regards, Greg. |
From: Philippe B. <pb...@pa...> - 2004-06-24 06:40:55
|
Todd Miller <jm...@st...> =E9crit : > > I just tried to install matplotlib on a WinXP computer, after a > > successfull install on Linux. > > The problem I encounter is the following (transcript of an > > interractive session):=20 > > Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] > > on win32 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import matplotlib > > >>> matplotlib.use("TkAgg") > > >>> from matplotlib.matlab import * > > Assertion failed: ob_refcnt =3D=3D 0, file CXX/cxx_extensions.cxx, li= ne > > 1031 > I tried this configuration on Windows 2000 Pro and it worked fine. > I haven't tried this configuration on Windows XP yet... I'll try later > to see if I can reproduce the problem. I tried this code with WinXP version 5.1 and python 2.3.2, and I have not problem it's Ok :-) Philippe Bouige |
From: Todd M. <jm...@st...> - 2004-06-23 20:48:50
|
On Wed, 2004-06-23 at 12:42, Gregory Lielens wrote: > Hello All, > I just tried to install matplotlib on a WinXP computer, after a > successfull install on Linux. > The problem I encounter is the following (transcript of an > interractive session): > > --- > C:\Python23>python > Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] > on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import matplotlib > >>> matplotlib.use("TkAgg") > >>> from matplotlib.matlab import * > Assertion failed: ob_refcnt == 0, file CXX/cxx_extensions.cxx, line > 1031 > > This application has requested the Runtime to terminate it in an > unusual way. > Please contact the application's support team for more information. > > C:\Python23> > > --- > > This work on Linux, and I can not find any hint in the doc to a > backend/python interpreter incompatibility explaining this error. > > I use numarray version 0.9 (win installer), python 2.3.4 (as shown in > the session transcript), and matplotlib 0.54.2, last windows installer > (the 2004/06/08 21:54:42 build which I think correct some problems > with numarray) > > Now I am wondering if I do something I shouldn't, if my system or > installation is responsible, or if it is a bug in this particular > matplotlib distribution...Any idea? I tried this configuration on Windows 2000 Pro and it worked fine. I haven't tried this configuration on Windows XP yet... I'll try later to see if I can reproduce the problem. Regards, Todd |
From: Gregory L. <gre...@ff...> - 2004-06-23 16:43:46
|
Hello All, I just tried to install matplotlib on a WinXP computer, after a successfull install on Linux. The problem I encounter is the following (transcript of an interractive session): --- C:\Python23>python Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> matplotlib.use("TkAgg") >>> from matplotlib.matlab import * Assertion failed: ob_refcnt == 0, file CXX/cxx_extensions.cxx, line 1031 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. C:\Python23> --- This work on Linux, and I can not find any hint in the doc to a backend/python interpreter incompatibility explaining this error. I use numarray version 0.9 (win installer), python 2.3.4 (as shown in the session transcript), and matplotlib 0.54.2, last windows installer (the 2004/06/08 21:54:42 build which I think correct some problems with numarray) Now I am wondering if I do something I shouldn't, if my system or installation is responsible, or if it is a bug in this particular matplotlib distribution...Any idea? Best regards, Greg. |
From: Perry G. <pe...@st...> - 2004-06-23 15:10:22
|
John Hunter wrote: > > Now on to your problem. This is caused by a difference in how Numeric > and numarray treak rank 0 arrays > > >>> from Numeric import asarray > >>> len(asarray(0)) > 1 > >>> from numarray import asarray > >>> len(asarray(0)) > Traceback (most recent call last): > File "<stdin>", line 1, in ? > ValueError: Rank-0 array has no length. > > I don't know why there is this difference but I'm sure Todd or Perry > can comment at length :-). > Boy can we (and we have on the numpy list in the past). But I risk boring those who really don't care. The issue relates to consistency. If rank-0 arrays have a shape of () (and they do), then they: 1) should not be indexable. 2) they have no length. Currently Numeric gives len=1 and allows indexing with [0] It's seemed to me that we need some sort of construct similar to array() that will turn scalars into rank-1 len-1 arrays which can be used like scalars for broadcasting purposes (albeit with different coercion rules; that's a different topic though), and where len() and indexing will work. Another proposal is to treat all arrays (including rank-0) as allowing indexing with any number of 0 indices beyond the defined shape: I.e., if x = arange(10) x[3,0] # same as x[3] So it's a known issue and we are thinking about how best to solve it. > To solve your vline problem, you need to make the vmin and vmax args > of vlines (or hlines) iterable. Ie > > old > > vlines(t, 0, s, color='k') > > new > > vlines(t, [0], s, color='k') > > Should work! Thanks for letting us know. > > |
From: John H. <jdh...@ac...> - 2004-06-23 12:14:15
|
>>>>> "Philippe" == Philippe Bouige <pb...@pa...> writes: Philippe> Hello, Philippe> I try 'vline_demo' in directory 'example' and I have Philippe> problem with vlines ... error : "rank-O array has no Philippe> length". I try also with hlines and I have the same Philippe> problem ... Philippe> I also this error with all the demo : error reading Philippe> package index file C:/Python23/tcl/tix8.1/pkgIndex.tcl: Philippe> invalid command name "lt}]}" Philippe> Have you a explanation ? This turns out to be numarray specific - most of my tests use Numeric which is why I didn't catch that. I'll try and make sure I do a numarray specific test in the future. Todd, perhaps you should also make a note to run backend_driver on your numarray build, at least for Agg. That wouldn't have helped this time, because vline_demo.py was not in the regression suite, but I've added it. Now on to your problem. This is caused by a difference in how Numeric and numarray treak rank 0 arrays >>> from Numeric import asarray >>> len(asarray(0)) 1 >>> from numarray import asarray >>> len(asarray(0)) Traceback (most recent call last): File "<stdin>", line 1, in ? ValueError: Rank-0 array has no length. I don't know why there is this difference but I'm sure Todd or Perry can comment at length :-). To solve your vline problem, you need to make the vmin and vmax args of vlines (or hlines) iterable. Ie old vlines(t, 0, s, color='k') new vlines(t, [0], s, color='k') Should work! Thanks for letting us know. John Hunter |
From: Philippe B. <pb...@pa...> - 2004-06-22 16:23:05
|
Hello, I try 'vline_demo' in directory 'example' and I have problem with vlines ... error : "rank-O array has no length". I try also with hlines and I have the same problem ... I also this error with all the demo : error reading package index file C:/Python23/tcl/tix8.1/pkgIndex.tcl: invalid command name "lt}]}" Have you a explanation ? Thank you very for your help (I work with python 2.3 / windowXP) Philippe |
From: John H. <jdh...@ac...> - 2004-06-22 15:27:55
|
>>>>> "Thomas" == Thomas Barket <tho...@ya...> writes: Thomas> Hello, When I run the following script, the ganged Thomas> candlestick plots appear as expected. However, there is a Thomas> second plot behind but sticking out (with different x and Thomas> y axes) that shouldn't be there. Am I not doing this Thomas> correctly? I can't see where in the code below I am Thomas> mistakenly creating two plots that overlap, or is there a Thomas> bug with ganged candlesticks? Hi Thomas, Delete the line that reads sub = subplot(1, 1, 1) you are creating a subplot that you never use. subplot and axes are both Axes creations commands. Since you manually create your axes with axes, you don't need the subplot. There is a problem with ganged plots in that the ytick labels tend to overlap at the borders. You can fix this using a custom tick formatter - I can help you with this if you need. JDH |
From: Thomas B. <tho...@ya...> - 2004-06-22 14:49:28
|
Hello, When I run the following script, the ganged candlestick plots appear as expected. However, there is a second plot behind but sticking out (with different x and y axes) that shouldn't be there. Am I not doing this correctly? I can't see where in the code below I am mistakenly creating two plots that overlap, or is there a bug with ganged candlesticks? Tks vm, Tom ----------------------------------------------------------- from matplotlib.matlab import * from matplotlib.dates import MONDAY from matplotlib.finance import candlestick from matplotlib.ticker import WeekdayLocator, DayLocator, DateFormatter series1 = [] series1.append((1041379200, 100.0, 100.5, 99.0, 102.0)) series1.append((1041465600, 101.0, 101.5, 98.0, 103.0)) series1.append((1041552000, 103.0, 104.0, 103.0, 106.0)) series1.append((1041638400, 105.0, 102.5, 102.0, 108.0)) series2 = [] series2.append((1041379200, 1000.0, 1000.5, 999.0, 1002.0)) series2.append((1041465600, 1001.0, 1001.5, 998.0, 1003.0)) series2.append((1041552000, 1003.0, 1004.0, 1003.0, 1006.0)) series2.append((1041638400, 1005.0, 1002.5, 1002.0, 1008.0)) series3 = [] series3.append((1041379200, 10000.0, 10000.5, 9999.0, 10002.0)) series3.append((1041465600, 10001.0, 10001.5, 9998.0, 10003.0)) series3.append((1041552000, 10003.0, 10004.0, 10003.0, 10006.0)) series3.append((1041638400, 10005.0, 10002.5, 10002.0, 10008.0)) sub = subplot(1, 1, 1) ax1 = axes([0.1, 0.1, 0.8, 0.25]) # lower ax2 = axes([0.1, 0.35, 0.8, 0.25]) # middle ax2.set_xticklabels([]) ax3 = axes([0.1, 0.6, 0.8, 0.25]) # upper ax3.set_xticklabels([]) candlestick(ax1, series1, width=0.6) candlestick(ax2, series2, width=0.6) candlestick(ax3, series3, width=0.6) mondays = WeekdayLocator(MONDAY) days = DayLocator() fmt = DateFormatter('%b %d') ax1.xaxis.set_major_locator(mondays) ax1.xaxis.set_major_formatter(fmt) ax1.xaxis.set_minor_locator(days) ax1.autoscale_view() show() |
From: John H. <jdh...@ac...> - 2004-06-22 13:10:15
|
>>>>> "Stephen" == Stephen Roderick <snr...@ya...> writes: Stephen> I'm using matplotlib 0.54.2 (failed in 0.53.1 also) on Stephen> Mac OS X with Python 2.3 and wxPython 2.5.1.5, and get Stephen> the following traceback from this code. Looking at the Stephen> backend_wx.py, I can find no other mention of Stephen> "FigureBase" anywhere else. What should this line Stephen> actually be? (I tried a few thoughts, but none worked) Stephen> I'm basically trying to create a class that encapsulates Stephen> a multi-value temperature bar graph, using the Observer Stephen> pattern, and have inherited from the FigureCanvasWx Stephen> class. If this is incorrect, I'm all ears to alternative Stephen> suggestions. Try replacing line 888 in backend_wx with FigureCanvasBase.add_axis(self, a) Sorry for the trouble.... |
From: John H. <jdh...@ac...> - 2004-06-22 13:07:44
|
>>>>> "MWallis" == MWallis <mw...@sw...> writes: MWallis> I am having some problems using the specgram function MWallis> with gtk and was wondering if anyone had an example they MWallis> were willing to share. See http://matplotlib.sf.net/examples for the current examples. Normally, you can always get the examples directory in the src distribution (*.tar.gz or *.zip) but on the last release I failed to upload a zip file. The example you are looking for is called specgram_demo.py. http://matplotlib.sf.net/examples/specgram_demo.py Hope this helps, JDH |
From: John H. <jdh...@ac...> - 2004-06-22 13:03:50
|
from matplotlib.matlab import * m = array([0.1, 0.2, 0.3, 0.6, 0.8, 1, 3]) r = array([18, 180, 1800, 1.8, 0.18, 250, 2.8]) plot(m, r) set(gca(), "yscale", "log") show() This is a known issue I've been meaning to work on. Here's what is happening. On the plot command the tick locator is autoranging the axes and ymin becomes 0. Since the log transformation applies to the tick locations as well as the data, it is log transforming the tick location of zero. To fix this, I need to check the axes range when the call to set yscale is made and fix it. In the meantime, you can explicity set the ylim after the call to plot and before the call to yscale. from matplotlib.matlab import * m = array([0.1, 0.2, 0.3, 0.6, 0.8, 1, 3]) r = array([18, 180, 1800, 1.8, 0.18, 250, 2.8]) plot(m, r) set(gca(), 'ylim', (0.1, 2000)) set(gca(), "yscale", "log") show() JDH |
From: John H. <jdh...@ac...> - 2004-06-22 12:57:55
|
>>>>> "Thomas" == Thomas Barket <tho...@ya...> writes: Thomas> C:\Matplotlib\matplotlib src\examples>python stock_demo.py Thomas> Traceback (most recent call last): File "stock_demo.py", Thomas> line 4, in ? from matplotlib.matlab import * File Thomas> "C:\Python23\lib\site-packages\matplotlib\matlab.py", line Thomas> 134, in ? from axes import Axes File Thomas> "C:\Python23\lib\site-packages\matplotlib\axes.py", line Thomas> 9, in ? from artist import Artist File Thomas> "C:\Python23\lib\site-packages\matplotlib\artist.py", line Thomas> 4, in ? from transforms import identity_transform File Thomas> "C:\Python23\lib\site-packages\matplotlib\transforms.py", Thomas> line 181, in ? from _transforms import IDENTITY, LOG10, Thomas> Func, FuncXY, PolarXY ImportError: cannot import name Thomas> IDENTITY Thomas> C:\Matplotlib\matplotlib src\examples> Something is wrong with your installation. My transforms.py line 181 is something different. _transforms should be providing IDENTITY. Thomas> Is version 0.54.2 not the correct starting point for doing Thomas> this unzip? If solving this is a hassle, I don't mind Thomas> going back to the old 0.54.2 and waiting for the bug fixes Thomas> that come with the next proper release. We're planning on doing a release in the near future, so if you can wait for the new installer, that would be easiest. JDH |
From: Stephen R. <snr...@ya...> - 2004-06-22 12:34:57
|
I'm using matplotlib 0.54.2 (failed in 0.53.1 also) on Mac OS X with Python 2.3 and wxPython 2.5.1.5, and get the following traceback from this code. Looking at the backend_wx.py, I can find no other mention of "FigureBase" anywhere else. What should this line actually be? (I tried a few thoughts, but none worked) I'm basically trying to create a class that encapsulates a multi-value temperature bar graph, using the Observer pattern, and have inherited from the FigureCanvasWx class. If this is incorrect, I'm all ears to alternative suggestions. TIA Code: class ociTemperatureGraph(FigureCanvasWx, Observer): def __init__(self, parent): wxPanel.__init__(self, parent, -1) self.fig = Figure((3,3), 75) self.subplot = Subplot(self.fig, 111) <snip> self.add_axis(self.subplot) <<-- blows up here Traceback (most recent call last): File "./ociTemperatureGraph.py", line 86, in ? main() File "./ociTemperatureGraph.py", line 74, in main frame = PlotFigure() File "./ociTemperatureGraph.py", line 60, in __init__ self.fig = ociTemperatureGraph(self) File "./ociTemperatureGraph.py", line 42, in __init__ self.add_axis(self.subplot) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/matplotlib/backends/backend_wx.py", line 888, in add_axis FigureBase.add_axis(self, a) NameError: global name 'FigureBase' is not defined |
From: Gary R. <ga...@em...> - 2004-06-22 09:27:31
|
As a followup to my reply to this (the suggestion found by searching the list archives and due to John Hunter), I tried an example errorbar plot and got a traceback. I think this is highlighting a bug as demonstrated by the following example. It's not an errorbar plot, but errorbar generates a traceback too. Danny, if you get a traceback, it'd be worth letting the list know: from matplotlib.matlab import * m = array([0.1, 0.2, 0.3, 0.6, 0.8, 1, 3]) r = array([18, 180, 1800, 1.8, 0.18, 250, 2.8]) semilogy(m, r) set(gca(), "yscale", "linear") show() works fine whereas from matplotlib.matlab import * m = array([0.1, 0.2, 0.3, 0.6, 0.8, 1, 3]) r = array([18, 180, 1800, 1.8, 0.18, 250, 2.8]) plot(m, r) set(gca(), "yscale", "log") show() generates a traceback: Traceback (most recent call last): File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\backends\backend_gtkagg.py", line 75, in callback self.draw() File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\backends\backend_gtkagg.py", line 42, in draw agg.draw() File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\backends\backend_agg.py", line 296, in draw self.figure.draw(self.renderer) File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\figure.py", line 130, in draw for a in self.axes: a.draw(renderer) File "C:\APPS\PYTHON23\Lib\site-packages\matplotlib\axes.py", line 597, in draw self.transData.freeze() # eval the lazy objects ValueError: Cannot take log of nonpositive value I think both should work. John, is this a bug? Gary Ruben -- _______________________________________________ Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free! http://www.net2phone.com/cgi-bin/link.cgi?143 |
From: Gary R. <ga...@em...> - 2004-06-22 07:16:54
|
Hi Danny, Have you tried adding set(gca(), "yscale", "log") after your errorbar line? I think this does what you want. Gary Ruben ----- Original Message ----- > Is there any way to do semi-log y errorbar plots? I know there is the > errorbar plot, and the semi-log plot. If I use an errorbar plot and > take the logarithm of the y data, then the y axis ticking won't look > right. Is there a way to fake this that I don't know about. > > thanks, > Danny -- _______________________________________________ Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free! http://www.net2phone.com/cgi-bin/link.cgi?143 |
From: Thomas B. <tho...@ya...> - 2004-06-22 06:52:50
|
John, Tks vm for your reply. I was able to get the script to run with your "examples" directory. Much appreciated. However, when I unzipped the py.60a.zip files over my site-packages directory and re-ran the script, I got the following error: C:\Matplotlib\matplotlib src\examples>python stock_demo.py Traceback (most recent call last): File "stock_demo.py", line 4, in ? from matplotlib.matlab import * File "C:\Python23\lib\site-packages\matplotlib\matlab.py", line 134, in ? from axes import Axes File "C:\Python23\lib\site-packages\matplotlib\axes.py", line 9, in ? from artist import Artist File "C:\Python23\lib\site-packages\matplotlib\artist.py", line 4, in ? from transforms import identity_transform File "C:\Python23\lib\site-packages\matplotlib\transforms.py", line 181, in ? from _transforms import IDENTITY, LOG10, Func, FuncXY, PolarXY ImportError: cannot import name IDENTITY C:\Matplotlib\matplotlib src\examples> Is version 0.54.2 not the correct starting point for doing this unzip? If solving this is a hassle, I dont mind going back to the old 0.54.2 and waiting for the bug fixes that come with the next proper release. Tks again, Tom -----Original Message----- From: John Hunter [mailto:jdh...@ac...] Sent: Monday, June 21, 2004 2:26 PM To: Thomas Barket Cc: mat...@li... Subject: Re: [Matplotlib-users] problem reading data file in stock_demo.py >>>>> "Thomas" == Thomas Barket <tho...@ya...> writes: Thomas> Hello, i cant get stock_demo.py to run correctly. it Thomas> seems there is a problem reading the data files, Thomas> specifically using numarray/Numeric's "fromstring" on the Thomas> example data files. the first result below is with Thomas> numarray and the second is with Numeric. im using python Thomas> 2.3.4 and matplotlib 0.54.2 win32 for python 2.3. Where are you getting the examples dir from? I notice that I failed to upload a zip file that includes the examples directory with the 0.54.2 release. Are you using one from a previous release? It looks like you make have a corrupt stock data file. I was able to load the stock_demo example using both the numeric and numarray win32 builds, with either numerix setting in my rc file. I did, however, discover a bug in the navigation code in that example related to data clipping. The zip file below fixes the latter problem. Unzip it in your site-packages dir (do not remove the old matplotlib code, just unzip this over it) http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-py.60a.zip And get a fresh examples dir from http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-examples.60a.zip Hope this helps, JDH |
From: Thomas B. <tho...@ya...> - 2004-06-22 06:40:06
|
John, Tks vm for your reply. I was able to get the script to run with your "examples" directory. Much appreciated. However, when I unzipped the py.60a.zip files over my site-packages directory and re-ran the script, I got the following error: C:\Matplotlib\matplotlib src\examples>python stock_demo.py Traceback (most recent call last): File "stock_demo.py", line 4, in ? from matplotlib.matlab import * File "C:\Python23\lib\site-packages\matplotlib\matlab.py", line 134, in ? from axes import Axes File "C:\Python23\lib\site-packages\matplotlib\axes.py", line 9, in ? from artist import Artist File "C:\Python23\lib\site-packages\matplotlib\artist.py", line 4, in ? from transforms import identity_transform File "C:\Python23\lib\site-packages\matplotlib\transforms.py", line 181, in ? from _transforms import IDENTITY, LOG10, Func, FuncXY, PolarXY ImportError: cannot import name IDENTITY C:\Matplotlib\matplotlib src\examples> Is version 0.54.2 not the correct starting point for doing this unzip? If solving this is a hassle, I don't mind going back to the old 0.54.2 and waiting for the bug fixes that come with the next proper release. Tks again, Tom -----Original Message----- From: John Hunter [mailto:jdh...@ac...] Sent: Monday, June 21, 2004 2:26 PM To: Thomas Barket Cc: mat...@li... Subject: Re: [Matplotlib-users] problem reading data file in stock_demo.py >>>>> "Thomas" == Thomas Barket <tho...@ya...> writes: Thomas> Hello, i cant get stock_demo.py to run correctly. it Thomas> seems there is a problem reading the data files, Thomas> specifically using numarray/Numeric's "fromstring" on the Thomas> example data files. the first result below is with Thomas> numarray and the second is with Numeric. im using python Thomas> 2.3.4 and matplotlib 0.54.2 win32 for python 2.3. Where are you getting the examples dir from? I notice that I failed to upload a zip file that includes the examples directory with the 0.54.2 release. Are you using one from a previous release? It looks like you make have a corrupt stock data file. I was able to load the stock_demo example using both the numeric and numarray win32 builds, with either numerix setting in my rc file. I did, however, discover a bug in the navigation code in that example related to data clipping. The zip file below fixes the latter problem. Unzip it in your site-packages dir (do not remove the old matplotlib code, just unzip this over it) http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-py.60a.zip And get a fresh examples dir from http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-examples.60a.zip Hope this helps, JDH |
From: danny s. <dan...@ya...> - 2004-06-21 22:38:51
|
Is there any way to do semi-log y errorbar plots? I know there is the errorbar plot, and the semi-log plot. If I use an errorbar plot and take the logarithm of the y data, then the y axis ticking won't look right. Is there a way to fake this that I don't know about. thanks, Danny __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo |
From: John H. <jdh...@ac...> - 2004-06-21 18:49:42
|
>>>>> "Thomas" == Thomas Barket <tho...@ya...> writes: Thomas> Hello, i cant get stock_demo.py to run correctly. it Thomas> seems there is a problem reading the data files, Thomas> specifically using numarray/Numeric's "fromstring" on the Thomas> example data files. the first result below is with Thomas> numarray and the second is with Numeric. im using python Thomas> 2.3.4 and matplotlib 0.54.2 win32 for python 2.3. Where are you getting the examples dir from? I notice that I failed to upload a zip file that includes the examples directory with the 0.54.2 release. Are you using one from a previous release? It looks like you make have a corrupt stock data file. I was able to load the stock_demo example using both the numeric and numarray win32 builds, with either numerix setting in my rc file. I did, however, discover a bug in the navigation code in that example related to data clipping. The zip file below fixes the latter problem. Unzip it in your site-packages dir (do not remove the old matplotlib code, just unzip this over it) http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-py.60a.zip And get a fresh examples dir from http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-examples.60a.zip Hope this helps, JDH |
From: Thomas B. <tho...@ya...> - 2004-06-19 00:17:15
|
Hello, i cant get stock_demo.py to run correctly. it seems there is a problem reading the data files, specifically using numarray/Numeric's "fromstring" on the example data files. the first result below is with numarray and the second is with Numeric. im using python 2.3.4 and matplotlib 0.54.2 win32 for python 2.3. C:\Matplotlib\matplotlib src\examples>python stock_demo.py Traceback (most recent call last): File "stock_demo.py", line 7, in ? (d1, p1, d2, p2 ) = get_two_stock_data() File "C:\Matplotlib\matplotlib src\examples\data_helper.py", line 12, in get_two_stock_data M1 = fromstring( file('data/%s.dat' % ticker1, 'rb').read(), 'd') File "C:\Python23\Lib\site-packages\numarray\numarraycore.py", line 358, in fromstring raise ValueError("Type size inconsistent with string length") ValueError: Type size inconsistent with string length C:\Matplotlib\matplotlib src\examples>python stock_demo.py Traceback (most recent call last): File "stock_demo.py", line 7, in ? (d1, p1, d2, p2 ) = get_two_stock_data() File "C:\Matplotlib\matplotlib src\examples\data_helper.py", line 12, in get_two_stock_data M1 = fromstring( file('data/%s.dat' % ticker1, 'rb').read(), 'd') ValueError: string size must be a multiple of element size since the example data files are binary, i cant figure out how to investigate what may be happening with them. Is there something else i should be doing? Tks vm, Tom |
From: John H. <jdh...@ac...> - 2004-06-17 14:13:33
|
>>>>> "Peter" == Peter Groszkowski <pgr...@ge...> writes: Peter> self.nonsingular(self.dataInterval.get_bounds()) TypeError: Peter> nonsingular() takes exactly 3 arguments (2 given) Peter> ------------- Should be self.nonsingular(*self.dataInterval.get_bounds()) Peter> 2) The auto-scaling in plot_date() does not scale properly Peter> in some special cases. Consider this: The example seems to work now with the above change and the changes you suggested in below. Peter> ticks.Base when int() gives zero. Also, to finalize this, Peter> one would have to write a DayMultiLocator type class for I added DayMultiLocator to matplotlib.ticker Peter> the Weeks, otherwise when the number of weeks is close, but Peter> less then the number of weeks in numticks*months it will Peter> get crowded. This will probably be a little more involved Peter> than dealing with days, but perhaps one could use your Peter> existent WeekdayLocator class to simplify the problem. A WeekMultiLocator would be useful, but it's not a priority for me. If you come up with one, send it my way. Peter> Also note that there was an error in defining months in Peter> your code; I changed the line to: Peter> months = span/(SEC_PER_DAY*31) # approx Thanks for the fix. Peter> Let me know what you think. Looks good; thanks! JDH |
From: Peter G. <pgr...@ge...> - 2004-06-17 04:01:47
|
Thanks for the prompt response and the detailed explanation. The scaling is working now, and I have not encountered those old problems. There are a couple of things I should mention however: 1) The axes.auto_scale() seems to be broken. I get a following error: ------------ Traceback (most recent call last): File "./e3.py", line 97, in ? ax.autoscale_view() File "/usr/lib/python2.2/site-packages/matplotlib/axes.py", line 436, in autoscale_view tup = locator.autoscale() File "/usr/lib/python2.2/site-packages/matplotlib/ticker.py", line 327, in autoscale return self.nonsingular(self.dataInterval.get_bounds()) TypeError: nonsingular() takes exactly 3 arguments (2 given) ------------- When I run this: -------- #!/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 wantLegend=1 time1=[1087192789.89] data1=[-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') p1=plot(time1, data1,'-', color='r') p2=plot(time2, data2,'-', color='b') 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()) #This line does not work. ax.autoscale_view() if wantLegend: legend((p1, p2), ('small data set (%d)' % p1Size, 'large data set (%d)' % p2Size)) xlabel('time') grid(True) show() #savefig('./blah.png') ------ Things work when I comment out the line: ax.autoscale_view() 2) The auto-scaling in plot_date() does not scale properly in some special cases. Consider this: ----------------- from matplotlib.matlab import * time2= [ 1087321489.89, 1087321500.0, 1087321789.89, 1087321800.0, 1087322089.89, 1087322100.0, 1087322389.89, 1087322700.0, 1087322989.89, 1087323000.0, 1087323289.89, 1087323300.0, 1087323589.89, 1087323600.0, 1087323889.89, 1087323900.0, 1087324189.89, 1087324200.0, 1087324489.89, 1087324500.0, ] data2=[ 3.02, 3.02, 3.14, 3.14, 3.21, 3.21, 3.26, 3.26, 3.39, 3.39, 3.51, 3.51, 3.58, 3.58, 3.75, 3.75, 4.0, 4.0, 4.22, 4.22,] plot_date(time2, data2, None, '-', color='b') xlabel('time') grid(True) show() --------------- The same thing happens over differnt ranges when the amount of ticks is large. Perhaps you may use something similar to the code below (from axes.py) to deal with these things. Note the ceilings get rid of the AssertErrors in ticks.Base when int() gives zero. Also, to finalize this, one would have to write a DayMultiLocator type class for the Weeks, otherwise when the number of weeks is close, but less then the number of weeks in numticks*months it will get crowded. This will probably be a little more involved than dealing with days, but perhaps one could use your existent WeekdayLocator class to simplify the problem. Also note that there was an error in defining months in your code; I changed the line to: months = span/(SEC_PER_DAY*31) # approx ----------- def plot_date(self, d, y, converter, fmt='bo', **kwargs): """ plot_date(d, y, converter, fmt='bo', **kwargs) d is a sequence of dates; converter is a dates.DateConverter instance that converts your dates to seconds since the epoch for plotting. y are the y values at those dates. fmt is a plot format string. kwargs are passed on to plot. See plot for more information. pass converter = None if your dates are already in epoch format """ if not self._hold: self.cla() if converter is not None: e = array([converter.epoch(thisd) for thisd in d]) else: e = d assert(len(e)) ret = self.plot(e, y, fmt, **kwargs) span = self.dataLim.intervalx().span() if span==0: span = SEC_PER_MIN minutes = span/SEC_PER_MIN hours = span/SEC_PER_HOUR days = span/SEC_PER_DAY weeks = span/SEC_PER_WEEK months = span/(SEC_PER_DAY*31) # approx years = span/(SEC_PER_WEEK*52) # approx #These should go to the top module. from math import ceil from ticker import DayMultiLocator numticks = 5 if years>numticks: locator = YearLocator(ceil(years/numticks)) # define fmt = '%Y' elif months>numticks: locator = MonthLocator(ceil(months/numticks)) # define fmt = '%b %Y' elif weeks>numticks: locator = WeekdayLocator(0) fmt = '%b %d' #Hack - need a DayLocator which operates like HourLocator #ie. Have a tick every so many days other than every day at a #particular hour. #This is a class I added to ticker.py: ## class DayMultiLocator(MultipleLocator): ## """ ## Make ticks on day which are multiples of base ## """ ## def __init__(self, base): ## MultipleLocator.__init__(self, base*SEC_PER_DAY) elif days>numticks: locator = DayMultiLocator(ceil(days/numticks)) fmt = '%b %d' elif hours>numticks: locator = HourLocator(ceil(hours/numticks)) fmt = '%H:%M\n%b %d' elif minutes>numticks: locator = MinuteLocator(ceil(minutes/numticks)) fmt = '%H:%M:%S' else: locator = MinuteLocator(1) fmt = '%H:%M:%S' formatter = DateFormatter(fmt) self.xaxis.set_major_locator(locator) self.xaxis.set_major_formatter(formatter) self.autoscale_view() return ret Let me know what you think. Peter John Hunter wrote: >>>>>> "Peter" == Peter Groszkowski <pgr...@ge...> writes: >>>>>> > > > Peter> It does?! Do you mean that this is done automatically? Can > Peter> you show me an example of this using only the time module > Peter> (since I use python2.2, dont have datetime)? I thought that > Peter> I had to manually set things up and tell matplotlib whether > > No, it's designed to work automagically. If you take a look at > axes.Axes.plot_date you'll see how it works. It looks at the max/min > span of your data and chooses a locator and formatter accordingly. > All the examples use custom locators and formatters ( I was busy > showing off how you could customize), but you don't need to > > from matplotlib.matlab import * > > 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 ] > > plot_date(time2, data2, None, '-', color='b') > xlabel('time') > grid(True) > > show() > > In general you should try not to set the limits or ticks explicitly > since this is the job of the autolocator. I realize you were > encountering troubles and this is what led you to do it. Hopefully > the discussion below will save you from having to do this. > > Peter> On the other note, regarding the weird scaling that I > Peter> talked about (and showed pretty pics for) in my last mail, > Peter> I finally put together a small script that exposes the > Peter> problem. It is a bit rough because I ripped bits and pieces > Peter> from here and there, but shows the issue. Use the > Peter> 'wantBadPlot' and 'wantStandardDateTics' to see how things > Peter> go wrong. > > I looked at this and figured out the root cause of the problem. Your > "bad data" is a singleton plot > > time1=[1087192789.89] > data1=[-65.54] > p1=plot_date(time1, data1, None, '-', color='r') > > These are difficult to deal with - I'll explain why. The default > linear transformation maps data limits to display limits, and needs to > divide by the data span to do so. In this case min=max so the span is > zero and the transformation is undefined. To handle this case, I > detect the span=0 case and reset the data limits, lowering the min a > bit and raising the max a bit. > In earlier versions of maptlotlib, I did > > minx, maxx = min(xdata), max(xdata) > if minx==maxx: > minx -= 1 > maxx += 1 > > A problem arose if a person issued multiple calls to plot, first with > a singleton and then with a range of data, all really small > > >>> plot([1e-9], [10]) # x limits are now approx -1, 1 due to above > >>> plot([1e-9,2e-9,3e-9], [10,20,30]) > after the second call the data limits are still -1,1 because the limit > code only changes the data limits if the new lines are outside the > range of the existing limits. In this case they are not. The effect > is the plot is badly scaled since the data limits are wide compared to > all the xdata. > > Thinking myself clever (first mistake!), I rewrote the above code as > > minx, maxx = min(xdata), max(xdata) > if minx==maxx: > minx -= 0.001*abs(minx) > maxx += 0.001*abs(maxx) > > So the scaling would be proportionate to the data size. This helps in > some cases, but is failing for you. Again, in your example code, you > do the dreaded singleton plot followed by more plot commands > > p1=plot_date([1087192789.89], [-65.54], None, '-', color='r') > p2=plot_date(times, values, None, '-', color='r') > > Since minx==maxx in the first plot, the xlimits become 1086105597.1, > 1088279982.67. This is very wide compared to the subsequent range of > data you put in in the second plot_date call. This explains the bad > scaling you are seeing. > > Upon writing this, I realized that the fundamental problem is that I > am manipulating data limits to deal with a singular range, when the > data limits should *always* accurately reflect the true data limits > (doh!). It's the view limits that need to be mucked with to handle > this case. I had to make a number of changes throughout the code to > get everybody playing nicely with this new insight, but now everything > is working. Even your wantBadPlot example! > > Give it a try: > > http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.54.3a.tar.gz > > and let me know if it passes your tests. > > JDH > > ---- Msg sent via @Mail - http://WebBasedEmail.com/ |