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
(18) |
2
(8) |
3
(2) |
4
(8) |
5
(5) |
|
6
(3) |
7
(17) |
8
(3) |
9
(3) |
10
(3) |
11
(14) |
12
(1) |
|
13
|
14
(2) |
15
(9) |
16
(23) |
17
(12) |
18
(13) |
19
(7) |
|
20
(4) |
21
(2) |
22
(6) |
23
(7) |
24
(6) |
25
(2) |
26
|
|
27
(4) |
28
(1) |
29
(10) |
30
(7) |
31
(14) |
|
|
|
From: James B. <bo...@ll...> - 2005-03-23 20:54:15
|
Greg, Thanks for the help. Sometimes it just takes a bit of hand holding to get things right. I was trying the sequence of steps you indicated, but I was making a stupid mistake in the data specification dictionary and mis-interpreted the subsequent error. Your comment made me look harder at the details and all worked fine. FWIW I have enclosed code to make a matplotlib color map data dictionary from a GMT .cpt file. As I indicated previously these colormaps are found at: http://craik.shef.ac.uk/cpt-city/ there are well over a hundred from which to choose. The code is only lightly used and not very elegant. So if you download, for example, the 'spectrum-light.cpt' file from http://craik.shef.ac.uk/cpt-city/views/hueshift.html then run; cdict = gmtcolormapPylab.gmtcolormapPylab('spectrum-light') colormap = pylab.cm.colors.LinearSegmentedColormap('spectrum- light'',cdict,pylab.rcParams['image.lut']) pylab.contourf(XX,YY,ZZ,cmap=colormap) you will get filled contours with the indicated colorTable. Thanks again. --Jim def gmtcolormapPylab(fileName,GMTPath = None): import colorsys import Numeric N = Numeric if type(GMTPath) == type(None): filePath = '/Volumes/IBM1/gmt4/GMT4.0b/share/cpt/'+ fileName +'.cpt' else: filePath = GMTPath+'/'+ fileName +'.cpt' try: f = open(filePath) except: print 'file ',filePath, 'not found' return None lines = f.readlines() f.close() x = [] r = [] g = [] b = [] colorModel = 'RGB' for l in lines: ls = l.split() if l[0] == '#': if ls[-1] == 'HSV': colorModel = 'HSV' continue else: continue if ls[0] == 'B' or ls[0] == 'F' or ls[0] == 'N': pass else: x.append(float(ls[0])) r.append(float(ls[1])) g.append(float(ls[2])) b.append(float(ls[3])) xtemp = float(ls[4]) rtemp = float(ls[5]) gtemp = float(ls[6]) btemp = float(ls[7]) x.append(xtemp) r.append(rtemp) g.append(gtemp) b.append(btemp) nTable = len(r) x = N.array( x , N.Float) r = N.array( r , N.Float) g = N.array( g , N.Float) b = N.array( b , N.Float) if colorModel == 'HSV': for i in range(r.shape[0]): rr,gg,bb = colorsys.hsv_to_rgb(r[i]/360.,g[i],b[i]) r[i] = rr ; g[i] = gg ; b[i] = bb if colorModel == 'HSV': for i in range(r.shape[0]): rr,gg,bb = colorsys.hsv_to_rgb(r[i]/360.,g[i],b[i]) r[i] = rr ; g[i] = gg ; b[i] = bb if colorModel == 'RGB': r = r/255. g = g/255. b = b/255. xNorm = (x - x[0])/(x[-1] - x[0]) red = [] blue = [] green = [] for i in range(len(x)): red.append([xNorm[i],r[i],r[i]]) green.append([xNorm[i],g[i],g[i]]) blue.append([xNorm[i],b[i],b[i]]) colorDict = {'red':red, 'green':green, 'blue':blue} return (colorDict) On Mar 23, 2005, at 9:47 AM, Greg Novak wrote: > * James Boyle <bo...@ll...> wrote: >> I would like to be able to define a new colormap dynamically, that >> is without altering code in cm.py. It would not appear to be too >> difficult to some one who knew what they were doing. I have made >> some attempts following the code in cm.py and other places, but I do >> not seem to be able to get the normalization correct. > > Do you mean that you're having trouble with the > LinearSegmentedColormap function? I've had to do the same thing, and > I've included below my code to generate two colormaps, one is the same > as "hot" but reversed, and the other fades from read to blue. The > form seems to be: > > data = {'red': ((0,r0,r0), (i1, r1, r1), (i2, r2, r2), ... (1, rn, > rn)), > 'green': ... similar, 'blue': ... similar} > > colormap = pylab.cm.colors.LinearSegmentedColormap('colormap', > data, > > pylab.rcParams['image.lut']) > > where i1, i2... are independent variable values from zero to 1, and > r1, r2... are red values from zero to one associated with that > variable value. Each red value appears twice to allow for > discontinuous functions, but I haen't had to use that. > >> I know that I could just put the data into cm.py but I would rather >> not have to remember to alter this code for every release of >> matplotlib and I am sure most people do not want my colormaps. > > One of the things I like about python is that you can stuff things > into other namespaces without altering the original code. This is > probably not recommended and will break things, etc, but I use it to > add functionality that I consider to be missing from the software I > use. This allows me to forget whether the function is my own > extension to the package or a "native" function in the package. > > Ie, I'm sure that you don't want to be typing things like: > > subplot(211); pcolor(data_1,cmap=cm.hot) > subplot(212); pcolor(data_2,cmap=mycoolcolormaps.map) > > because then you'll have to remember which colormaps are in which > place. So you could do something similar to this: > > # Add some stuff to the scipy namespace > def lrange(l, h, dex): > """Log-spaced array""" > return 10**scipy.arange(scipy.log10(l), scipy.log10(h), dex) > scipy.lrange = lrange > >> I have used GMT (Generic Mapping Tools) extensively in the past and >> have code to translate the GMT color map into a form usable by >> matplotlib. > > I don't have anything to offer, but I'd like more colormaps, too, so > I'm interested in whatever comes out of this discussion... > > Greg > |
|
From: Travis B. <td...@fa...> - 2005-03-23 18:03:16
|
Thanks, the script I linked is actually a matplotlib screenshot script and does require some extra stuff. My extraneous labels problem was fixed when I applied a null format to the Upper axis, it was my mistake, I just hadn't done that. Best, Travis On Wed, 23 Mar 2005 11:05:11 -0500, "Darren Dale" <dd...@co...> said: > On Tuesday 22 March 2005 05:53 pm, Travis Brady wrote: > > Hi all, > > > > I'm making a plot with two axes (axUpper and axLower) that is a bit of a > > copy of John's financial plot in > > http://matplotlib.sourceforge.net/screenshots/finance_work2.py. > > axUpper has it's y axis on the left and axLower has it on the right and > > each of these sets of labels has an extraneous bit of a date label on > > it. > > axUpper has a chunk of 'February' at the point where axUpper and axLower > > meet and the axLower labels have an extra bit of '02' at the same spot. > > > > Anyone have an idea of why that might be? > > It might be related to a bug that I tried to correct last week. I cant > run the > script you posted: > > Traceback (most recent call last): > File "finance_work2.py", line 14, in ? > from helpers import load_quotes, movavg, fill_over, random_signal > ImportError: No module named helpers > > First, would you link an image of the plot? I could also use a barebones > script that duplicates the behavior. > > -- > > Darren > > > ------------------------------------------------------- > This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 > Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows > Embedded(r) & Windows Mobile(tm) platforms, applications & content. > Register > by 3/29 & save $300 > http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Travis Brady td...@fa... |
|
From: Greg N. <no...@uc...> - 2005-03-23 17:49:49
|
* James Boyle <bo...@ll...> wrote:
> I would like to be able to define a new colormap dynamically, that
> is without altering code in cm.py. It would not appear to be too
> difficult to some one who knew what they were doing. I have made
> some attempts following the code in cm.py and other places, but I do
> not seem to be able to get the normalization correct.
Do you mean that you're having trouble with the
LinearSegmentedColormap function? I've had to do the same thing, and
I've included below my code to generate two colormaps, one is the same
as "hot" but reversed, and the other fades from read to blue. The
form seems to be:
data = {'red': ((0,r0,r0), (i1, r1, r1), (i2, r2, r2), ... (1, rn, rn)),
'green': ... similar, 'blue': ... similar}
colormap = pylab.cm.colors.LinearSegmentedColormap('colormap',
data,
pylab.rcParams['image.lut'])
where i1, i2... are independent variable values from zero to 1, and
r1, r2... are red values from zero to one associated with that
variable value. Each red value appears twice to allow for
discontinuous functions, but I haen't had to use that.
> I know that I could just put the data into cm.py but I would rather
> not have to remember to alter this code for every release of
> matplotlib and I am sure most people do not want my colormaps.
One of the things I like about python is that you can stuff things
into other namespaces without altering the original code. This is
probably not recommended and will break things, etc, but I use it to
add functionality that I consider to be missing from the software I
use. This allows me to forget whether the function is my own
extension to the package or a "native" function in the package.
Ie, I'm sure that you don't want to be typing things like:
subplot(211); pcolor(data_1,cmap=cm.hot)
subplot(212); pcolor(data_2,cmap=mycoolcolormaps.map)
because then you'll have to remember which colormaps are in which
place. So you could do something similar to this:
# Add some stuff to the scipy namespace
def lrange(l, h, dex):
"""Log-spaced array"""
return 10**scipy.arange(scipy.log10(l), scipy.log10(h), dex)
scipy.lrange = lrange
> I have used GMT (Generic Mapping Tools) extensively in the past and
> have code to translate the GMT color map into a form usable by
> matplotlib.
I don't have anything to offer, but I'd like more colormaps, too, so
I'm interested in whatever comes out of this discussion...
Greg
|
|
From: Matt N. <new...@ca...> - 2005-03-23 17:04:45
|
Leighton, This also does not work Win XP.... The issue is that you're trying to update the data *before* running the MainLoop(). The puzzle should be why it works on Linux / GTK ;). There are a few approaches to the better solution, all of which lead to slightly more complex than your example. One such solution is below (and attached), using Start and Stop buttons, and a timer to periodically update the plot. I tried to add as little code to yours as possible, but also changed from backend_wx to backend_wxagg, because it's significantly faster and seemed to be your intent. I'm not sure the logic in update_data is really what you want, BTW. You might find the example in MPlot-0.7/examples/test.py at http://cars9.uchicago.edu/~newville/Python/MPlot helpful. This is a more complete example of dynamically updating a WXAgg canvas. It needs better documentation, but seems pretty close to what you're trying to do. Hope that helps, --Matt Newville import matplotlib matplotlib.use("WXAgg") matplotlib.interactive(True) from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg from matplotlib.figure import Figure from matplotlib.axes import Subplot from Numeric import pi, sin, arange import wx class PlotFigure(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, "Test embedded wxFigure") self.fig = Figure((5,4), 75) self.canvas = FigureCanvasWxAgg(self, -1, self.fig) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.canvas, 1, wx.TOP) # create start/stop buttons self.button_start = wx.Button(self,-1, " Start ", size=(-1,-1)) self.button_stop = wx.Button(self,-1, " Stop ", size=(-1,-1)) # bind actions to the buttons self.button_start.Bind(wx.EVT_BUTTON,self.OnStart) self.button_stop.Bind(wx.EVT_BUTTON, self.OnStop) # pack the buttons in the Sizer btnsizer = wx.BoxSizer(wx.HORIZONTAL) btnsizer.Add(self.button_start, 1, wx.LEFT) btnsizer.Add(self.button_stop, 1, wx.LEFT) sizer.Add(btnsizer, 0, wx.TOP) self.SetSizer(sizer) self.Fit() # initialize the data here self.init_plot_data() # create a timer, used in OnStart / OnStop ID_TIMER = wx.NewId() wx.EVT_TIMER(self, ID_TIMER, self.onTimer) self.timer = wx.Timer(self, ID_TIMER) def init_plot_data(self): self.a = self.fig.add_subplot(111) x = arange(0,2*pi,0.01) # x-array self.a.set_xlim((0., 2*pi)) self.a.set_ylim((-1., 1.)) self.line, = self.a.plot(x,x) self.npts = len(x) def update_data(self,i): self.line.set_ydata(self.line.get_xdata()*0.01*i) self.canvas.draw() def onTimer(self, event): self.count += 1 if self.count > self.npts: self.OnStop() else: self.update_data(self.count) def OnStop(self,event=None): self.timer.Stop() def OnStart(self,event=None): self.count = 0 self.timer.Start(20) # delay in milliseconds if __name__ == '__main__': app = wx.PySimpleApp(0) frame = PlotFigure() frame.Show(True) app.MainLoop() |
|
From: Darren D. <dd...@co...> - 2005-03-23 16:05:27
|
On Tuesday 22 March 2005 05:53 pm, Travis Brady wrote: > Hi all, > > I'm making a plot with two axes (axUpper and axLower) that is a bit of a > copy of John's financial plot in > http://matplotlib.sourceforge.net/screenshots/finance_work2.py. > axUpper has it's y axis on the left and axLower has it on the right and > each of these sets of labels has an extraneous bit of a date label on > it. > axUpper has a chunk of 'February' at the point where axUpper and axLower > meet and the axLower labels have an extra bit of '02' at the same spot. > > Anyone have an idea of why that might be? It might be related to a bug that I tried to correct last week. I cant run the script you posted: Traceback (most recent call last): File "finance_work2.py", line 14, in ? from helpers import load_quotes, movavg, fill_over, random_signal ImportError: No module named helpers First, would you link an image of the plot? I could also use a barebones script that duplicates the behavior. -- Darren |
|
From: Darren D. <dd...@co...> - 2005-03-23 15:38:05
|
On Tuesday 22 March 2005 01:53 pm, Humufr wrote:
> Hello,
>
> there are something always strange for me in mathtext is the code for
> the angstrom mode. It's not the same in Latex and there are only the
> upper case symbole. Perhaps (it's only a suggestion) that will be better
> to replace \angstrom withb \AA.
This reminds me, I have been meaning to report that \hspace doesnt render, but
{\ } does.
--
Darren
|
|
From: Leighton P. <lp...@sc...> - 2005-03-23 14:53:06
|
Hi,=0D=0A=0D=0AI'm having difficulty producing dynamic plots on OS X using =
matplotlib=0D=0A0.73.1 and wxPython 2.5.3.1 on OS X 10.3 with Python 2.3.5=0D=
=0A=0D=0AThe code below works with the same configuration on Fedora Core 3,=0D=
=0Aproducing a graph with a line that pivots at the origin. On OS X,=0D=0A=
however, the frame remains blank and grey until the final plot is drawn,=0D=
=0Awhen the plot takes on the correct final state.=0D=0A=0D=0AI've tried si=
milar examples with bar graphs and scatter plots, and the=0D=0Asame results=
are produced. I don't know if this is a problem with=0D=0Amatplotlib or w=
xPython, and any help would be gratefully appreciated.=0D=0A=0D=0AIf you ne=
ed any more info to help, let me know.=0D=0A=0D=0AThe example code is:=0D=0A=0D=
=0A----------------=0D=0A=0D=0Aimport matplotlib=0D=0Amatplotlib.use("WXAgg=
")=0D=0Amatplotlib.interactive(True)=0D=0Afrom matplotlib.backends.backend_=
wx import FigureCanvasWx=0D=0Afrom matplotlib.figure import Figure=0D=0Afro=
m matplotlib.axes import Subplot=0D=0A=0D=0Afrom Numeric import pi, sin, ar=
ange=0D=0A=0D=0Aimport wx=0D=0A=0D=0A=0D=0Aclass PlotFigure(wx.Frame):=0D=0A=
def __init__(self):=0D=0A wx.Frame.__init__(self, None, -1, "Tes=
t embedded wxFigure")=0D=0A=0D=0A self.fig =3D Figure((5,4), 75)=0D=0A=
self.canvas =3D FigureCanvasWx(self, -1, self.fig)=0D=0A=0D=0A =
sizer =3D wx.BoxSizer(wx.VERTICAL)=0D=0A sizer.Add(self.canvas, 1=
, wx.LEFT|wx.TOP|wx.GROW)=0D=0A self.SetSizer(sizer)=0D=0A se=
lf.Fit()=0D=0A=0D=0A def init_plot_data(self):=0D=0A self.a =3D s=
elf.fig.add_subplot(111)=0D=0A x =3D arange(0,2*pi,0.01) #=
x-array=0D=0A self.a.set_xlim((0., 2*pi))=0D=0A self.a.set_y=
lim((-1., 1.))=0D=0A self.line, =3D self.a.plot(x,x)=0D=0A=0D=0A =
def update_data(self, i):=0D=0A self.line.set_ydata(self.line.get_xd=
ata()*0.01*i)=0D=0A self.canvas.draw()=0D=0A=0D=0A=0D=0Aif __name__ =
=3D=3D '__main__':=0D=0A app =3D wx.PySimpleApp(0)=0D=0A frame =3D Pl=
otFigure()=0D=0A frame.Show(True)=0D=0A frame.init_plot_data()=0D=0A =
for i in arange(1,200):=0D=0A frame.update_data(i)=0D=0A app.M=
ainLoop()=0D=0A=0D=0A=0D=0A=0D=0A--=20=0D=0ADr Leighton Pritchard AMRSC=0D=0A=
D131, Plant-Pathogen Interactions, Scottish Crop Research Institute=0D=0AIn=
vergowrie, Dundee, Scotland, DD2 5DA, UK=0D=0AT: +44 (0)1382 562731 x2405 F=
: +44 (0)1382 568578=0D=0AE: lp...@sc... W: http://bioinf.scri=
=2Esari.ac.uk/lp=0D=0AGPG/PGP: FEFC205C E58BA41B http://www.keyserver.net =
=20=0D=0A(If the signature does not verify, please remove the SC=
RI disclaimer)=0D=0A_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _=
_ _ _ _ _ _ _ _ _ _=0D=0A=0D=0ADISCLAIMER:=0D=0A=0D=0AThis email is from t=
he Scottish Crop Research Institute, but the views=20=0D=0Aexpressed by the=
sender are not necessarily the views of SCRI and its=20=0D=0Asubsidiaries.=
This email and any files transmitted with it are confidential=20=0D=0Ato =
the intended recipient at the e-mail address to which it has been=20=0D=0Aa=
ddressed. It may not be disclosed or used by any other than that addressee=
=2E=0D=0AIf you are not the intended recipient you are requested to preserv=
e this=20=0D=0Aconfidentiality and you must not use, disclose, copy, print =
or rely on this=20=0D=0Ae-mail in any way. Please notify pos...@sc...=
ri.ac.uk quoting the=20=0D=0Aname of the sender and delete the email from y=
our system.=0D=0A=0D=0AAlthough SCRI has taken reasonable precautions to en=
sure no viruses are=20=0D=0Apresent in this email, neither the Institute no=
r the sender accepts any=20=0D=0Aresponsibility for any viruses, and it is =
your responsibility to scan the email=20=0D=0Aand the attachments (if any).=0D=
=0A |