You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
(5) |
2
(24) |
3
(2) |
4
|
5
(4) |
6
(1) |
7
(22) |
8
(9) |
9
(23) |
10
(6) |
11
|
12
(7) |
13
(17) |
14
(12) |
15
(10) |
16
(22) |
17
(11) |
18
(6) |
19
(11) |
20
(13) |
21
(10) |
22
(7) |
23
(7) |
24
(5) |
25
(3) |
26
(20) |
27
(17) |
28
(25) |
29
(16) |
30
(17) |
31
(8) |
From: Suresh P. <sto...@ya...> - 2007-03-28 17:30:47
|
Continuing from a previous thread re the new matshow(), adding a colorbar() causes the matrix to shrink relative to the colorbar. Furthermore this colorbar overlaps with the figure title. For those like me who need a colorbar as a legend and/or who do not want the matrix visualisation in a new figure with aspect ratio constrained, all that needs to be done is to replace line 1424 in pylab.py for matshow() as follows # OLD LINE: fig = figure(fignum, figsize=figaspect(A)) fig = gcf() You're probably best off to create a new function matshowB() in case you ever need the default functionality. Cheers, Suresh |
From: John H. <jd...@gm...> - 2007-03-28 17:04:01
|
On 3/28/07, Giorgio F. Gilestro <gil...@gm...> wrote: > Hi, > I have to question that will help some colleagues/friends of mine to switch > to python from matlab. > > 1 - is there an automatic translator of code from matlab to > python/numpy/matplotlib? I believe it would be very easy to implement due > the similar syntax between the two. I could do something similar myself but > first I better make sure it doesn't exist yet. None that I know of, and it probably wouldn't be easy. For one thing, matlab uses parentheses for function calls and indexing, and it is probably not always obvious which is which for a translator. One could write something that got it mostly right and flagged ambiguities, but I think you should expect that a human would have to clean it up afterwards unless you attempt something ambitious and not easy. Prove me wrong! > 2 - Is there a python/numpy/mpl equivalent of EEGlab? see: > http://www.sccn.ucsd.edu/eeglab/ There is pbrain, which is not and does not attempt to be an equivalent of EEGLab, but it is an EEG viewer/analysis package in python, which uses matplotlib (and VTK). It is specialized for spectral analysis, but could be extended to do other things. http://neuroimaging.scipy.org/pbrain/ I first wrote an EEG analysis package in matlab, and after becoming frustrated with the lack of good support for complex data structures, networking, and programming paradigms, I jettisoned it for python and wrote pbrain. I wrote matplotlib in support of the pbrain application, so some of the work has already been done :-) JDH |
From: Giorgio F. G. <gil...@gm...> - 2007-03-28 16:49:21
|
Hi, I have to question that will help some colleagues/friends of mine to switch to python from matlab. 1 - is there an automatic translator of code from matlab to python/numpy/matplotlib? I believe it would be very easy to implement due the similar syntax between the two. I could do something similar myself but first I better make sure it doesn't exist yet. 2 - Is there a python/numpy/mpl equivalent of EEGlab? see: http://www.sccn.ucsd.edu/eeglab/ thanks Giorgio |
From: Fernando P. <fpe...@gm...> - 2007-03-28 15:14:49
|
On 3/28/07, Ken McIvor <mc...@ii...> wrote: > You'd almost certainly be happier doing things the other way around. > Most GUI toolkits are extremely fussy about what thread the GUI event > loop runs in. For example, wxPython requires App.MainLoop() be > called from the thread that first imported the wxPython module. That > being said, it's possible to run the GUI thread in the background -- > the iPython wizards might be able to help you figure it out. No, the limitation you describe is there just as much. What we do in ipython is push the *user code* execution into the secondary thread, to make sure we keep the GUI toolkits happy for the very reasons you outline. Cheers, f |
From: Ken M. <mc...@ii...> - 2007-03-28 15:10:34
|
On Mar 27, 2007, at 12:35 PM, Antonino Ingargiola wrote: > > I'm searching to display in realtime some data read serial port. The > data is a 2D matrix and is read element wise from the serial, one > pixel each one (or more) seconds. You shouldn't have any problems making this happen, although it requires a lot more legwork than creating normal interactive plots. > I'm running the script from "ipython -pylab" using the command "run > scriptname". After "loading" the script I interactively launch the > function that start the data acquisition and I would like to see the > acquired data so far. I've never tried to do something like this using pylab before, so I probably can't be of much help there. However, I can point you toward an example of how to do it from within wxPython using a timer. > In the loop that perform the data acquisition I'm currently calling > this function to plot data: > > def plot_data_in_itinere(data, **kwargs): > global first_plot > d = data.ravel()[find(data.ravel() > 0)] > m = d.mean() > vr = round(5*d.std() / m, 3) > #clf() > title('Scanning Data') > xlabel('Mean Value: '+str(int(round(m)))+' -- Relative > Variation: '+str(vr)) > b,t = ylim() > ylim(t,b) > imshow(data.astype(float), > interpolation='nearest', > vmin=0, > origin='lower', **kwargs) > if first_plot: > colorbar() > first_plot = False > > However the call to the function is "blocking". So the acquisition > time is longer (not only I have to wait the data but I have to wait > the plot too). You should probably do the acquisition asynchronously by running it in a separate thread. That thread would read in the data one point at a time, perform any pre-processing, and post the results to a place that's shared between it and the main plotting thread. The main thread would periodically check and see if the shared data has changed and redraw the plot if needed. I'm not sure how hard this is to do in a reasonable way in pylab, but I've used this approach before in wxPython GUIs. > Furthermore, this function plot the new data above the > old one, so the plot becomes slower and slower while the acquisition > goes on. If I uncommented the cla() line, I get a plot that is blank > most of the time and that shows the data only for a fraction of second > while the new plot is performed. ` You might want to consider create a mock data source that generates a stream of values from some pre-collected data or Python's "random" module. That would let you work on debugging the plotting end of things first. It would also make it easier for you to share your code with the list. > Is there a way to update (or substitute) the current showed matrix > data, deleting the old plots (in the axis). I have to confess that > I've have not understand well how the pylab interactive mode works. pylab.imshow() returns a matplotlib.image.AxesImage object. It looks like you can update the data array using its set_data() method. The class documentation is available on the matplotlib website: http://matplotlib.sourceforge.net/matplotlib.image.html#AxesImage > Ideally the plot should be performed in background, while the script > goes on and wait the next data arrival. You'd almost certainly be happier doing things the other way around. Most GUI toolkits are extremely fussy about what thread the GUI event loop runs in. For example, wxPython requires App.MainLoop() be called from the thread that first imported the wxPython module. That being said, it's possible to run the GUI thread in the background -- the iPython wizards might be able to help you figure it out. > I've tried to do this with a simple gtk app that embeds a > matplotlib plot. Hoever, I don't know how to send the application > in background. I've tried to do something like this: > <snip> > > the PlotScanApp implement the gui (full files attached). Running the > script the image should be updated with random data each 1 sec. but > only the first image is showed. I suppose this is not the way to put a > gui drawing app in background... Well, using pylab from within a GUI application is a bit dodgy to begin with. I can see a few potential problems. The first is that you're calling plotting commands from within the main thread, although the GUI is running in a background thread. You might try doing the plotting from within the GUI thread by having a timer fire once a second to redraw the plot. The second problem is that you're not calling pylab.draw(), which forces the current figure to redraw itself. Whether or not pylab is running in interactive mode might be a factor here. There's some documentation about interactive mode and the ion()/ioff() commands here: http://matplotlib.sourceforge.net/interactive.html Ken |
From: Giorgio L. <gio...@ch...> - 2007-03-28 14:59:20
|
Hello to all, I've thread that apperead some time ago on this list about matlab and teaching. I've discovered python recently and translated part of the routine I use in python (www.chemometrics.it). Some of my collegue asked me if I could show them how to use python. For matlab user I guess the first problem is to setup everything, but I just fixed it preparing a directory with all the package I need and a matplotlibrc file for interactive mode + a shortcut for idle -n use. The second problem is that people now wants some bells and whistles of matlab that I have to admit sometime can be very helpful for saving time. The bells and whistles are about the workspace. It's difficult to cut and paste from gnumeric/excel (I generally use txt file but it's no so immediate) and also there is no "visual" workspace. I cannot succeed also in saving workspace (I know there is a function so iosave.mat but I didn't manage easily hot to use it) For overpass this problems I've tried to use QME-DEV which is in early stage of development (alpha) but promise well. What people like of python/matplot/scipy -its free ;) -they like a lot the plotting style and capabilities (they find the png and svg file very clear and accurate) -they like IDLE as editor (ehy it's has the same color of matlab ;) ! ) So my question is . Do you have a similar experience ? How do you help people in moving the first step ? do you use (and also does it exist) a more friendly environment than IDLE except from QME-DEV. I know that this question may look silly, but in my opinion also how much is user friendly a software is very important for getting new users. Cheers to all Giorgio |
From: John H. <jd...@gm...> - 2007-03-28 13:52:42
|
On 3/28/07, Nadia Dencheva <den...@st...> wrote: > Numarray does not work with Python 2.5 on 64 bit Linux. > If this is a 64 bit Linux machine try using numpy instead. If this doesn't help, here are the generic "segfault" instructions:: # How to diagnose where a segfault is occurring First thing to try is simply rm -rf the site-packages/matplotlib and build subdirs and get a clean install. Installing a new version over a pretty old version has been known to cause trouble, segfault, etc. Try importing these packages individually import matplotlib._image import matplotlib._transforms #one of these three depending on which numerix package you are using import matplotlib.backends._na_backend_agg # for numarray import matplotlib.backends._nc_backend_agg # for Numeric import matplotlib.backends._ns_backend_agg # for numpy import matplotlib.backends._tkagg import matplotlib._agg If the last two work and the others don't, it is likely you need to upgrade your gcc, because on some platforms (OS X for sure) old versions of gcc cannot compile new versions of pycxx, which matplotlib uses for building some but not all of it's extensions. Report back which if any work or segfault or raise tracebacks, If that shed additional light, again flush the build and install dirs, and try setting VERBOSE=True in setup.py before doing a clean install. The VERBOSE setting will generate lots of extra output and may help indicate where the segfault is occurring |
From: John H. <jd...@gm...> - 2007-03-28 13:46:59
|
On 3/28/07, jens haemmerling <jha...@gm...> wrote: > I have problems to plot surfaces like f(x,y)=x*y... > for example "plot_surface([1,2,3], [4,5,6], [7,8,9])" doesn't work either... > > I imported the following: > > from numpy import * > import pylab as p > import matplotlib.axes3d as p3 > > does anybody have an advice? You can do surface plots with axe3d, but mpl isn't really suited for 3d plotting since 3d plotting is nascent and not supported. We include it in hopes that someone else will ike it and improve it but that hasn't happened yet. Personally, unless you are doing interactive stuff like rotating your figure, surface plots don't help much, and mpl 3d is really too slow for interactive 3d. I use imshow or pcolor with colormapping, which will give you just about all the information you can get out of a non-interactive 3d plot. JDH |
From: John H. <jd...@gm...> - 2007-03-28 13:44:24
|
On 3/28/07, Mark Bakker <ma...@gm...> wrote: > Hello List - > > A while back, the default font changed in the matplotlibrc file. > Does anybody recall what the old default font was? > I kinda liked it better than the current font, but I don't recall what it > was. The default font listing was #font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif #font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif #font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive #font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy #font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace in the rc file. In the last release, we decided to go with a "commented out" rc file and rely on internal defaults unless user explicitly uncommented something. This makes it easier for us to change the default ors rc settings and not generate as many warnings to naive users. But when we went to the internal default, for some reason this listing was not preserved internally. I just readded it and committed it. Before this, there was a different ordering but I would have to dig through the svn archive to find it. I decided to make bitstream the default since we ship it. If you are referring to the "pre bitstream" default, I suggest you start poking through older revisions of the matplotlibrc.template file in svn. JDH |
From: Nadia D. <den...@st...> - 2007-03-28 12:41:46
|
Numarray does not work with Python 2.5 on 64 bit Linux. If this is a 64 bit Linux machine try using numpy instead. Nadia Dencheva Matt Beal wrote: > Having upgraded to 2.5, I get a segfault when running a very simple plot > script (test.py) at the show() function. Prior to show() I can save to > file and the result looks good. The GUI is crashing on show(). > > Any suggestions to fix welcome (I'm guessing many of you know the > solution to this problem). > > "Annoying" debug information below: > > Thanks! > -Matt > > hostname:~/.matplotlib>cat test.py > from pylab import * > plot([1,2,3]) > show() > > hostname:~/.matplotlib>python test.py --verbose-debug-annoying -dTkAgg > matplotlib data path ..../python2.5/site-packages/matplotlib/mpl-data > $HOME=/home/username > loaded rc file /home/username/.matplotlib/matplotlibrc > matplotlib version 0.90.0 > verbose.level debug-annoying > interactive is False > platform is linux2 > loaded modules: ['_bisect', '_sha512', 'pylab', 'datetime', > 'matplotlib.tempfile ', 'distutils.sysconfig', 'encodings.encodings', 'str > uct', 'tempfile', 'pytz.os', 'zipimport', 'string', > 'matplotlib.__future__', 'pytz.tzinfo', ' pytz.datetime', 'distutils.re > <http://distutils.re>', 'bisect' > , 'signal', 'random', 'matplotlib.pytz', 'locale', 'encodings', > 'dateutil', ' matplotlib.warnings', 'pytz.pytz', 'matplotlib.sys', 're > ', 'math', 'fcntl', 'UserDict', 'distutils.os', 'matplotlib', 'codecs', > 'md5', '_locale', ' matplotlib.os', 'thread', 'itertools', 'di > stutils.sys', 'os', '__future__', '_sre', '__builtin__', 'matplotlib.re > <http://matplotlib.re>', 'operator', ' distutils.string', > 'matplotlib.datetime', 'pos > ixpath', 'errno', 'binascii', 'sre_constants', '_sha256', > 'matplotlib.md5', 'types', 'pytz.sys', '_codecs', 'pytz', 'copy', '_struct' > , '_types', 'matplotlib.dateutil', 'hashlib', 'distutils', 'posix', > 'encodings.aliases', 'exceptions', 'sre_parse', 'pytz.bisect', 'd > istutils.distutils ', 'copy_reg', 'sre_compile', '_hashlib', '_random', > 'site', '__main__', 'shutil', 'strop', 'encodings.codecs', 'ge > ttext', 'pytz.sets ', 'stat', 'warnings', 'encodings.types', > 'encodings.ascii', 'sys', 'os.path', 'pytz.gettext', 'matplotlib.distutil > s', 'distutils.errors', 'linecache', ' matplotlib.shutil', 'sets'] > numerix numarray 1.5.2 > font search path ['..../python2.5/site-packages/matplotlib/mpl-data'] > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmtt10.ttf > trying fontname > ..../python2.5/site-packages/matplotlib/mpl-data/VeraMoIt.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmex10.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/VeraBI.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/VeraBd.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmmi10.ttf > trying fontname > ..../python2.5/site-packages/matplotlib/mpl-data/VeraSeBd.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmr10.ttf > trying fontname > ..../python2.5/site-packages/matplotlib/mpl-data/VeraMono.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmsy10.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/Vera.ttf > CONFIGDIR=/home/username/.matplotlib > loaded ttfcache file /home/username/.matplotlib/ttffont.cache > backend TkAgg version 8.5 > FigureCanvasAgg.draw > RendererAgg.__init__ > RendererAgg.__init__ width=650.0, height=490.0 > RendererAgg.__init__ _RendererAgg done > RendererAgg.__init__ done > RendererAgg._get_agg_font > findfont found sans-serif, normal, normal 400, normal, 12.0 > findfont returning ..../python2.5/site-packages/matplotlib/mpl-data/Vera.ttf > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > Segmentation fault (core dumped) > > hostname:~/.matplotlib> > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Mark B. <ma...@gm...> - 2007-03-28 12:22:30
|
Hello List - A while back, the default font changed in the matplotlibrc file. Does anybody recall what the old default font was? I kinda liked it better than the current font, but I don't recall what it was. Thanks, Mark |
From: jens h. <jha...@gm...> - 2007-03-28 10:39:54
|
hello I have problems to plot surfaces like f(x,y)=x*y... for example "plot_surface([1,2,3], [4,5,6], [7,8,9])" doesn't work either... I imported the following: from numpy import * import pylab as p import matplotlib.axes3d as p3 does anybody have an advice? -- "Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ... Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail |
From: Evan M. <eva...@gm...> - 2007-03-28 01:23:10
|
Thanks, Eric, Yes, that works for the stripped down version, but not for what I am trying to do. The examples I have given have the range of one of the plots nicely fitting inside that of the other (ie, plot 1 range 15 to 26, plot 2 range 17 to 23), but sometimes with what I am doing I have, for example, plot 1 range 15 to 23 and plot 2 range 17 to 25. In this case, passing the levels from plot 1 to plot 2 means that levels 24 and 25 of plot 2 are stripped away; this, at least, is what I think is happening because I have white areas of my plot that weren't there before. It seems to me that it would be quite useful to have the option to override the colorbar range, setting it to be the same as defined by clim, or some other values. As a solution for now, I think I will just use one colorbar for the two plots. Thanks for your help with this, and the tip about being explicit in my programs! -Evan On 3/27/07, Eric Firing <ef...@ha...> wrote: > > Evan, > > OK, I see what the problem is: you need to tell the second contour > command to use the same contour levels as the first one is using. > Something like this: > > figure(1) > CS1 = contourf(x) > clim(cmin, cmax) > colorbar() > figure(2) > CS2 = contourf(y, levels=CS1.levels) > clim(cmin, cmax) > colorbar() > > Does this give the desired result? > > The big difference between pcolor and contourf in this context is that > pcolor is automatically generating a colormap with 256 colors, and may > use any or all of those colors, so the colorbar is effectively > continuous. Contourf works with a small discrete set of colors taken > from such a colormap, so colorbar shows the same discrete set. The > boundaries are either generated automatically in contourf, or set via > the levels kwarg. Colorbar gets the boundaries from the output of the > contourf call, which pylab saves and passes along to colorbar even if > you don't do so explicitly yourself. But pylab has no way of knowing > that you want the contour levels in the second figure to match the > first, so you have to be explicit. > > Usually at this point someone chimes in to point out the virtues of > being explicit in your program even when you don't have to... > > Eric > > > > Evan Mason wrote: > > Hi Eric, the following lines below will show this. Interestingly, the > > correct (or, at least, what I want) behaviour results from using pcolor, > > but not with contourf. > > > > > > a = arange(12, 27, .5) > > b = arange(17, 23, .5) > > x, y = meshgrid(a, b) > > > > # get max and min for clim > > cmin = min(x.min(), y.min()) # cmin = 12 > > cmax = max(x.max(), y.max()) # cmax = 26.5 > > > > figure(1) > > contourf(x) > > #pcolor(x) > > clim([cmin, cmax]) > > colorbar() > > figure(2) > > contourf(y) > > #pcolor(y) > > clim([cmin, cmax]) > > colorbar() > > > > > > -Evan > > > > > > > > > > On 3/27/07, *Eric Firing* < ef...@ha... > > <mailto:ef...@ha...>> wrote: > > > > Evan, > > > > That is getting clearer, but it still seems to me that no override > > should be needed in this case; it should "just work", so if it > doesn't, > > either there is a bug in mpl or a bug in the code. It would be most > > helpful if you would write a stripped-down simplest-possible script > > that > > illustrates the problem. Then I can either show how to fix the > script, > > or I can use the script to help me track down the mpl bug, if that > is > > the problem. > > > > Eric > > > > Evan Mason wrote: > > > Hi Eric > > > > > > I am using matplotlib-0.90.0. > > > > > > I am making 2 contourf subplots of temperature values which have > > similar > > > but not equal ranges. In subplot1 the range is 15-25; in > > subplot2 it is > > > 16 to 24. I use clim, giving it the max and min values obtained > > from a > > > comparison of subplot1 and 2; i.e., I use clim([15, 25]) on both > > > subplots. The two subplots display exactly as I want them to. > > > > > > Next, I want 2 colorbars to go with the two subplots. I want the > > range > > > of each colorbar to be the same, set as the clim values (15 and > 25). > > > This happens for subplot1, but not for subplot2, which shows the > > range > > > 16-24, following its input data range and not the clim values. > > > > > > So what I want to know is if it is possible to overide the > colorbar > > > limits, setting them to 15-25? > > > > > > I hope that's clearer now, thanks, Evan > > > > > > > > > > > > On 3/27/07, * Eric Firing* < ef...@ha... > > <mailto:ef...@ha...> > > > <mailto:ef...@ha... <mailto:ef...@ha...>>> wrote: > > > > > > Evan, > > > > > > It is still not quite clear to me what you want versus what > > you are > > > getting. With recent versions of mpl, the colorbar > > automatically uses > > > the same color boundaries as contourf, if that is what the > > colorbar is > > > tracking. What version of mpl are you using? > > > > > > (With the most recent mpl I see that there is a strange bug > > such that > > > setting clim clobbers the axis tick labeling for the > > colorbar--yet > > > another thing that needs to be figured out and fixed.) > > > > > > > > > > > > |
From: Eric F. <ef...@ha...> - 2007-03-28 00:43:29
|
Evan, OK, I see what the problem is: you need to tell the second contour command to use the same contour levels as the first one is using. Something like this: figure(1) CS1 = contourf(x) clim(cmin, cmax) colorbar() figure(2) CS2 = contourf(y, levels=CS1.levels) clim(cmin, cmax) colorbar() Does this give the desired result? The big difference between pcolor and contourf in this context is that pcolor is automatically generating a colormap with 256 colors, and may use any or all of those colors, so the colorbar is effectively continuous. Contourf works with a small discrete set of colors taken from such a colormap, so colorbar shows the same discrete set. The boundaries are either generated automatically in contourf, or set via the levels kwarg. Colorbar gets the boundaries from the output of the contourf call, which pylab saves and passes along to colorbar even if you don't do so explicitly yourself. But pylab has no way of knowing that you want the contour levels in the second figure to match the first, so you have to be explicit. Usually at this point someone chimes in to point out the virtues of being explicit in your program even when you don't have to... Eric Evan Mason wrote: > Hi Eric, the following lines below will show this. Interestingly, the > correct (or, at least, what I want) behaviour results from using pcolor, > but not with contourf. > > > a = arange(12, 27, .5) > b = arange(17, 23, .5) > x, y = meshgrid(a, b) > > # get max and min for clim > cmin = min(x.min(), y.min()) # cmin = 12 > cmax = max(x.max(), y.max()) # cmax = 26.5 > > figure(1) > contourf(x) > #pcolor(x) > clim([cmin, cmax]) > colorbar() > figure(2) > contourf(y) > #pcolor(y) > clim([cmin, cmax]) > colorbar() > > > -Evan > > > > > On 3/27/07, *Eric Firing* < ef...@ha... > <mailto:ef...@ha...>> wrote: > > Evan, > > That is getting clearer, but it still seems to me that no override > should be needed in this case; it should "just work", so if it doesn't, > either there is a bug in mpl or a bug in the code. It would be most > helpful if you would write a stripped-down simplest-possible script > that > illustrates the problem. Then I can either show how to fix the script, > or I can use the script to help me track down the mpl bug, if that is > the problem. > > Eric > > Evan Mason wrote: > > Hi Eric > > > > I am using matplotlib-0.90.0. > > > > I am making 2 contourf subplots of temperature values which have > similar > > but not equal ranges. In subplot1 the range is 15-25; in > subplot2 it is > > 16 to 24. I use clim, giving it the max and min values obtained > from a > > comparison of subplot1 and 2; i.e., I use clim([15, 25]) on both > > subplots. The two subplots display exactly as I want them to. > > > > Next, I want 2 colorbars to go with the two subplots. I want the > range > > of each colorbar to be the same, set as the clim values (15 and 25). > > This happens for subplot1, but not for subplot2, which shows the > range > > 16-24, following its input data range and not the clim values. > > > > So what I want to know is if it is possible to overide the colorbar > > limits, setting them to 15-25? > > > > I hope that's clearer now, thanks, Evan > > > > > > > > On 3/27/07, * Eric Firing* < ef...@ha... > <mailto:ef...@ha...> > > <mailto:ef...@ha... <mailto:ef...@ha...>>> wrote: > > > > Evan, > > > > It is still not quite clear to me what you want versus what > you are > > getting. With recent versions of mpl, the colorbar > automatically uses > > the same color boundaries as contourf, if that is what the > colorbar is > > tracking. What version of mpl are you using? > > > > (With the most recent mpl I see that there is a strange bug > such that > > setting clim clobbers the axis tick labeling for the > colorbar--yet > > another thing that needs to be figured out and fixed.) > > > > > > |
From: Evan M. <eva...@gm...> - 2007-03-28 00:20:04
|
Hi Eric, the following lines below will show this. Interestingly, the correct (or, at least, what I want) behaviour results from using pcolor, but not with contourf. a = arange(12, 27, .5) b = arange(17, 23, .5) x, y = meshgrid(a, b) # get max and min for clim cmin = min(x.min(), y.min()) # cmin = 12 cmax = max(x.max(), y.max()) # cmax = 26.5 figure(1) contourf(x) #pcolor(x) clim([cmin, cmax]) colorbar() figure(2) contourf(y) #pcolor(y) clim([cmin, cmax]) colorbar() -Evan On 3/27/07, Eric Firing <ef...@ha...> wrote: > > Evan, > > That is getting clearer, but it still seems to me that no override > should be needed in this case; it should "just work", so if it doesn't, > either there is a bug in mpl or a bug in the code. It would be most > helpful if you would write a stripped-down simplest-possible script that > illustrates the problem. Then I can either show how to fix the script, > or I can use the script to help me track down the mpl bug, if that is > the problem. > > Eric > > Evan Mason wrote: > > Hi Eric > > > > I am using matplotlib-0.90.0. > > > > I am making 2 contourf subplots of temperature values which have similar > > but not equal ranges. In subplot1 the range is 15-25; in subplot2 it is > > 16 to 24. I use clim, giving it the max and min values obtained from a > > comparison of subplot1 and 2; i.e., I use clim([15, 25]) on both > > subplots. The two subplots display exactly as I want them to. > > > > Next, I want 2 colorbars to go with the two subplots. I want the range > > of each colorbar to be the same, set as the clim values (15 and 25). > > This happens for subplot1, but not for subplot2, which shows the range > > 16-24, following its input data range and not the clim values. > > > > So what I want to know is if it is possible to overide the colorbar > > limits, setting them to 15-25? > > > > I hope that's clearer now, thanks, Evan > > > > > > > > On 3/27/07, * Eric Firing* <ef...@ha... > > <mailto:ef...@ha...>> wrote: > > > > Evan, > > > > It is still not quite clear to me what you want versus what you are > > getting. With recent versions of mpl, the colorbar automatically > uses > > the same color boundaries as contourf, if that is what the colorbar > is > > tracking. What version of mpl are you using? > > > > (With the most recent mpl I see that there is a strange bug such > that > > setting clim clobbers the axis tick labeling for the colorbar--yet > > another thing that needs to be figured out and fixed.) > > > > > > |
From: Eric F. <ef...@ha...> - 2007-03-27 23:50:14
|
Evan, That is getting clearer, but it still seems to me that no override should be needed in this case; it should "just work", so if it doesn't, either there is a bug in mpl or a bug in the code. It would be most helpful if you would write a stripped-down simplest-possible script that illustrates the problem. Then I can either show how to fix the script, or I can use the script to help me track down the mpl bug, if that is the problem. Eric Evan Mason wrote: > Hi Eric > > I am using matplotlib-0.90.0. > > I am making 2 contourf subplots of temperature values which have similar > but not equal ranges. In subplot1 the range is 15-25; in subplot2 it is > 16 to 24. I use clim, giving it the max and min values obtained from a > comparison of subplot1 and 2; i.e., I use clim([15, 25]) on both > subplots. The two subplots display exactly as I want them to. > > Next, I want 2 colorbars to go with the two subplots. I want the range > of each colorbar to be the same, set as the clim values (15 and 25). > This happens for subplot1, but not for subplot2, which shows the range > 16-24, following its input data range and not the clim values. > > So what I want to know is if it is possible to overide the colorbar > limits, setting them to 15-25? > > I hope that's clearer now, thanks, Evan > > > > On 3/27/07, * Eric Firing* <ef...@ha... > <mailto:ef...@ha...>> wrote: > > Evan, > > It is still not quite clear to me what you want versus what you are > getting. With recent versions of mpl, the colorbar automatically uses > the same color boundaries as contourf, if that is what the colorbar is > tracking. What version of mpl are you using? > > (With the most recent mpl I see that there is a strange bug such that > setting clim clobbers the axis tick labeling for the colorbar--yet > another thing that needs to be figured out and fixed.) > > |
From: Evan M. <eva...@gm...> - 2007-03-27 23:39:13
|
Hi Eric I am using matplotlib-0.90.0. I am making 2 contourf subplots of temperature values which have similar but not equal ranges. In subplot1 the range is 15-25; in subplot2 it is 16 to 24. I use clim, giving it the max and min values obtained from a comparison of subplot1 and 2; i.e., I use clim([15, 25]) on both subplots. The two subplots display exactly as I want them to. Next, I want 2 colorbars to go with the two subplots. I want the range of each colorbar to be the same, set as the clim values (15 and 25). This happens for subplot1, but not for subplot2, which shows the range 16-24, following its input data range and not the clim values. So what I want to know is if it is possible to overide the colorbar limits, setting them to 15-25? I hope that's clearer now, thanks, Evan On 3/27/07, Eric Firing <ef...@ha...> wrote: > > Evan, > > It is still not quite clear to me what you want versus what you are > getting. With recent versions of mpl, the colorbar automatically uses > the same color boundaries as contourf, if that is what the colorbar is > tracking. What version of mpl are you using? > > (With the most recent mpl I see that there is a strange bug such that > setting clim clobbers the axis tick labeling for the colorbar--yet > another thing that needs to be figured out and fixed.) > |
From: Eric F. <ef...@ha...> - 2007-03-27 23:13:28
|
Matt Beal wrote: > Having upgraded to 2.5, I get a segfault when running a very simple plot > script (test.py) at the show() function. Prior to show() I can save to > file and the result looks good. The GUI is crashing on show(). > > Any suggestions to fix welcome (I'm guessing many of you know the > solution to this problem). I hope someone does, because I don't. But until someone comes up with the answer, here are possibly relevant questions: Did you build mpl from source? If so, did you delete the build directory before rebuilding with 2.5? My guess is that there is a version mismatch somewhere, and this is the sort of thing that can occur if a major change is made and a complete rebuild is not done. setup.py is not smart enough to always know what really needs to be rebuilt, I think. Eric > > "Annoying" debug information below: > > Thanks! > -Matt > > hostname:~/.matplotlib>cat test.py > from pylab import * > plot([1,2,3]) > show() > > hostname:~/.matplotlib>python test.py --verbose-debug-annoying -dTkAgg > matplotlib data path ..../python2.5/site-packages/matplotlib/mpl-data > $HOME=/home/username > loaded rc file /home/username/.matplotlib/matplotlibrc > matplotlib version 0.90.0 > verbose.level debug-annoying > interactive is False > platform is linux2 > loaded modules: ['_bisect', '_sha512', 'pylab', 'datetime', > 'matplotlib.tempfile ', 'distutils.sysconfig', 'encodings.encodings', 'str > uct', 'tempfile', 'pytz.os', 'zipimport', 'string', > 'matplotlib.__future__', 'pytz.tzinfo', ' pytz.datetime', 'distutils.re > <http://distutils.re>', 'bisect' > , 'signal', 'random', 'matplotlib.pytz', 'locale', 'encodings', > 'dateutil', ' matplotlib.warnings', 'pytz.pytz', 'matplotlib.sys', 're > ', 'math', 'fcntl', 'UserDict', 'distutils.os', 'matplotlib', 'codecs', > 'md5', '_locale', ' matplotlib.os', 'thread', 'itertools', 'di > stutils.sys', 'os', '__future__', '_sre', '__builtin__', 'matplotlib.re > <http://matplotlib.re>', 'operator', ' distutils.string', > 'matplotlib.datetime', 'pos > ixpath', 'errno', 'binascii', 'sre_constants', '_sha256', > 'matplotlib.md5', 'types', 'pytz.sys', '_codecs', 'pytz', 'copy', '_struct' > , '_types', 'matplotlib.dateutil', 'hashlib', 'distutils', 'posix', > 'encodings.aliases', 'exceptions', 'sre_parse', 'pytz.bisect', 'd > istutils.distutils ', 'copy_reg', 'sre_compile', '_hashlib', '_random', > 'site', '__main__', 'shutil', 'strop', 'encodings.codecs', 'ge > ttext', 'pytz.sets ', 'stat', 'warnings', 'encodings.types', > 'encodings.ascii', 'sys', 'os.path', 'pytz.gettext', 'matplotlib.distutil > s', 'distutils.errors', 'linecache', ' matplotlib.shutil', 'sets'] > numerix numarray 1.5.2 > font search path ['..../python2.5/site-packages/matplotlib/mpl-data'] > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmtt10.ttf > trying fontname > ..../python2.5/site-packages/matplotlib/mpl-data/VeraMoIt.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmex10.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/VeraBI.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/VeraBd.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmmi10.ttf > trying fontname > ..../python2.5/site-packages/matplotlib/mpl-data/VeraSeBd.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmr10.ttf > trying fontname > ..../python2.5/site-packages/matplotlib/mpl-data/VeraMono.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/cmsy10.ttf > trying fontname ..../python2.5/site-packages/matplotlib/mpl-data/Vera.ttf > CONFIGDIR=/home/username/.matplotlib > loaded ttfcache file /home/username/.matplotlib/ttffont.cache > backend TkAgg version 8.5 > FigureCanvasAgg.draw > RendererAgg.__init__ > RendererAgg.__init__ width=650.0, height=490.0 > RendererAgg.__init__ _RendererAgg done > RendererAgg.__init__ done > RendererAgg._get_agg_font > findfont found sans-serif, normal, normal 400, normal, 12.0 > findfont returning ..../python2.5/site-packages/matplotlib/mpl-data/Vera.ttf > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg.points_to_pixels > RendererAgg.points_to_pixels > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg._get_agg_font > RendererAgg.draw_text > RendererAgg._get_agg_font > Segmentation fault (core dumped) > > hostname:~/.matplotlib> > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Eric F. <ef...@ha...> - 2007-03-27 23:05:18
|
C M wrote: > Hi, I'm new to mpl and want to learn date plotting. Would like to start > with the demo, but date_demo1 won't run for me. (My specs: winXP, > Python 2.5, matplotlib 0.9.0, numpy 1.0, and yes was connected to the > internet when I ran it). I just copied into IDLE and saved it and got > this error: > > Traceback (most recent call last): > File "C:/Documents and Settings/user/Desktop/datedemo.py", line 22, in > <module> > quotes = quotes_historical_yahoo('INTC', date1, date2) > File "C:\Python25\lib\site-packages\matplotlib\finance.py", line 153, > in quotes_historical_yahoo > try: ret = parse_yahoo_historical(fh, asobject, adjusted) > File "C:\Python25\lib\site-packages\matplotlib\finance.py", line 53, > in parse_yahoo_historical > dt = datetime.date(*time.strptime(datestr, '%d-%b-%y')[:3]) > File "C:\Python25\lib\_strptime.py", line 310, in strptime > (data_string, format)) > ValueError: time data did not match format: data=2003-12-01 fmt=%d-%b-%y > > Any idea what I'm doing wrong? You are not doing anything wrong. I noticed the bug recently also. I don't know when or why it started. It is not python 2.5-specific; I see it while running 2.4 and svn mpl. Thanks for reporting it. Eric > > Thanks, > Che |
From: Eric F. <ef...@ha...> - 2007-03-27 22:57:12
|
Evan, It is still not quite clear to me what you want versus what you are getting. With recent versions of mpl, the colorbar automatically uses the same color boundaries as contourf, if that is what the colorbar is tracking. What version of mpl are you using? (With the most recent mpl I see that there is a strange bug such that setting clim clobbers the axis tick labeling for the colorbar--yet another thing that needs to be figured out and fixed.) Eric Evan Mason wrote: > Sorry, I realise that my example in my original post doesn't quite make > sense. My data range is 17 to 23. I set clim to be clim([15, 25]). I > then want the colorbar limits to be the same as clim, 15 to 25. The > questions remains the same, which is how to set the range for colorbar. > > Thanks, Evan |
From: Pierre GM <pgm...@gm...> - 2007-03-27 21:19:45
|
On Tuesday 27 March 2007 16:27:35 C M wrote: > ValueError: time data did not match format: data=2003-12-01 fmt=%d-%b-%y > > Any idea what I'm doing wrong? Well, if data='2003-12-01', the format should be "%y-%m-%d" or "%y-%d-%m" depending on the local convention. Here, 2003 is interpreted as a day, which of course doesn't work. |
From: Evan M. <eva...@gm...> - 2007-03-27 21:01:21
|
Sorry, I realise that my example in my original post doesn't quite make sense. My data range is 17 to 23. I set clim to be clim([15, 25]). I then want the colorbar limits to be the same as clim, 15 to 25. The questions remains the same, which is how to set the range for colorbar. Thanks, Evan |
From: Robert K. <rob...@gm...> - 2007-03-27 20:49:01
|
Tyler Hayes wrote: > Ideally I'd like to just make the one call: > > from pylab import * > > Which would load SciPy (& NumPy) automatically I recommend simply making your own file with all of the imports you need. Implicitly relying on scipy being the chosen 'numerix' will make your code difficult to understand. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
From: Evan M. <eva...@gm...> - 2007-03-27 20:32:24
|
Hi I want to set the limits of my colorbar to something different from that of my plot. For example I have a contourf plot where I set the colour limits to be, say: clim([15, 25]) But I want the limits of the colorbar to be 10 and 30. I suspect this is something to do with mappable and vmin and vmax, but I don't see anything specific about how to do this, either on this forum or on mpl/sourceforge. Thanks for any help, Evan |
From: C M <cmp...@gm...> - 2007-03-27 20:27:39
|
Hi, I'm new to mpl and want to learn date plotting. Would like to start with the demo, but date_demo1 won't run for me. (My specs: winXP, Python 2.5, matplotlib 0.9.0, numpy 1.0, and yes was connected to the internet when I ran it). I just copied into IDLE and saved it and got this error: Traceback (most recent call last): File "C:/Documents and Settings/user/Desktop/datedemo.py", line 22, in <module> quotes = quotes_historical_yahoo('INTC', date1, date2) File "C:\Python25\lib\site-packages\matplotlib\finance.py", line 153, in quotes_historical_yahoo try: ret = parse_yahoo_historical(fh, asobject, adjusted) File "C:\Python25\lib\site-packages\matplotlib\finance.py", line 53, in parse_yahoo_historical dt = datetime.date(*time.strptime(datestr, '%d-%b-%y')[:3]) File "C:\Python25\lib\_strptime.py", line 310, in strptime (data_string, format)) ValueError: time data did not match format: data=2003-12-01 fmt=%d-%b-%y Any idea what I'm doing wrong? Thanks, Che |