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
|
2
(1) |
3
(1) |
4
(6) |
5
(12) |
6
(13) |
7
|
|
8
(2) |
9
(21) |
10
(19) |
11
(2) |
12
(9) |
13
(22) |
14
(1) |
|
15
(1) |
16
(12) |
17
(5) |
18
(6) |
19
(7) |
20
(13) |
21
(6) |
|
22
(3) |
23
(14) |
24
(15) |
25
(7) |
26
(16) |
27
(7) |
28
(6) |
|
29
(1) |
30
(12) |
31
(3) |
|
|
|
|
|
From: Stefan v. d. W. <st...@su...> - 2006-10-23 15:18:45
|
Hi,
I am trying to generate graphs using
text.usetex : True
ps.usedistiller : xpdf
Unfortunately, when running
import pylab as P
P.plot([10],[10])
P.savefig('test.eps')
I get an error message:
File "/home/stefan//lib/python2.4/site-packages/matplotlib/backends/backe=
nd_ps.py", line 1412, in get_bbox
raise RuntimeError('Ghostscript was not able to extract a bounding bo=
x.\
RuntimeError: Ghostscript was not able to extract a bounding box.Here is =
the Ghostscript output:
ESP Ghostscript 815.02: Unrecoverable error, exit code 1
When I run with --verbose-debug-annoying I see
pdftops -paper match -level2 "/tmp/098f6bcd4621d373cade4e832627b4f6.pdf" =
"/tmp/098f6bcd4621d373cade4e832627b4f6.ps" > "/tmp/098f6bcd4621d373cade4e=
832627b4f6.output"
gs -dBATCH -dNOPAUSE -sDEVICE=3Dbbox "/tmp/098f6bcd4621d373cade4e832627b4=
f6"
ESP Ghostscript 815.02 (2006-04-19)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
ERROR: /undefined in pdfLastFill
I am running gs v8.15.2, pdftops v3.00, dvipng v1.5 and xpdf v3.01. Are
these versions known to be incompatible, or is there possible a
problem with the output generated by matplotlib?
With
ps.usedistiller : ghostscript
everything runs smoothly, but the text looks pretty dismal.
I would appreciate any advice on how to get this running!
Thanks
St=E9fan
|
|
From: Derek H. <DH...@cs...> - 2006-10-23 13:01:14
|
The standard plot: ax.plot_date(dates,values) does a "dot" plot whereas ax.plot_date(dates,values,'-') plots a line. How, though, do I plot values as bars? Thanks Derek PS dates are converted from an array "dates as strings", using the datestr2num() - which works well! -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to Cal...@cs.... This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
From: Willi R. <w.r...@gm...> - 2006-10-23 11:23:11
|
Hi, unfortunately, debs.astraw.com is not accessible. wr@[ikarus]:~> ping debs.astraw.com ping: unknown host debs.astraw.com wr@[ikarus]:~> ping www.astraw.com PING www.astraw.com (66.33.203.253) 56(84) bytes of data. 64 bytes from basic-emu.glass.dreamhost.com (66.33.203.253): icmp_seq=1 ttl=41 time=169 ms Am Montag, 23. Oktober 2006 13:18 schrieb Sven Schreiber: > Willi Richert schrieb: > > Am Samstag, 21. Oktober 2006 20:30 schrieb Eric Firing: > >>> matplotlib.__version__ == 0.82 > >> > >> There is the problem: you need to update your matplotlib. > >> > >> Eric > > > > Thanks. Unfortunately, I've not yet found a more recent ubuntu/dapper > > repo for matplotlib. Any experience with installing the ubuntu edgy > > version (0.87) on dapper? > > check out the ubuntu (dapper) section at > http://new.scipy.org/Installing_SciPy/Linux, that repository (by Andrew > Straw) also gives you recent matplotlib packages. > -sven |
|
From: Sven S. <sve...@gm...> - 2006-10-23 11:19:31
|
Willi Richert schrieb: > Am Samstag, 21. Oktober 2006 20:30 schrieb Eric Firing: >>> matplotlib.__version__ == 0.82 >> There is the problem: you need to update your matplotlib. >> >> Eric > > Thanks. Unfortunately, I've not yet found a more recent ubuntu/dapper repo for > matplotlib. Any experience with installing the ubuntu edgy version (0.87) on > dapper? > check out the ubuntu (dapper) section at http://new.scipy.org/Installing_SciPy/Linux, that repository (by Andrew Straw) also gives you recent matplotlib packages. -sven |
|
From: Willi R. <w.r...@gm...> - 2006-10-23 07:55:53
|
Am Samstag, 21. Oktober 2006 20:30 schrieb Eric Firing: > > > > matplotlib.__version__ == 0.82 > > There is the problem: you need to update your matplotlib. > > Eric Thanks. Unfortunately, I've not yet found a more recent ubuntu/dapper repo for matplotlib. Any experience with installing the ubuntu edgy version (0.87) on dapper? Thanks, wr |
|
From: Todd P. <tw...@gm...> - 2006-10-22 19:50:08
|
Thanks Eric, That confirms my suspicions. Does anyone know where I can get an rc2 binary for win32? I only see rc3 up on sourceforge. PS: I think my original e-mail got posted to the list twice... if that's the case I apologize for the (inadvertent) spam. On 10/22/06, Eric Firing <ef...@ha...> wrote: > Todd Page wrote: > > Hello all, > > > > My apologies if this has been brought up and solved before, but I > > didn't see any solutions that made sense to me in the archives. Here > > is my stack: > > python 2.4 (from python.org) > > numpy-1.0rc3 > > matplotlib-0.87.6 > > > > Everything seems to install fine. When I attempt to do 'from pylab > > import *' I get the following error: > > > > RuntimeError: module compiled against version 1000002 of C-API but this version > > of numpy is 1000009 > > If I remember correctly, mpl 0.87.6 is compiled against numpy-1.0.rc2, > but rc3 has since come out with a C-API change so that it will not work > with 0.87.6. So, give numpy-1.0.rc2 a try. numpy 1.0 is scheduled to > come out soon, and I expect that shortly thereafter there will be an mpl > release to match it. At that point the numpy C API should be genuinely > stable and it should no longer be necessary to keep future mpl and numpy > versions in lockstep. > > Eric > -- Todd Page tw...@gm... |
|
From: Eric F. <ef...@ha...> - 2006-10-22 19:34:00
|
Todd Page wrote: > Hello all, > > My apologies if this has been brought up and solved before, but I > didn't see any solutions that made sense to me in the archives. Here > is my stack: > python 2.4 (from python.org) > numpy-1.0rc3 > matplotlib-0.87.6 > > Everything seems to install fine. When I attempt to do 'from pylab > import *' I get the following error: > > RuntimeError: module compiled against version 1000002 of C-API but this version > of numpy is 1000009 If I remember correctly, mpl 0.87.6 is compiled against numpy-1.0.rc2, but rc3 has since come out with a C-API change so that it will not work with 0.87.6. So, give numpy-1.0.rc2 a try. numpy 1.0 is scheduled to come out soon, and I expect that shortly thereafter there will be an mpl release to match it. At that point the numpy C API should be genuinely stable and it should no longer be necessary to keep future mpl and numpy versions in lockstep. Eric |
|
From: Todd P. <tw...@gm...> - 2006-10-22 18:35:35
|
Hello all, My apologies if this has been brought up and solved before, but I didn't see any solutions that made sense to me in the archives. Here is my stack: python 2.4 (from python.org) numpy-1.0rc3 matplotlib-0.87.6 Everything seems to install fine. When I attempt to do 'from pylab import *' I get the following error: RuntimeError: module compiled against version 1000002 of C-API but this version of numpy is 1000009 The import of the numpy version of the nxutils module, _nsnxutils, failed. This is is either because numpy was unavailable when matplotlib was compiled, because a dependency of _nsnxutils could not be satisfied, or because the build flag for this module was turned off in setup.py. If it appears that _nsnxutils was not built, make sure you have a working copy of numpy and then re-install matplotlib. Otherwise, the following traceback gives more details: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Development\Python25\Lib\site-packages\pylab.py", line 1, in <module> from matplotlib.pylab import * File "C:\Development\Python25\Lib\site-packages\matplotlib\pylab.py", line 199 , in <module> import mlab #so I can override hist, psd, etc... File "C:\Development\Python25\Lib\site-packages\matplotlib\mlab.py", line 64, in <module> import nxutils File "C:\Development\Python25\Lib\site-packages\matplotlib\nxutils.py", line 1 7, in <module> from matplotlib._ns_nxutils import * ImportError: numpy.core.multiarray failed to import I saw an e-mail in the archive that had a similar error, but the solution was apparently to install scipy-0.51? I don't need or necessarily want scipy.. is there a reason the latest win32 binaries for matplotlib and numpy don't play together? Any help is appreciated. Thanks! - Todd -- Todd Page tw...@gm... |
|
From: Jeff H. <hu...@ui...> - 2006-10-21 23:13:22
|
using scatter() to draw a plot, is it possible to create a legend for this? I have blue points of varying sizes representing values in the plot I'd like to show a medium-sized blue dot for this plot in the legend. Using the legend() function shows nothing for scatter plots in the displayed legend. Thanks, Jeff |
|
From: John H. <jdh...@ac...> - 2006-10-21 22:45:50
|
>>>>> "David" == David Andrews <irb...@gm...> writes:
David> Any help would be appreciated,
http://www.scipy.org/Cookbook/Matplotlib/Animations
|
|
From: David A. <irb...@gm...> - 2006-10-21 22:23:44
|
Hi, I'm slightly confused as to how i'm supposed to write a program that will call plot() once initially, and then subsequently update the plot with new points as they are generated. As i understand it I should be doing something along the following lines: #First call: plot(x0,y0,hold=True) show() #Subsequent calls: plot(x1,y1,hold=True) plot(x2,y2,hold=True) ... But this does not work as expected. Any help would be appreciated, Regards, Dave Andrews |
|
From: Andrea G. <and...@gm...> - 2006-10-21 21:42:51
|
Hi all,
am I the only one that noticed that 3D plots do not work anymore? Unless
I am missing something, contour3D, contourf3D simply fails with this
message:
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 440, in
add_ax
es
a = Axes(self, rect, **kwargs)
File "C:\Python25\lib\site-packages\matplotlib\axes.py", line 348, in
__init__
self._position = map(makeValue, rect)
TypeError: argument 2 to map() must support iteration
While the other 3D plots suffer of problems when the mouse enter the plot
window; I get these error messages:
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py",
line 1149, in _onMotion
FigureCanvasBase.motion_notify_event(self, x, y, guiEvent=evt)
File "C:\Python25\Lib\site-packages\matplotlib\backend_bases.py", line
895, in motion_notify_event
func(event)
File "C:\Python25\lib\site-packages\matplotlib\axes3d.py", line 414, in
on_move
if event.inaxes != self or not self.M:
ValueError: The truth value of an array with more than one element is
ambiguous.
Use a.any() or a.all()
Am I missing something? I am using:
Windows XP
Python 2.5
wx* 2.7.1.1 (it doesn't matter in reality)
Numpy 1.0rc2
matplotlib 0.87.6 (NOT svn)
Thanks for every suggestion.
--
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
|
|
From: Eric F. <ef...@ha...> - 2006-10-21 18:31:19
|
Willi Richert wrote:
> Am Freitag, 20. Oktober 2006 17:31 schrieb John Hunter:
>> from pylab import *
>>
>> ax1 = subplot(111)
>> t = arange(0.01, 10.0, 0.01)
>> s1 = exp(t)
>> plot(t, s1, 'b-')
>> xlabel('time (s)')
>> ylabel('exp')
>>
>>
>> # turn off the 2nd axes rectangle with frameon kwarg
>> ax2 = twinx()
>> s2 = sin(2*pi*t)
>> plot(t, s2, 'r.')
>> ylabel('sin')
>> ax2.yaxis.tick_right()
>> ax2.set_ylim(ymin=-3)
>> show()
>
> Hi,
>
> this example does not work for me: Right axis is in the range [-1, 1].
> (The same as the example two_axes.py with an additional set_ylim in my
> previous mail. Sorry for the sparse information.)
>
> matplotlib.__version__ == 0.82
There is the problem: you need to update your matplotlib.
Eric
|
|
From: Willi R. <w.r...@gm...> - 2006-10-21 18:07:43
|
Am Freitag, 20. Oktober 2006 17:31 schrieb John Hunter:
> from pylab import *
>
> ax1 = subplot(111)
> t = arange(0.01, 10.0, 0.01)
> s1 = exp(t)
> plot(t, s1, 'b-')
> xlabel('time (s)')
> ylabel('exp')
>
>
> # turn off the 2nd axes rectangle with frameon kwarg
> ax2 = twinx()
> s2 = sin(2*pi*t)
> plot(t, s2, 'r.')
> ylabel('sin')
> ax2.yaxis.tick_right()
> ax2.set_ylim(ymin=-3)
> show()
Hi,
this example does not work for me: Right axis is in the range [-1, 1].
(The same as the example two_axes.py with an additional set_ylim in my
previous mail. Sorry for the sparse information.)
matplotlib.__version__ == 0.82
python 2.4
Thanks,
wr
|
|
From: <sk...@po...> - 2006-10-20 21:31:10
|
I found that the problem occurs when I have GTKAgg WXAgg or PS backends set in matplotlibrc file and matplotlib displays fonts properly when using GTK, WX. So I guess that it must be something wrong with antigrain or preparing text for agg rendering. Any help, regards, Seweryn Kokot |
|
From: John H. <jdh...@ac...> - 2006-10-20 18:59:07
|
>>>>> "Jeff" == Jeff Peery <jef...@ya...> writes:
Jeff> hello, I'm using matplotlib and the wxAgg as a backend with
Jeff> wxpython for a statistical process control application. I
Jeff> would like to be able to pick points on an xy line and get
Jeff> the index of the point. I looked at the picker_demo demo and
You could do something like the following (you'll probably want to add
some epsilon condition for closeness)
from pylab import figure, show, nx
class PickVert:
def __init__(self, axes, line, callback):
'call callback with the nearest vert picked'
self.line = line
self.axes = axes
self.axes.figure.canvas.mpl_connect('button_press_event',
self.pick)
self.callback = callback
def pick(self, event):
if event.button!=1 or event.inaxes!=self.axes: return
x = line.get_xdata()
y = line.get_ydata()
d = nx.sqrt((event.xdata - x)**2 + (event.ydata-y)**2)
ind = nx.nonzero(d==nx.amin(d))
self.callback(ind)
def callback(ind):
print 'the index is', ind
fig = figure()
ax = fig.add_subplot(111)
x = nx.arange(20)
y = nx.mlab.rand(20)
line, = ax.plot(x, y, 'o')
picker = PickVert(ax, line, callback)
show()
Jeff> I am also a bit confused as to how pylab is related to
Jeff> matplotlib. I was informed not to use pylab if using a
Jeff> backend and wxpython application, so I am only using
Jeff> matplotlib. Is there a similar bind function to use for
Jeff> binding the pick event to the callback function? thanks.
pylab is a procedural wrapper of the matplotlib API that does things
for you like manage the creation and destruction of GUI windows and it
works across multiple GUIs. If you are writing a GUI app, you do not
want pylab to manage that for you.
JDH
|
|
From: <sk...@po...> - 2006-10-20 18:52:13
|
Hello,
I have the following script and in matplotlib 0.87.5 (debian sid), text is not
correctly displayed, whereas in matplotlib 0.82-1 it was ok. See attached
pictures.
#!/usr/bin/python
# -*- coding: iso-8859-2 -*-
from pylab import *
ab = unicode('żłóńę','iso-8859-2')
plot([1, 3, 4],[1, 4, 2])
xlabel(ab)
show()
Any idead what is wrong
Regards,
Seweryn Kokot |
|
From: Chloe L. <cl...@te...> - 2006-10-20 18:06:39
|
I don't know how to make the "//" symbol in the y-axis, but if you have two plots that share the same x-axis, you can represent this kind of data. The "Working with multiple figure and axes" section of the tutorial http://matplotlib.sourceforge.net/tutorial.html is almost right; if you turn off the display of the x-axis in the upper plot, it will be even better. &C On Oct 19, 2006, at 3:05 PM, CL wrote: > Hi, group, > I am wondering if matplotlib can make a plot look like > the attached one. Basically, the y-axis was collapsed to show both > one extreme value and the rest of smaller values. > > Thanks. > > Chunlei > > <moz-screenshot.jpg> > > <moz-screenshot.jpg> > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642______________________________ > _________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Jeff P. <jef...@ya...> - 2006-10-20 16:45:30
|
hello, I'm using matplotlib and the wxAgg as a backend with wxpython for a statistical process control application. I would like to be able to pick points on an xy line and get the index of the point. I looked at the picker_demo demo and I have an idea of how this works but I'm a bit confused as to how to pick a vertex on a line, or if that isn't possible how to pick a marker created by scatter(). I am also a bit confused as to how pylab is related to matplotlib. I was informed not to use pylab if using a backend and wxpython application, so I am only using matplotlib. Is there a similar bind function to use for binding the pick event to the callback function? thanks. Jeff --------------------------------- Get your email and more, right on the new Yahoo.com |
|
From: John H. <jdh...@ac...> - 2006-10-20 15:48:52
|
>>>>> "Khem" == Khem Raj <raj...@gm...> writes:
Khem> Hi I am new to matplotlib and I am trying to use it to draw
Khem> a matrix. I would want to give a different color to each box
Khem> depending upon the value this matrix element has
Khem> Could someone help me in quick start meanwhile I am looking
Khem> into documentation.
figure()
imshow(rand(10,5), cmap=cm.jet, interpolation='nearest', aspect='auto')
colorbar()
figure()
pcolor(rand(10,5), cmap=cm.hot)
JDH
|
|
From: John H. <jdh...@ac...> - 2006-10-20 15:45:21
|
>>>>> "Johannes" == Johannes Elbs <ml....@gm...> writes:
Johannes> Hi, I have time data stored in the format hh:mm:ss and
Johannes> would like to plot it, having about 4 to 6 ticks labeled
Johannes> in this format. What I'm doing at the moment is to
Johannes> first convert my time to seconds and plot y as function
Johannes> of yime in seconds.
You first need to convert them to matplotlib dates. Assume your data
are collected on Oct 10th, 2006
import matplotlib.numerix as nx
import datetime
from matplotlib.dates import date2num, MINUTES_PER_DAY, SEC_PER_DAY
d0 = date2num(datetime.date(2006,10,10))
def convert(s):
h,m,s = map(float, s.split(':'))
return d0 + h/24. + m/MINUTES_PER_DAY + s/SEC_PER_DAY
In [11]: convert('12:32:02')
Out[11]: 732594.52224537032
matplotlib represents dates as days (float) since 0000-00-00
Now you need to convert your list of strings to mpl dates. If your
list of strings is called datestrs
dates = nx.array([convert(s) for s in datestrs])
Now when you plot you need to tell mpl you are plotting dates
ax.plot_date(dates, vals)
We have pretty smart tick locators and tick formatters for date
plotting, so you may be happy with what you get, but if not you can
set your own
from matplotlib.dates import DateFormatter
ax.xaxis.set_major_formatter('%H:%M:%S')
I also find it helpful on date plots to do the following
# move the subplot up a bit to make for rotated labels
fig.subplots_adjust(bottom=0.15)
for label in ax.get_xticklabels():
label.set_rotation(30)
label.set_horizontalalignment('right')
see also
http://matplotlib.sf.net/matplotlib.dates.html
http://matplotlib.sf.net/matplotlib.ticker.html
the users guide and the following examples
date_demo1.py
date_demo2.py
date_demo_convert.py
date_demo_rrule.py
finance_demo.py
JDH
|
|
From: John H. <jdh...@ac...> - 2006-10-20 15:32:41
|
>>>>> "Willi" == Willi Richert <w.r...@gm...> writes:
Willi> Hi, I am plotting two graphs in one according to
Willi> http://matplotlib.sourceforge.net/examples/two_scales.py
Willi> I want the plot belonging to the right axis to start with
Willi> y=0. However,
Willi> ax2.set_ylim(ymin=0.0)
Willi> does not affect the plot at all.
It always helps to post a complete example; otherwise we have to use
our amazing powers of deduction to figure out what you might be doing
wrong. In this case, two possibilities come to mind:
1) you are calling set_ylim before a plot command and the autoscaler
is kicking on the plot command and overriding your changes. You
should call set_ylim after all plot commands, or turn autoscaling
off with the autoscale_on property of the Axes
2) you are working in interactive mode, eg ipython -pylab, and the
draw command is not being triggered since you are making an OO
call. You can force a draw command in pylab with "draw" or with
fig.canvas.draw().
The following *does* work for me, so maybe you can follow it as an
example
from pylab import *
ax1 = subplot(111)
t = arange(0.01, 10.0, 0.01)
s1 = exp(t)
plot(t, s1, 'b-')
xlabel('time (s)')
ylabel('exp')
# turn off the 2nd axes rectangle with frameon kwarg
ax2 = twinx()
s2 = sin(2*pi*t)
plot(t, s2, 'r.')
ylabel('sin')
ax2.yaxis.tick_right()
ax2.set_ylim(ymin=-3)
show()
|
|
From: Derek H. <DH...@cs...> - 2006-10-20 14:46:09
|
I am sure this (superimposed Line and Bar plots) is easy to do, but I cannot see any discussion of "how" on the user list (difficult to know which phrase to search!) Any pointers? Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to Cal...@cs.... This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
From: Derek H. <DH...@cs...> - 2006-10-20 14:00:57
|
I have a simple, but frustrating problem. I need to plot a number of series onto a boxplot. Some sample code looks as follows: from pylab import * from scipy import array jan = array([46, 38, 28, 14, 11, 7, 4, 3, 3, 3, 3, 3, 3, 2, 2, 1]) #jan = array([46, 38, 28, 14, 11, 7, 4, 3, 3, 3, 3, 3]) #this length works!! feb = array([ 2, 12, 3, 3, 13, 10, 17, 6, 6, 6, 3, 3]) jan.shape = (-1, 1) feb.shape = (-1, 1) series = concatenate( (jan, feb), 1 ) figure() boxplot(series,1) show() (In Real Life, of course, the data arrays are built up elsewhere and passed into the plotting function...) The problem is that I get the error: ValueError: array dimensions must agree except for d_0 because jan and feb have different lengths - however, I have no control over the size of these arrays - they vary greatly according to external issues. How do I plot multiple. variable-length array on the same boxplot? Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to Cal...@cs.... This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
From: Johannes E. <ml....@gm...> - 2006-10-20 13:45:29
|
Hi, I have time data stored in the format hh:mm:ss and would like to plot it, having about 4 to 6 ticks labeled in this format. What I'm doing at the moment is to first convert my time to seconds and plot y as function of yime in seconds. Here the first question: Is this the way to go or is there a function I missed which allows to directly plot from the former format? Now I'd like to have the labels to be displayed in the hh:mm:ss format, in a way that it automatically adopts when zooming/dezooming. Without zooming I figured out that it is quite easy to use the xticks method, but is there a possibility to write a function which automatically readadopts the tick spacing? If not, I found in the manual the dateformatter class, but if I understand correctly, I first have to transfer the time to strftime? Or can I directly use this class using the time starting from midnight? Thanks for any response, Johannes |