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) |
2
(8) |
3
(8) |
4
(3) |
5
(15) |
6
(11) |
7
(4) |
|
8
|
9
(3) |
10
(21) |
11
(5) |
12
(7) |
13
(10) |
14
(12) |
|
15
(3) |
16
(4) |
17
(16) |
18
(20) |
19
(11) |
20
(9) |
21
(1) |
|
22
|
23
(15) |
24
(11) |
25
(1) |
26
(9) |
27
(5) |
28
|
|
29
(1) |
30
|
31
(6) |
|
|
|
|
|
From: Edin S. <edi...@gm...> - 2007-07-06 18:52:31
|
Hi kaushik,
On 7/6/07, kaushik.ghose <kau...@gm...> wrote:
> Hi,
>
> When I do
>
> m.text(0,0,'$\sum_{n=1}^{100}$');m.axis('off');m.savefig('test.svg')
Shouldn't that be:
r'$\sum_{n=1}^{100}$' # i.e. a "raw" string.
or:
'$\\sum_{n=1}^{100}$' # Escaped backslash
Does this help?
Cheers,
Edin
|
|
From: Jeff W. <js...@fa...> - 2007-07-06 16:29:03
|
Jesper Larsen wrote:
> Hi matplotlib users,
>
> I am interested in making basemap plots covering only a small area. When I do
> this the meridians and parallels (and labelling of these) look strange. I
> have pasted in a simple example below showing the problem (at least on my
> computer):
>
> import pylab
> from matplotlib.toolkits import basemap
>
> bmap = basemap.Basemap(120.33, 35.95, 120.55, 36.12)
> merid = [120.3, 120.35, 120.4, 120.45, 120.5, 120.55, 120.6]
> paral = [35.94, 35.96, 35.98, 36.0, 36.02, 36.04, 36.06, 36.08, 36.1, 36.12,
> 36.14]
> bmap.drawparallels(paral, labels=[1,0,0,0])
> bmap.drawmeridians(merid, labels=[0,0,0,1])
> pylab.savefig('test.png')
>
> Regards,
> Jesper
>
Jesper: Hmm, I guess I never thought anyone would make a map that small. I tweaked some of the parameters to make it work better (svn revision 3470). Here's the diff in case you just want to apply the patch manually:
===================================================================
--- basemap.py (revision 3469)
+++ basemap.py (working copy)
@@ -1665,9 +1665,9 @@
xoffset = (self.urcrnrx-self.llcrnrx)/100.
if self.projection in ['merc','cyl','mill','moll','robin','sinu']:
- lons = NX.arange(self.llcrnrlon,self.urcrnrlon+0.1,0.1).astype(NX.Float32)
+ lons = NX.arange(self.llcrnrlon,self.urcrnrlon+0.01,0.01)
else:
- lons = NX.arange(0,360.1,0.1).astype(NX.Float32)
+ lons = NX.arange(0,360.01,0.01)
# make sure latmax degree parallel is drawn if projection not merc or cyl or miller
try:
circlesl = circles.tolist()
@@ -1729,7 +1729,7 @@
# search along edges of map to see if parallels intersect.
# if so, find x,y location of intersection and draw a label there.
if self.projection == 'cyl':
- dx = 0.01; dy = 0.01
+ dx = 0.001; dy = 0.001
else:
dx = 1000; dy = 1000
if self.projection in ['moll','robin','sinu']:
@@ -1883,11 +1883,11 @@
xoffset = (self.urcrnrx-self.llcrnrx)/100.
if self.projection not in ['merc','cyl','mill','moll','robin','sinu']:
- lats = NX.arange(-latmax,latmax+0.1,0.1).astype(NX.Float32)
+ lats = NX.arange(-latmax,latmax+0.01,0.01)
else:
- lats = NX.arange(-90,90.1,0.1).astype(NX.Float32)
- xdelta = 0.1*(self.xmax-self.xmin)
- ydelta = 0.1*(self.ymax-self.ymin)
+ lats = NX.arange(-90,90.01,0.01)
+ xdelta = 0.01*(self.xmax-self.xmin)
+ ydelta = 0.01*(self.ymax-self.ymin)
for merid in meridians:
lons = merid*NX.ones(len(lats),NX.Float32)
x,y = self(lons,lats)
@@ -1941,7 +1941,7 @@
# search along edges of map to see if parallels intersect.
# if so, find x,y location of intersection and draw a label there.
if self.projection == 'cyl':
- dx = 0.01; dy = 0.01
+ dx = 0.001; dy = 0.001
else:
dx = 1000; dy = 1000
if self.projection in ['moll','sinu','robin']:
This will make drawing of meridians and parallels slower, however.
-Jeff
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
|
|
From: Pecevski D. <de...@ig...> - 2007-07-06 16:16:28
|
Hi, Is there some convenient way to setup a frame in axes which only has the bottom and left lines? I've tried some workaround solution like this: a = subplot(211) a.set_frame_on(False) a.hlines(ymin,xmin,xmax) a.vlines(xmin,ymin,ymax) Is there a more appropriate solution? thanks, Dejan |
|
From: Achim G. <Ach...@ph...> - 2007-07-06 14:13:52
|
Hi! This little prorgram (it accidentially came to my keyboard) results in a segmentation fault: # start import numpy import pylab pulsewidth=3e-6 t_array=(numpy.arange(2048, dtype=numpy.float32)-1024)*90e-9 sinc_array=numpy.array((len(t_array),),dtype=numpy.float32) sinc_array[:]=1e-6 sinc_array[numpy.abs(t_array)<(pulsewidth/2)]=1.0 # end I do not use pylab. Just remove the "import pylab" statement and the program exits without any fault. The machine is a i686 with Debian testing distribution. The version numbers are python-matplotlib 0.90.0-1 python-matplotlib-data 0.90.0-1 python-matplotlib-doc 0.90.0-1 and python-numpy 1:1.0.3-1 python-numpy-dev 1:1.0.3-1 python-numpy-doc 1:1.0.3-1 python-numpy-ext 1:1.0.3-1 Does anyone have similar problems? Yours, Achim |
|
From: Steve S. <el...@gm...> - 2007-07-06 11:40:40
|
kaushik.ghose wrote:
> m.text(0,0,'$\sum_{n=1}^{100}$');m.axis('off');m.savefig('test.svg')
>
> matplotlib renders it fine, but won't save it to svg correctly - the
> summation symbol doesn't show up.
>
> Is this a configuration issue on my part, or is svg support for latex
> currently incomplete?
AFAIK, the latex support for the SVG backend isn't fully working yet.
For rcParams['text.usetex']=True you'll get an error. With
rcParams['text.usetex']=False I get the same issue that you see (Sum
symbol missing when I open the .svg in Inkscape).
See also
http://www.mail-archive.com/mat...@li.../msg03340.html
--
cheers,
steve
Random number generation is the art of producing pure gibberish as
quickly as possible.
|
|
From: Lorenzo I. <lor...@gm...> - 2007-07-06 10:49:18
|
Dear All,
I am a bit puzzled at an unusual problem I am experiencing.
Fundamentally, I call a couple of functions and I plot some data.
First, I create a semilog plot using pylab.semilogx, then I make a
normal linear plot.
But, in the second case I get an error message:
Traceback (most recent call last):
File "./air-mean-free-path.py", line 206, in ?
pylab.plot((diam_seq*1e9),K_bis,linewidth=2.)
File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
2027, in plot
ret = gca().plot(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 2131, in plot
self.autoscale_view(scalex=scalex, scaley=scaley)
File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
985, in autoscale_view
self.set_xlim(XL)
File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
1220, in set_xlim
raise ValueError('Cannot set nonpositive limits with log transform')
ValueError: Cannot set nonpositive limits with log transform
Which seems to be dealing with a semilog plot again, but that is no
longer the case.
What is going on? I am using the pylab.hold(False) command at the end
of each plot in order not to mess everything up.
Below there is the code producing the bug. If I go, after the 1st
semilog plot, for another semilog plot, everything is fine and no
error is generated.
K_thermo=K_talbot_test(T,knudsen,Ra)
pylab.semilogx(knudsen,K_thermo,linewidth=2.)
pylab.xlabel('knudsen number',fontsize=20.)
pylab.ylabel('K_th',fontsize=20.)
pylab.title('Thermophoretic coefficient',fontsize=20.)
pylab.grid(True)
pylab.savefig('thermophoretic_coefficient')
pylab.hold(False)
diam_seq=pylab.load("diameter_sequence")
diam_seq=diam_seq/1e9
print 'the shape of diam_seq is', shape(diam_seq)
K_bis=K_talbot(T)
print 'the shape of k_bis is', shape(K_bis)
#pylab.semilogx((diam_seq*1e9),K_bis,linewidth=2.)
pylab.plot((diam_seq*1e9),K_bis,linewidth=2.)
# with the plot command I run into trouble, with semilogx everything
is fine instead.
pylab.xlabel('diameter [nm]',fontsize=20.)
pylab.ylabel('K_th',fontsize=20.)
#pylab.legend(('prey population','predator population'))
pylab.title('Thermophoretic coefficient at T=350K',fontsize=20.)
pylab.grid(True)
pylab.savefig('thermophoretic_coefficient_vs_particle_diameter')
pylab.hold(False)
Does anybody have a clue at what is going on? I am sure it must be
something quick to fix.
Many thanks
Lorenzo
|
|
From: Jesper L. <jl...@dm...> - 2007-07-06 10:25:26
|
Hi matplotlib users,
I am interested in making basemap plots covering only a small area. When I do
this the meridians and parallels (and labelling of these) look strange. I
have pasted in a simple example below showing the problem (at least on my
computer):
import pylab
from matplotlib.toolkits import basemap
bmap = basemap.Basemap(120.33, 35.95, 120.55, 36.12)
merid = [120.3, 120.35, 120.4, 120.45, 120.5, 120.55, 120.6]
paral = [35.94, 35.96, 35.98, 36.0, 36.02, 36.04, 36.06, 36.08, 36.1, 36.12,
36.14]
bmap.drawparallels(paral, labels=[1,0,0,0])
bmap.drawmeridians(merid, labels=[0,0,0,1])
pylab.savefig('test.png')
Regards,
Jesper
|
|
From: kaushik.ghose <kau...@gm...> - 2007-07-06 04:45:41
|
Hi,
When I do
m.text(0,0,'$\sum_{n=1}^{100}$');m.axis('off');m.savefig('test.svg')
matplotlib renders it fine, but won't save it to svg correctly - the
summation symbol doesn't show up.
Is this a configuration issue on my part, or is svg support for latex
currently incomplete?
I'm on win vista with python 2.5
I'm so happy that pylab exports to svg, BTW. I'm using inkscape to
annotate by graphs and then export to pdf, and this work flow is so nice!
thanks!
-Kaushik
|
|
From: John H. <jd...@gm...> - 2007-07-05 20:03:38
|
On 7/5/07, Christian Meesters <mee...@un...> wrote: > Hi, > > Is there a way to stretch letters like in this example > http://weblogo.berkeley.edu/examples.html using mpl? > I don't exactly want to reproduce sequence logos, but I would like to > 'scale' a letter arbitrarily in height, changing its color and keeping > it's width fixed. > I didn't see things like that in mpl, yet. But I thought if somebody > knows a way, I'd rather use the tool I like. No, nothing short of adding some code combining agg transformations with freetype pixel buffers which would probably require some additional extension code to support. So you will probably be better off with another tool for something like this for now. Cheers, JDH |
|
From: Jonathan G. <gri...@co...> - 2007-07-05 18:22:03
|
In message <468...@gm...>, Norbert Nemec
<Nor...@gm...> wrote
>This is the result of a change that I committed in between 0.90.0 and
>0.90.1 - sorry if it caused confusion...
>
>The idea is exactly what you observed: legend() only displays those
>lines that have an explicit label set.
>
>If a certain line in a figure does not have a label, I think it is
>rather pointless displaying it in a legend at all. I mean - the legend
>is meant to explain the individual lines and the default labels like
>"line0" can hardly be counted as "explanation".
This philosophy makes perfect sense, but it broke down for me in two
ways:
1) I am plotting 6 lines that are already associated with numbers 0
through 5, so the default labels happened to make perfect sense.
2) In this case, I use the legend not to "explain the individual lines"
but to document the line color sequence.
Obviously, this was trivial to fix now that I understand the new
behavior.
I have to say that the present behavior with no args is pretty strange:
planting a blank box on top of the middle of the plot seems worse than
useless. I personally would have preferred that it throw an exception.
>Maybe, though, there should be one additional condition:
>* If no lines or patchsets have explicit labels, display all defaults.
>* If any line or patch has an explicit label, display only the explicit
>labels.
I like this. It would avoid puzzling people who try calling legend with
no args, which would likely include people experimenting interactively
in IPython.
--
Jonathan Griffitts
AnyWare Engineering Boulder, CO, USA
|
|
From: Giorgio F. G. <gi...@gi...> - 2007-07-05 17:27:32
|
Ok, It seems that my problem with PS is not on matplotlib side but on illustrator. I am able to properly open the ps file with distiller and make a pdf out of it. The pdf will then work with illustrator too. Don't ask me why, I couldn't figure out. Another bug, though, comes with backend_pdf.py The function embedPDF in the class PdfFile has a call to encodings.cp1252.decoding_map[charcode] but decoding_map doesn't exist. There is a decoding_table[] but it doesn't contain good decimal unicode chars. That makes impossible to save PDF using the last MPL, I believe. On 7/3/07, Giorgio F. Gilestro <gi...@gi...> wrote: > I am encountering a font problem when I try to save in .PS or .EPS format. > I am using matplotlib 0.90 on windows xp but I had the very same > problem with the older version too. > > See attached output: > http://img207.imageshack.us/img207/3966/croppercapture11kg8.jpg > > Any idea? > > -- > Giorgio > gi...@gi... > http://www.cafelamarck.it > |
|
From: Christopher B. <Chr...@no...> - 2007-07-05 17:09:29
|
Nicolas wrote: > > as I plan to make a Qt version in the future) > good idea. > You mean, to use Qt instead of Wx ? No, I'm a big wx fan. What I meant was that it's a good idea to keep this functionality GUI toolkit independent. > I've found a possible solution : looks good to me. > buffer = self.get_renderer().buffer_rgba(0,0) # better > because alpha should be the last value Why is that? Is it the "native" backend_agg format? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Anthony M. F. <Ant...@co...> - 2007-07-05 16:48:41
|
Hi Paul, > I would like to be able to use matplotlib as an object canvas, where=20 > items on the canvas receive mouse events (enter, leave, press,=20 > release) and the registered callback is invoked. I do this rather extensively with the wxAgg backend and wxPython widgets. Which backend/platform are you targeting? > For example, I want to be able to highlight the line associated with=20 > the legend entry as I mouse over the legend, and conversely highlight=20 > the legend entry associated with the line as I mouse over the line. > I will also want to do operations such right clicking on the axis to=20 > modify axis properties such as linear/log scale, and click on legend=20 > entries to toggle lines on and off. These things are all do-able, but my experience has been that I've needed to modify backend_bases.py, backend_wx.py, and backend_wxagg.py in order to implement some of my own mouse events (double click, context click). Further, I capture some wx events and pass them on to my plotting canvas without using the mpl event system. As long as you translate the pick locations properly (mpl uses lower left as = x=3D0,y=3D0, where wx uses upper left) it's not too difficult. > >From looking at the pick_event_demo in examples, I have a lot of work > ahead of me. Is this the state of the art? Yes. Prior to 0.90 there was no pick_event at all, and doing picking and hit testing was much more complicated. My own code existed pre 0.90 and so I have my own pick routines which work well but might be improved by updating them to the new picker features. The problem is, of course, that they work well enough and I've got other fish to fry. There are quite a number of more experienced and more qualified people on this list that also do the things you're talking about, but as far as I know there's no "one way". Good luck, Anthony. -- Anthony Floyd, PhD Convergent Manufacturing Technologies Inc. 6190 Agronomy Rd, Suite 403 Vancouver BC V6T 1Z3 CANADA Email: Ant...@co... | Tel: 604-822-9682 WWW: http://www.convergent.ca | Fax: 604-822-9659 =20 CMT is hiring: See http://www.convergent.ca for details |
|
From: Christian M. <mee...@un...> - 2007-07-05 16:37:40
|
Hi, Is there a way to stretch letters like in this example http://weblogo.berkeley.edu/examples.html using mpl? I don't exactly want to reproduce sequence logos, but I would like to 'scale' a letter arbitrarily in height, changing its color and keeping it's width fixed. I didn't see things like that in mpl, yet. But I thought if somebody knows a way, I'd rather use the tool I like. Christian |
|
From: John H. <jd...@gm...> - 2007-07-05 15:50:03
|
On 7/5/07, Tom Denniston <tom...@al...> wrote: > Oops that was the TKAgg profile results. These are the WxAgg results > attached. Sorry about that. > > On 7/5/07, Tom Denniston <tom...@al...> wrote: > > I've been trying to profile and speed up an app that uses matplotlib. > > I tried to write an example using simple pylab commands to reproduce > > the slowness. What I found was I could get a huge speedup just > > avoiding unnecessary redraws. I'm down now to passable behavior. > > Plotting 6 series in two windows takes about one and a quarter > > seconds. I would like to improve this further, however, if it is > > possible which is why I am posting. What is your hold state? In your test function you may want to make sure you are not repeatedly adding data to the same figure. Eg p1.plot(something, hold=False) repeated calls to plot where hold is True can cause significant slowing... In mpl hold is True by default and in matlab it is False by default but you can set the default as an Axes property or in your rc file. JDH |
|
From: Tom D. <tom...@al...> - 2007-07-05 15:25:25
|
Oops that was the TKAgg profile results. These are the WxAgg results
attached. Sorry about that.
On 7/5/07, Tom Denniston <tom...@al...> wrote:
> I've been trying to profile and speed up an app that uses matplotlib.
> I tried to write an example using simple pylab commands to reproduce
> the slowness. What I found was I could get a huge speedup just
> avoiding unnecessary redraws. I'm down now to passable behavior.
> Plotting 6 series in two windows takes about one and a quarter
> seconds. I would like to improve this further, however, if it is
> possible which is why I am posting.
>
> The results with show() in between plots are:
>
> In [5]: run u:/tdennist/test2.py
> 10.128132637
>
> In [6]: run u:/tdennist/test2.py
> 10.3122053602
>
> And without the superfluous draws:
>
>
> In [7]: run u:/tdennist/test2.py
> 1.83904865901
>
> In [8]: run u:/tdennist/test2.py
> 1.86751011294
>
> In [9]: run u:/tdennist/test2.py
> 1.84959890227
>
>
> Where 1.85 seconds is the time to do 2 iteractions of drawing 2 plots
> with 3 lines each. So about 0.9 to 1.0 sec to draw the plots once.
>
> Is there anything obvious I can do to speed this up? I looked a
> profile results of this and found most of the time is spent in "draw"
> functions. I attached the profile results in kcachegrind format for
> the faster method.
>
> Under the animation section there is a suggestion that things are
> faster if you pre allocate the line and then just update it's x or y
> data. Given the profile results, however, I don't think this would
> help much and it would be kinda inconvenient for my app because I
> don't know how many series I am gonna plot up front.
>
> Also at the very bottom is the contents of my rc params. I am using
> WxAgg on windows with matplotlib 0.90.1 and python 2.5.
>
>
>
> Code
> -------
>
>
> import timeit
>
> setup='''
> import matplotlib
> matplotlib.use('WXAgg')
> from matplotlib.widgets import Cursor
> import pylab, numpy
> pylab.clf()
> #pylab.show()
> '''
> code='''
> fig = pylab.gcf()
> p1 = fig.add_axes([0.075, 0.05, 0.8, .4], axisbg='#333333')
> cursor = Cursor(p1, useblit=True, color='green', linewidth=2.5 )
> p2 = fig.add_axes([0.075, 0.55, 0.8, .4], axisbg='#333333')
> def test(n):
> for i in range(3):
> p1.plot(numpy.random.rand(n))
> #pylab.show()
>
> for i in range(3):
> p2.plot(numpy.random.rand(n))
> #pylab.show()
>
>
> test(1000)
> pylab.show()
> '''
>
> print timeit.Timer(code, setup=setup).timeit(2)
>
>
>
> rc Params
> ----------------
>
> figure.subplot.right 0.9
> mathtext.cal cmsy10.ttf
> font.fantasy fantasy
> xtick.minor.pad 3
> tk.pythoninspect False
> legend.labelsep 0.005
> image.aspect equal
> font.cursive cursive
> figure.subplot.hspace 0.2
> xtick.direction in
> axes.facecolor w
> ytick.direction in
> legend.pad 0.2
> axes.axisbelow False
> lines.markersize 6
> figure.dpi 80
> text.usetex False
> text.fontangle normal
> patch.edgecolor k
> ps.useafm False
> lines.solid_joinstyle miter
> font.monospace monospace
> xtick.minor.size 2
> figure.subplot.wspace 0.2
> savefig.edgecolor w
> text.fontvariant normal
> image.cmap jet
> axes.edgecolor k
> tk.window_focus False
> text.fontsize medium
> font.serif serif
> savefig.facecolor w
> ytick.minor.size 2
> mathtext.mathtext2 False
> numerix numpy
> font.stretch normal
> text.dvipnghack False
> ytick.color k
> lines.linestyle -
> xtick.color k
> xtick.major.pad 3
> text.fontweight normal
> patch.facecolor b
> figure.figsize (8, 6)
> axes.linewidth 1.0
> lines.linewidth 0.5
> savefig.dpi 150
> verbose.fileo sys.stdout
> svg.image_noscale False
> font.size 12.0
> lines.antialiased True
> polaraxes.grid True
> toolbar toolbar2
> pdf.compression 6
> grid.linewidth 0.5
> figure.facecolor 0.75
> ps.usedistiller False
> legend.isaxes True
> figure.edgecolor w
> mathtext.tt cmtt10.ttf
> contour.negative_linestyle (6.0, 6.0)
> image.interpolation bilinear
> lines.markeredgewidth 0.5
> legend.axespad 0.02
> lines.marker None
> lines.solid_capstyle projecting
> axes.titlesize large
> backend TkAgg
> xtick.major.size 5
> legend.fontsize small
> legend.shadow False
> mathtext.it cmmi10.ttf
> font.variant normal
> xtick.labelsize small
> legend.handletextsep 0.02
> ps.distiller.res 6000
> patch.linewidth 0.5
> lines.dash_capstyle butt
> lines.color b
> figure.subplot.top 0.9
> legend.markerscale 0.6
> patch.antialiased True
> font.style normal
> grid.linestyle :
> axes.labelcolor k
> text.color k
> mathtext.rm cmr10.ttf
> interactive True
> savefig.orientation portait
> svg.image_inline True
> ytick.major.size 5
> axes.grid False
> plugins.directory .matplotlib_plugins
> grid.color k
> timezone UTC
> ytick.major.pad 3
> legend.handlelen 0.05
> lines.dash_joinstyle miter
> datapath c:\local\python25\lib\site-packages\matplotlib-0.87.7-py2.5-win32.egg\matplotlib\mpl-data
> image.lut 256
> figure.subplot.bottom 0.1
> legend.numpoints 4
> font.sans-serif sans-serif
> font.family serif
> axes.labelsize medium
> ytick.minor.pad 3
> axes.hold True
> verbose.level silent
> mathtext.nonascii cmex10.ttf
> figure.subplot.left 0.125
> text.fontstyle normal
> font.weight normal
> mathtext.mit cmmi10.ttf
> ytick.labelsize small
> ps.papersize letter
> ima
> ge.origin upper
>
>
|
|
From: Tom D. <tom...@al...> - 2007-07-05 15:22:51
|
I've been trying to profile and speed up an app that uses matplotlib.
I tried to write an example using simple pylab commands to reproduce
the slowness. What I found was I could get a huge speedup just
avoiding unnecessary redraws. I'm down now to passable behavior.
Plotting 6 series in two windows takes about one and a quarter
seconds. I would like to improve this further, however, if it is
possible which is why I am posting.
The results with show() in between plots are:
In [5]: run u:/tdennist/test2.py
10.128132637
In [6]: run u:/tdennist/test2.py
10.3122053602
And without the superfluous draws:
In [7]: run u:/tdennist/test2.py
1.83904865901
In [8]: run u:/tdennist/test2.py
1.86751011294
In [9]: run u:/tdennist/test2.py
1.84959890227
Where 1.85 seconds is the time to do 2 iteractions of drawing 2 plots
with 3 lines each. So about 0.9 to 1.0 sec to draw the plots once.
Is there anything obvious I can do to speed this up? I looked a
profile results of this and found most of the time is spent in "draw"
functions. I attached the profile results in kcachegrind format for
the faster method.
Under the animation section there is a suggestion that things are
faster if you pre allocate the line and then just update it's x or y
data. Given the profile results, however, I don't think this would
help much and it would be kinda inconvenient for my app because I
don't know how many series I am gonna plot up front.
Also at the very bottom is the contents of my rc params. I am using
WxAgg on windows with matplotlib 0.90.1 and python 2.5.
Code
-------
import timeit
setup='''
import matplotlib
matplotlib.use('WXAgg')
from matplotlib.widgets import Cursor
import pylab, numpy
pylab.clf()
#pylab.show()
'''
code='''
fig = pylab.gcf()
p1 = fig.add_axes([0.075, 0.05, 0.8, .4], axisbg='#333333')
cursor = Cursor(p1, useblit=True, color='green', linewidth=2.5 )
p2 = fig.add_axes([0.075, 0.55, 0.8, .4], axisbg='#333333')
def test(n):
for i in range(3):
p1.plot(numpy.random.rand(n))
#pylab.show()
for i in range(3):
p2.plot(numpy.random.rand(n))
#pylab.show()
test(1000)
pylab.show()
'''
print timeit.Timer(code, setup=setup).timeit(2)
rc Params
----------------
figure.subplot.right 0.9
mathtext.cal cmsy10.ttf
font.fantasy fantasy
xtick.minor.pad 3
tk.pythoninspect False
legend.labelsep 0.005
image.aspect equal
font.cursive cursive
figure.subplot.hspace 0.2
xtick.direction in
axes.facecolor w
ytick.direction in
legend.pad 0.2
axes.axisbelow False
lines.markersize 6
figure.dpi 80
text.usetex False
text.fontangle normal
patch.edgecolor k
ps.useafm False
lines.solid_joinstyle miter
font.monospace monospace
xtick.minor.size 2
figure.subplot.wspace 0.2
savefig.edgecolor w
text.fontvariant normal
image.cmap jet
axes.edgecolor k
tk.window_focus False
text.fontsize medium
font.serif serif
savefig.facecolor w
ytick.minor.size 2
mathtext.mathtext2 False
numerix numpy
font.stretch normal
text.dvipnghack False
ytick.color k
lines.linestyle -
xtick.color k
xtick.major.pad 3
text.fontweight normal
patch.facecolor b
figure.figsize (8, 6)
axes.linewidth 1.0
lines.linewidth 0.5
savefig.dpi 150
verbose.fileo sys.stdout
svg.image_noscale False
font.size 12.0
lines.antialiased True
polaraxes.grid True
toolbar toolbar2
pdf.compression 6
grid.linewidth 0.5
figure.facecolor 0.75
ps.usedistiller False
legend.isaxes True
figure.edgecolor w
mathtext.tt cmtt10.ttf
contour.negative_linestyle (6.0, 6.0)
image.interpolation bilinear
lines.markeredgewidth 0.5
legend.axespad 0.02
lines.marker None
lines.solid_capstyle projecting
axes.titlesize large
backend TkAgg
xtick.major.size 5
legend.fontsize small
legend.shadow False
mathtext.it cmmi10.ttf
font.variant normal
xtick.labelsize small
legend.handletextsep 0.02
ps.distiller.res 6000
patch.linewidth 0.5
lines.dash_capstyle butt
lines.color b
figure.subplot.top 0.9
legend.markerscale 0.6
patch.antialiased True
font.style normal
grid.linestyle :
axes.labelcolor k
text.color k
mathtext.rm cmr10.ttf
interactive True
savefig.orientation portait
svg.image_inline True
ytick.major.size 5
axes.grid False
plugins.directory .matplotlib_plugins
grid.color k
timezone UTC
ytick.major.pad 3
legend.handlelen 0.05
lines.dash_joinstyle miter
datapath c:\local\python25\lib\site-packages\matplotlib-0.87.7-py2.5-win32.egg\matplotlib\mpl-data
image.lut 256
figure.subplot.bottom 0.1
legend.numpoints 4
font.sans-serif sans-serif
font.family serif
axes.labelsize medium
ytick.minor.pad 3
axes.hold True
verbose.level silent
mathtext.nonascii cmex10.ttf
figure.subplot.left 0.125
text.fontstyle normal
font.weight normal
mathtext.mit cmmi10.ttf
ytick.labelsize small
ps.papersize letter
ima
ge.origin upper
|
|
From: John H. <jd...@gm...> - 2007-07-05 13:25:46
|
On 7/5/07, Norbert Nemec <Nor...@gm...> wrote: > Sorry, I notice that there may be need for an additional explanation: > > What I call "explicit label" is one that is given as kwarg to the plot > command like > > plot(x,sin(x),label="sin(x)") This works for me in svn. I also think Norbert's idea of suppressing an auto-legend entry when there is no label is a good one. It is more elegant and pithy than the '_nolegend_' approach, though a bit less explicit. JDH |
|
From: Norbert N. <Nor...@gm...> - 2007-07-05 13:10:19
|
Sorry, I notice that there may be need for an additional explanation:
What I call "explicit label" is one that is given as kwarg to the plot
command like
plot(x,sin(x),label="sin(x)")
My standard use of legends is to give such an explicit label to every
significant line and call legend() without arguments at the end. This
approach is much more comfortable than using arguments to legend itself,
as you do not need to keep track of handles and labels with every change
that you make in the plotting script.
Greetings,
Norbert
Norbert Nemec wrote:
> This is the result of a change that I committed in between 0.90.0 and
> 0.90.1 - sorry if it caused confusion...
>
> The idea is exactly what you observed: legend() only displays those
> lines that have an explicit label set.
>
> If a certain line in a figure does not have a label, I think it is
> rather pointless displaying it in a legend at all. I mean - the legend
> is meant to explain the individual lines and the default labels like
> "line0" can hardly be counted as "explanation".
>
> Maybe, though, there should be one additional condition:
> * If no lines or patchsets have explicit labels, display all defaults.
> * If any line or patch has an explicit label, display only the explicit
> labels.
>
> This would probably avoid confusion about a completely empty legend.
> What do you think?
>
> Greetings,
> Norbert
>
>
>
>
> Jonathan Griffitts wrote:
>
>> In matplotlib 0.90.1 the behavior of legend() seems to have changed.
>>
>> Here's a test code fragment:
>> ---------------------------
>> import pylab
>> import numpy
>>
>> y=numpy.arange(-10,10)**2
>> print y
>> pylab.plot(y)
>> pylab.legend()
>> pylab.show()
>> ---------------------------
>> Running on python 2.5.1, matplotlib 0.90.0 gives me a reasonable-looking
>> legend in upper right corner with label "line0".
>>
>> matplotlib 0.90.1 gives an empty rectangular box, fairly large, right in
>> the middle of the plot.
>>
>> Attempting to move the legend with loc=2 or whatever has no effect.
>> However, giving an explicit label ( pylab.legend(['line1']) ) makes it
>> start working the same as 0.90.0.
>>
>> I started looking at the source but don't have time today to understand
>> how this is supposed to work. Maybe later.
>>
>>
>>
>> Is this the intended behavior? The announcement for 0.90.1 says:
>> "Display only meaningful labels when calling legend() without args."
>> It's not clear to me what this means.
>>
>>
>>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Norbert N. <Nor...@gm...> - 2007-07-05 13:02:32
|
This is the result of a change that I committed in between 0.90.0 and 0.90.1 - sorry if it caused confusion... The idea is exactly what you observed: legend() only displays those lines that have an explicit label set. If a certain line in a figure does not have a label, I think it is rather pointless displaying it in a legend at all. I mean - the legend is meant to explain the individual lines and the default labels like "line0" can hardly be counted as "explanation". Maybe, though, there should be one additional condition: * If no lines or patchsets have explicit labels, display all defaults. * If any line or patch has an explicit label, display only the explicit labels. This would probably avoid confusion about a completely empty legend. What do you think? Greetings, Norbert Jonathan Griffitts wrote: > In matplotlib 0.90.1 the behavior of legend() seems to have changed. > > Here's a test code fragment: > --------------------------- > import pylab > import numpy > > y=numpy.arange(-10,10)**2 > print y > pylab.plot(y) > pylab.legend() > pylab.show() > --------------------------- > Running on python 2.5.1, matplotlib 0.90.0 gives me a reasonable-looking > legend in upper right corner with label "line0". > > matplotlib 0.90.1 gives an empty rectangular box, fairly large, right in > the middle of the plot. > > Attempting to move the legend with loc=2 or whatever has no effect. > However, giving an explicit label ( pylab.legend(['line1']) ) makes it > start working the same as 0.90.0. > > I started looking at the source but don't have time today to understand > how this is supposed to work. Maybe later. > > > > Is this the intended behavior? The announcement for 0.90.1 says: > "Display only meaningful labels when calling legend() without args." > It's not clear to me what this means. > > |
|
From: Edin S. <edi...@gm...> - 2007-07-05 09:35:44
|
Hi Nils, It seems there's a problem with some of the text instances (label, title etc.) that have TeX expressions in them. You can also attach the problematic script (or part of it) here. Best, Edin On 7/5/07, Nils Wagner <nw...@ia...> wrote: > Hi all, > > I rerun a program which I have written one year ago. > Now It doesn't work for me with the latest svn version. > Here is the output > python lshape.py --verbose-helpful > $HOME=/home/nwagner > CONFIGDIR=/home/nwagner/.matplotlib > matplotlib data path /usr/lib64/python2.4/site-packages/matplotlib/mpl-data > loaded rc file /home/nwagner/.matplotlib/matplotlibrc > matplotlib version 0.90.1 > verbose.level helpful > interactive is False > units is False > platform is linux2 > numerix numpy 1.0.4.dev3880 > font search path > ['/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf', > '/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/afm'] > loaded ttfcache file /home/nwagner/.matplotlib/ttffont.cache > backend WXAgg version 2.6.1.0 > Traceback (most recent call last): > File "lshape.py", line 136, in ? > show() > File > "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_wx.py", > line 1246, in show > figwin.canvas.draw() > File > "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_wxagg.py", > line 61, in draw > FigureCanvasAgg.draw(self) > File > "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py", > line 392, in draw > self.figure.draw(renderer) > File "/usr/lib64/python2.4/site-packages/matplotlib/figure.py", line > 601, in draw > for a in self.axes: a.draw(renderer) > File "/usr/lib64/python2.4/site-packages/matplotlib/axes.py", line > 1356, in draw > a.draw(renderer) > File "/usr/lib64/python2.4/site-packages/matplotlib/axis.py", line > 635, in draw > self.label.draw(renderer) > File "/usr/lib64/python2.4/site-packages/matplotlib/text.py", line > 410, in draw > bbox, info = self._get_layout(renderer) > File "/usr/lib64/python2.4/site-packages/matplotlib/text.py", line > 254, in _get_layout > w,h = renderer.get_text_width_height( > File > "/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py", > line 245, in get_text_width_height > width, height, fonts = math_parse_s_ft2font( > File "/usr/lib64/python2.4/site-packages/matplotlib/mathtext.py", line > 1585, in __call__ > expression.parseString( s ) > File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py", > line 622, in parseString > loc, tokens = self.parse( instring.expandtabs(), 0 ) > File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py", > line 564, in parse > loc,tokens = self.parseImpl( instring, loc, doActions ) > File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py", > line 1863, in parseImpl > loc, tokens = self.expr.parse( instring, loc, doActions ) > File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py", > line 564, in parse > loc,tokens = self.parseImpl( instring, loc, doActions ) > File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py", > line 1548, in parseImpl > raise maxException > matplotlib.pyparsing.ParseException: Expected "\" (at char 0), (line:1, > col:1) > > Any pointer would be appreciated. > > Nils > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Nils W. <nw...@ia...> - 2007-07-05 08:56:26
|
Hi all,
I rerun a program which I have written one year ago.
Now It doesn't work for me with the latest svn version.
Here is the output
python lshape.py --verbose-helpful
$HOME=/home/nwagner
CONFIGDIR=/home/nwagner/.matplotlib
matplotlib data path /usr/lib64/python2.4/site-packages/matplotlib/mpl-data
loaded rc file /home/nwagner/.matplotlib/matplotlibrc
matplotlib version 0.90.1
verbose.level helpful
interactive is False
units is False
platform is linux2
numerix numpy 1.0.4.dev3880
font search path
['/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf',
'/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/afm']
loaded ttfcache file /home/nwagner/.matplotlib/ttffont.cache
backend WXAgg version 2.6.1.0
Traceback (most recent call last):
File "lshape.py", line 136, in ?
show()
File
"/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_wx.py",
line 1246, in show
figwin.canvas.draw()
File
"/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_wxagg.py",
line 61, in draw
FigureCanvasAgg.draw(self)
File
"/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 392, in draw
self.figure.draw(renderer)
File "/usr/lib64/python2.4/site-packages/matplotlib/figure.py", line
601, in draw
for a in self.axes: a.draw(renderer)
File "/usr/lib64/python2.4/site-packages/matplotlib/axes.py", line
1356, in draw
a.draw(renderer)
File "/usr/lib64/python2.4/site-packages/matplotlib/axis.py", line
635, in draw
self.label.draw(renderer)
File "/usr/lib64/python2.4/site-packages/matplotlib/text.py", line
410, in draw
bbox, info = self._get_layout(renderer)
File "/usr/lib64/python2.4/site-packages/matplotlib/text.py", line
254, in _get_layout
w,h = renderer.get_text_width_height(
File
"/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 245, in get_text_width_height
width, height, fonts = math_parse_s_ft2font(
File "/usr/lib64/python2.4/site-packages/matplotlib/mathtext.py", line
1585, in __call__
expression.parseString( s )
File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py",
line 622, in parseString
loc, tokens = self.parse( instring.expandtabs(), 0 )
File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py",
line 564, in parse
loc,tokens = self.parseImpl( instring, loc, doActions )
File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py",
line 1863, in parseImpl
loc, tokens = self.expr.parse( instring, loc, doActions )
File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py",
line 564, in parse
loc,tokens = self.parseImpl( instring, loc, doActions )
File "/usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py",
line 1548, in parseImpl
raise maxException
matplotlib.pyparsing.ParseException: Expected "\" (at char 0), (line:1,
col:1)
Any pointer would be appreciated.
Nils
|
|
From: Benoit D. <Ben...@uc...> - 2007-07-05 07:53:22
|
Eric, > Regarding your modification of linewidth, do you think this really =20 > needs to be yet another kwarg, That's what I did (I'm not a Python expert). IMHO, this is more =20 consistent with the existing methods (such as plot() or errorbar() ). > or is it adequate to be able to adjust the linewidth with a line of =20= > user code after calling boxplot? The method returns a dictionary =20 > with the various lists of line objects that have been drawn, so any =20= > properties of those objects can be altered. I didn't think to change properties of returned objects Benoit > > Perhaps a more thorough updating of boxplot would use collections =20 > instead of lists of lines. Any volunteers? I am not going to do =20 > it. This would speed it up for cases with many points, but maybe =20 > boxplot is normally used with few enough points that this doesn't =20 > matter. > > Eric > > Benoit Donnet wrote: >> Guys, >>> Is it possible >>> to increase the linewidth of the box plot (and change the color - >>> i.e., from blue to black)? In the documentation, I don't see any >>> option for boxplot regarding that point (the "widths" option refers >>> to the width of the box, not the line). >> Looking in the matplotlib-devel mailing-list, I found a brand new =20= >> version of the boxplot method (written by Rob Clewley). This =20 >> method allows me to have a monochrome plot. This is quite better. >> I then modified Rob's code for getting linewidth (that's 100% =20 >> hacking - I'm not proud of it). >> Sorry for the disturbance. >> Benoit >>> I agree it is a cosmetic question but I think it would be better =20 >>> in a >>> paper if I can change the linewidth and color. >>> >>> Thanks in advance. >>> >>> Keep on rockin' >>> >>> Benoit >>> >>> Le 03-juil.-07 =E0 19:52, Jeff Whitaker a =E9crit : >>> >>>> Benoit Donnet wrote: >>>>> Hey guys, >>>>> >>>>> I'm trying to plot quantiles information (percentile 10, 25, 50, >>>>> 75 and 90). Attached, you'll find a jpged of what I would like to >>>>> do (this was done using Gnuplot): the vertical line delineates the >>>>> range from the 10th to the 90th percentile. Small tick bars to >>>>> either side of the lines mark some additional percentiles: bar to >>>>> the left for the 25th and bar to the right for the 75th. Finally, >>>>> dots mark the median. >>>>> >>>>> I attempted to use matplotlib.finance modules. In particular, the >>>>> candlestick stuffs are quite close to what I want. But it didn't >>>>> work as the X-Axis does not correspond to a date information (X- >>>>> Axis values are within the range [1:1780]). >>>>> >>>>> Have you got an idea on how I can plot that using matplotlib? >>>>> >>>>> Thanks in advance. >>>>> >>>>> Keep on rockin' >>>>> >>>>> Benoit >>>>> >>>> Benoit: This looks very similar to what the boxplot function does >>>> (see http://matplotlib.sourceforge.net/matplotlib.pylab.html#- >>>> boxplot and boxplot_demo.py). If you want to tweak it, the boxplot >>>> function in axes.py might be a good starting point. >>>> >>>> -Jeff >>>> >>>> --=20 >>>> Jeffrey S. Whitaker Phone : (303)497-6313 >>>> Meteorologist FAX : (303)497-6449 >>>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no... >>>> 325 Broadway Office : Skaggs Research Cntr 1D-124 >>>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg >>>> >>> -- >>> Dr. Benoit Donnet >>> Universit=E9 Catholique de Louvain (UCL) >>> Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie >>> Informatique (INGI) >>> Place Sainte Barbe, 2 >>> 1348 Louvain-la-Neuve >>> Belgium >>> Phone: +32 10 47 87 18 >>> Home page: http://inl.info.ucl.ac.be/donnet >>> >>> >>> >>> >>> --------------------------------------------------------------------=20= >>> -- --- >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> -- >> Dr. Benoit Donnet >> Universit=E9 Catholique de Louvain (UCL) >> Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie =20= >> Informatique (INGI) >> Place Sainte Barbe, 2 >> 1348 Louvain-la-Neuve >> Belgium >> Phone: +32 10 47 87 18 >> Home page: http://inl.info.ucl.ac.be/donnet >> ---------------------------------------------------------------------=20= >> ---- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Dr. Benoit Donnet Universit=E9 Catholique de Louvain (UCL) Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie =20 Informatique (INGI) Place Sainte Barbe, 2 1348 Louvain-la-Neuve Belgium Phone: +32 10 47 87 18 Home page: http://inl.info.ucl.ac.be/donnet |
|
From: Eric F. <ef...@ha...> - 2007-07-04 17:45:53
|
Benoit, Thanks for pointing this out. I am not a boxplot-user, but a quick look together with your post and Rob's suggests to me that some version of Rob's enhancements should be committed to svn. I think it might be possible to simplify the argument list; a bit of code review would be good. Regarding your modification of linewidth, do you think this really needs to be yet another kwarg, or is it adequate to be able to adjust the linewidth with a line of user code after calling boxplot? The method returns a dictionary with the various lists of line objects that have been drawn, so any properties of those objects can be altered. Perhaps a more thorough updating of boxplot would use collections instead of lists of lines. Any volunteers? I am not going to do it. This would speed it up for cases with many points, but maybe boxplot is normally used with few enough points that this doesn't matter. Eric Benoit Donnet wrote: > Guys, > >> Is it possible >> to increase the linewidth of the box plot (and change the color - >> i.e., from blue to black)? In the documentation, I don't see any >> option for boxplot regarding that point (the "widths" option refers >> to the width of the box, not the line). > > Looking in the matplotlib-devel mailing-list, I found a brand new > version of the boxplot method (written by Rob Clewley). This method > allows me to have a monochrome plot. This is quite better. > > I then modified Rob's code for getting linewidth (that's 100% hacking > - I'm not proud of it). > > Sorry for the disturbance. > > Benoit > >> I agree it is a cosmetic question but I think it would be better in a >> paper if I can change the linewidth and color. >> >> Thanks in advance. >> >> Keep on rockin' >> >> Benoit >> >> Le 03-juil.-07 à 19:52, Jeff Whitaker a écrit : >> >>> Benoit Donnet wrote: >>>> Hey guys, >>>> >>>> I'm trying to plot quantiles information (percentile 10, 25, 50, >>>> 75 and 90). Attached, you'll find a jpged of what I would like to >>>> do (this was done using Gnuplot): the vertical line delineates the >>>> range from the 10th to the 90th percentile. Small tick bars to >>>> either side of the lines mark some additional percentiles: bar to >>>> the left for the 25th and bar to the right for the 75th. Finally, >>>> dots mark the median. >>>> >>>> I attempted to use matplotlib.finance modules. In particular, the >>>> candlestick stuffs are quite close to what I want. But it didn't >>>> work as the X-Axis does not correspond to a date information (X- >>>> Axis values are within the range [1:1780]). >>>> >>>> Have you got an idea on how I can plot that using matplotlib? >>>> >>>> Thanks in advance. >>>> >>>> Keep on rockin' >>>> >>>> Benoit >>>> >>> Benoit: This looks very similar to what the boxplot function does >>> (see http://matplotlib.sourceforge.net/matplotlib.pylab.html#- >>> boxplot and boxplot_demo.py). If you want to tweak it, the boxplot >>> function in axes.py might be a good starting point. >>> >>> -Jeff >>> >>> -- >>> Jeffrey S. Whitaker Phone : (303)497-6313 >>> Meteorologist FAX : (303)497-6449 >>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no... >>> 325 Broadway Office : Skaggs Research Cntr 1D-124 >>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg >>> >> -- >> Dr. Benoit Donnet >> Université Catholique de Louvain (UCL) >> Faculté des Sciences Appliquées - Département d'Ingénierie >> Informatique (INGI) >> Place Sainte Barbe, 2 >> 1348 Louvain-la-Neuve >> Belgium >> Phone: +32 10 47 87 18 >> Home page: http://inl.info.ucl.ac.be/donnet >> >> >> >> >> ---------------------------------------------------------------------- >> --- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- > Dr. Benoit Donnet > Université Catholique de Louvain (UCL) > Faculté des Sciences Appliquées - Département d'Ingénierie > Informatique (INGI) > Place Sainte Barbe, 2 > 1348 Louvain-la-Neuve > Belgium > Phone: +32 10 47 87 18 > Home page: http://inl.info.ucl.ac.be/donnet > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Benoit D. <ben...@uc...> - 2007-07-04 13:52:41
|
Guys, > Is it possible > to increase the linewidth of the box plot (and change the color - > i.e., from blue to black)? In the documentation, I don't see any > option for boxplot regarding that point (the "widths" option refers > to the width of the box, not the line). Looking in the matplotlib-devel mailing-list, I found a brand new =20 version of the boxplot method (written by Rob Clewley). This method =20 allows me to have a monochrome plot. This is quite better. I then modified Rob's code for getting linewidth (that's 100% hacking =20= - I'm not proud of it). Sorry for the disturbance. Benoit > I agree it is a cosmetic question but I think it would be better in a > paper if I can change the linewidth and color. > > Thanks in advance. > > Keep on rockin' > > Benoit > > Le 03-juil.-07 =E0 19:52, Jeff Whitaker a =E9crit : > >> Benoit Donnet wrote: >>> Hey guys, >>> >>> I'm trying to plot quantiles information (percentile 10, 25, 50, >>> 75 and 90). Attached, you'll find a jpged of what I would like to >>> do (this was done using Gnuplot): the vertical line delineates the >>> range from the 10th to the 90th percentile. Small tick bars to >>> either side of the lines mark some additional percentiles: bar to >>> the left for the 25th and bar to the right for the 75th. Finally, >>> dots mark the median. >>> >>> I attempted to use matplotlib.finance modules. In particular, the >>> candlestick stuffs are quite close to what I want. But it didn't >>> work as the X-Axis does not correspond to a date information (X- >>> Axis values are within the range [1:1780]). >>> >>> Have you got an idea on how I can plot that using matplotlib? >>> >>> Thanks in advance. >>> >>> Keep on rockin' >>> >>> Benoit >>> >> >> Benoit: This looks very similar to what the boxplot function does >> (see http://matplotlib.sourceforge.net/matplotlib.pylab.html#- >> boxplot and boxplot_demo.py). If you want to tweak it, the boxplot >> function in axes.py might be a good starting point. >> >> -Jeff >> >> --=20 >> Jeffrey S. Whitaker Phone : (303)497-6313 >> Meteorologist FAX : (303)497-6449 >> NOAA/OAR/PSD R/PSD1 Email : Jef...@no... >> 325 Broadway Office : Skaggs Research Cntr 1D-124 >> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg >> > > -- > Dr. Benoit Donnet > Universit=E9 Catholique de Louvain (UCL) > Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie > Informatique (INGI) > Place Sainte Barbe, 2 > 1348 Louvain-la-Neuve > Belgium > Phone: +32 10 47 87 18 > Home page: http://inl.info.ucl.ac.be/donnet > > > > > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Dr. Benoit Donnet Universit=E9 Catholique de Louvain (UCL) Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie =20 Informatique (INGI) Place Sainte Barbe, 2 1348 Louvain-la-Neuve Belgium Phone: +32 10 47 87 18 Home page: http://inl.info.ucl.ac.be/donnet |