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
(13) |
2
(11) |
3
|
4
(9) |
|
5
(3) |
6
(17) |
7
(24) |
8
(11) |
9
(26) |
10
(19) |
11
(4) |
|
12
(4) |
13
(14) |
14
(9) |
15
(5) |
16
(18) |
17
(23) |
18
(3) |
|
19
(1) |
20
(7) |
21
(27) |
22
(26) |
23
(6) |
24
(17) |
25
(1) |
|
26
|
27
(7) |
28
(1) |
29
(4) |
30
(5) |
|
|
|
From: Russell E. O. <ro...@ce...> - 2006-11-07 23:44:13
|
On Feb 25 Samuel Smith reported that WXAgg crashed on MacOS X using matplotlib 0.87. I just built matplotlib 0.87.7 on Python 2.5 and am still having the problem. Christopher Barker suggested disabling acceleration: import matplotlib.backends.backend_wxagg matplotlib.backends.backend_wxagg._use_accelerator(False) and that does work, but I was wondering if a fix was known? Google only turned up the problem, not a solution. Regards, -- Russell P.S. here are the gory details: Configuration: - PowerBook G4 - MacOS X 10.4.7 - Python 2.5 (from the python main site) - wxPython 2.7.1.3 (from <http://pythonmac.org/packages/py25-fat/index.html>) - numpy 1.0, numarray 1.5.1 and Numeric 24.2 (all from source) - matplotlib 0.87.7 (from source) TkAgg works fine, but WXAgg fails (using numarray or numeric as numerix) when I try to plot as follows: >>> from pylab import * >>> show() Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/matplotlib/backends/backend_wx.py", line 1048, in _onPaint self.draw(repaint=False) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/matplotlib/backends/backend_wxagg.py", line 63, in draw self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None) MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create the wx.Bitmap Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/matplotlib/backends/backend_wx.py", line 1193, in show figwin.canvas.draw() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac kages/matplotlib/backends/backend_wxagg.py", line 63, in draw self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None) MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create the wx.Bitmap |
|
From: John H. <jdh...@ac...> - 2006-11-07 16:28:55
|
>>>>> "Jose" == Jose Gomez-Dans <jgo...@gm...> writes:
Jose> Hi! We are tryint to access time data stored in an SQL The
Jose> query returns a date object of type DbiDate. When printed,
Jose> we get a nicely formatted text date. If cast into a float or
Jose> int, you get the number of seconds elapsed since
Jose> 1/1/1970. The way we are dealing with the conversion from
Jose> this format into MPL format is:through time.strptime (using
Jose> a format string), then converting that into a datetime
Jose> object, and finally invoking MPL's date2num.
Jose> Is there a better, quicker more obvious way to accomplish
Jose> this?
Seconds since 1/1/1970 is often called "seconds since the epoch" and
mpl provides a conversion routine for dates in this form
from matplotlib.dates import epoch2num
e = int(mydate) # convert your date to seconds since epoch
d = epoch2num(e) # a mpl datenum
epoch2num also works over arrays or sequences of epochs.
JDH
|
|
From: Jose Gomez-D. <jgo...@gm...> - 2006-11-07 16:25:55
|
Hi! We are tryint to access time data stored in an SQL The query returns a date object of type DbiDate. When printed, we get a nicely formatted text date. If cast into a float or int, you get the number of seconds elapsed since 1/1/1970. The way we are dealing with the conversion from this format into MPL format is:through time.strptime (using a format string), then converting that into a datetime object, and finally invoking MPL's date2num. Is there a better, quicker more obvious way to accomplish this? Thanks! Jose |
|
From: John H. <jdh...@ac...> - 2006-11-07 16:19:58
|
>>>>> "Ryan" == Ryan Krauss <rya...@gm...> writes:
Ryan> You have two options. savefig does have a dpi option that
Ryan> will essentially set the figure size for the saved file:
Ryan> savefig('myfile.png',dpi=300)
Ryan> play with dpi until you get a figure size you like.
Ryan> The other way to set the figure size is to specify it when
Ryan> you create the figure: figure(1,(10,8)) would create a
Ryan> fairly large figure. The figure (1 in this case) must not
Ryan> already exist or at least it can't be shown on your screen
Ryan> already. By that I mean if you have already called
Ryan> figure(1) previously in your code, you must close it before
Ryan> you try to call figure(1,(10,8)) or the figure size won't be
Ryan> affected.
Just to elaborate a bit. The figure size in pixels is the figure size
in inches * the dpi. you can set the figure size in inches when you
create it
fig = figure(figsize=(6,8)) # 6x8 inches
and when you save it set the dpi
fig.savefig('somefile.png', dpi=200)
and you will have a 1200x1600 pixel PNG file.
JDH
|
|
From: John H. <jdh...@ac...> - 2006-11-07 16:17:30
|
>>>>> "Etrade" == Etrade Griffiths <etr...@ds...> writes:
Etrade> Sorry, another really basic matplotlib question ... how do
Etrade> I set the font family of the axis tick labels? I am using
Etrade> wxPython/wxMpl and not the pylab interface so am trying to
Etrade> avoid getp/setp. I could do this using matplotlib.rc but
Etrade> want to do it programatically
Etrade> I tried
Etrade> fig=self.get_figure() ax1=fig.gca() ax1.plot(x,y)
Etrade> xt=ax1.get_xticklabels() d = { 'family' : 'sans-serif' }
Etrade> ax1.set_xticklabels(xt, d)
Etrade> But Python goes haywire ... There has to be a simpler way
Etrade> but not found it yet.
I'd like to deprecate font dictionaries in the sense you are using
them here. I implemented them before I fully understood python kwarg
processing. You can do everything with kwargs that you can do with
dictionaries (since kwargs are dictionaries) so it is redundant and
less pythonic. Since you are using the API, I suggest something like
for tick in ax1.xaxis.get_major_ticks():
tick.label1.set_family('sans-serif')
and ditto for the minor ticks if you need them. Also, since mpl
supports left/right or top/bottom ticking, if you are using these you
will also want to set the properties of tick.label2.
Etrade> I am trying to do the same for the legend properties. So
Etrade> far we have
Etrade> p=matplotlib.font_manager.FontProperties()
Etrade> p.set_family('sans-serif') p.set_size('small')
Etrade> fig.legend(lines, titles, 'upper right', prop=p)
Etrade> but this looks fairly cludgy - is there a more elegant way
Etrade> of doing the same thing?
I think this is elegant and not cludgy, so maybe I'm not the best one
to answer this.
JDH
|
|
From: Etrade G. <etr...@ds...> - 2006-11-07 16:04:30
|
Derek, I stand corrected - the phrase should be "fairly kludgy" though "cludgy" might not be that far off when describing my code! Alun At 15:03 07/11/2006, you wrote: > From ><http://www.bbc.co.uk/manchester/have_your_say/2002/11/06/manc_words_3.shtml>http://www.bbc.co.uk/manchester/have_your_say/2002/11/06/manc_words_3.shtml >A cludgy is an outside loo ??? > > >>> Etrade Griffiths <etr...@ds...> 2006/11/07 04:54 PM >>> >Sorry, another really basic matplotlib question ... how do I set the font >family of the axis tick labels? I am using wxPython/wxMpl and not the >pylab interface so am trying to avoid getp/setp. I could do this using >matplotlib.rc but want to do it programatically > >I tried > >fig=self.get_figure() >ax1=fig.gca() >ax1.plot(x,y) >xt=ax1.get_xticklabels() >d = { 'family' : 'sans-serif' } >ax1.set_xticklabels(xt, d) > >But Python goes haywire ... There has to be a simpler way but not found it >yet. > >I am trying to do the same for the legend properties. So far we have > >p=matplotlib.font_manager.FontProperties() >p.set_family('sans-serif') >p.set_size('small') >fig.legend(lines, titles, 'upper right', prop=p) > >but this looks fairly cludgy - is there a more elegant way of doing the >same thing? > >Thanks in advance > >Alun Griffiths > > > >----------------! --------------------------------------------------------- >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>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>https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >-- >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. > ><http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html>CSIR E-mail Legal Notice > ><http://mail.csir.co.za/CSIR_Copyright.html>CSIR Copyright, Terms and >Conditions > >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 ><mailto:Cal...@cs...>CSIR CallCentre > > >This message has been scanned for viruses and dangerous content by ><http://www.mailscanner.info/>MailScanner, >and is believed to be clean. |
|
From: Etrade G. <etr...@ds...> - 2006-11-07 16:01:27
|
John thanks - twinx was indeed where I "borrowed" some of the lines from. They're in the code explicitly 'cos it's a lot clearer to me than using twinx which is buried somewhere in the pylab interface Alun Griffiths At 15:32 07/11/2006, you wrote: > >>>>> "Etrade" == Etrade Griffiths <etr...@ds...> writes: > > Etrade> After poking around in the Pylab source, managed to sort > Etrade> the multiple line plotting using > > Etrade> fig = self.get_figure() ax1 = fig.gca() ax2 = > Etrade> fig.add_axes(ax1.get_position(), sharex=ax1, > Etrade> frameon=False) > >Isn't this what the twinx function does - heave you seen >http://matplotlib.sourceforge.net/examples/shared_axis_demo.py ? |
|
From: John H. <jdh...@ac...> - 2006-11-07 15:34:27
|
>>>>> "Etrade" == Etrade Griffiths <etr...@ds...> writes:
Etrade> After poking around in the Pylab source, managed to sort
Etrade> the multiple line plotting using
Etrade> fig = self.get_figure() ax1 = fig.gca() ax2 =
Etrade> fig.add_axes(ax1.get_position(), sharex=ax1,
Etrade> frameon=False)
Isn't this what the twinx function does - heave you seen
http://matplotlib.sourceforge.net/examples/shared_axis_demo.py ?
|
|
From: John H. <jdh...@ac...> - 2006-11-07 15:31:45
|
>>>>> "izak" == izak marais <iza...@ya...> writes:
izak> I want to plot the probability density function, but
izak> hist(...,normed=1,...) does not work as expected. Here is
izak> the code (with ipython line prompts):
izak> In [69]: n, bins, patches = hist(data, bins = 100, normed =
izak> 1) [ 0.12485649, 0.03013777, 0.03874856, 0. , 0.00861079,
izak> 0. , 0. , 0. , 0. , 0. , 0.0043054 , 0.0043054 , 0. ,
izak> 0. , 0.0043054 , 0. , 0. , 0. , 0. , 0. , 0. ,
izak> 0.0043054 , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
izak> 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
izak> 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
izak> 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
izak> 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
izak> 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
izak> 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
izak> 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
izak> 0.0043054 ,] In [72]: sum(n) Out[72]: 0.22388059701492535
izak> Should this not sum to 1.0 for it to be a PDF? Thanks
It should integrate to one
import matplotlib.mlab
matplotlib.mlab.trapz(bins, n)
JDH
|
|
From: John H. <jdh...@ac...> - 2006-11-07 15:30:39
|
>>>>> "Bart" == Bart van Kuik <B.v...@sr...> writes:
Bart> Hi list, I have created plots, but I find the line style is
Bart> a bit "vague". The line isn't one sharp, contrasting color,
Bart> but smoothly blended to the background. Is the correct term
Bart> anti aliasing?
Yes.
Bart> When setting the linestyle to 'dotted', the plot is not very
Bart> clear, see the following result:
Bart> http://vankuik.nl/cgi/wiki.cgi/download/vague_dotted_plot.png
Try turning antialiasing off for certain lines with
ax.plot(x,y,antialiased=False)
or globally with the lines.antialiased rc parameter; see
http://matplotlib.sf.net/matplotlibrc
JDH
|
|
From: Pierre GM <pgm...@gm...> - 2006-11-07 15:15:59
|
>>> hist?
...
Docstring:
HIST(x, bins=10, normed=0, bottom=0,
align='edge', orientation='vertical', width=None, **kwargs)
Compute the histogram of x. bins is either an integer number of
bins or a sequence giving the bins. x are the data to be binned.
The return values is (n, bins, patches)
If normed is true, the first element of the return tuple will
be the counts normalized to form a probability density, ie,
n/(len(x)*dbin)
align = 'edge' | 'center'. Interprets bins either as edge
or center values
orientation = 'horizontal' | 'vertical'. If horizontal, barh
will be used and the "bottom" kwarg will be the left edges.
width: the width of the bars. If None, automatically compute
the width.
kwargs are used to update the properties of the
hist bars
In your example, len(x)=52, and dbins=bin[1]-bin[0]=4.4666666666667, which
gives:
n.sum() * dbins = 1
|
|
From: Alan I. <ai...@am...> - 2006-11-07 15:12:16
|
On Tue, 7 Nov 2006, Charlie Moad wrote: > You'll need 0.87.7. I will try to build/post these > tonight. Thanks!!!!!!! > It's not terrible to get it compiled on OSX, but it's not > trivial at the same time. That is what I feared. Thanks again! Alan Isaac |
|
From: Ryan K. <rya...@gm...> - 2006-11-07 15:02:18
|
You have two options. savefig does have a dpi option that will
essentially set the figure size for the saved file:
savefig('myfile.png',dpi=300)
play with dpi until you get a figure size you like.
The other way to set the figure size is to specify it when you create
the figure:
figure(1,(10,8))
would create a fairly large figure. The figure (1 in this case) must
not already exist or at least it can't be shown on your screen
already. By that I mean if you have already called figure(1)
previously in your code, you must close it before you try to call
figure(1,(10,8)) or the figure size won't be affected.
Ryan
On 11/6/06, Chuang <chu...@gm...> wrote:
> Hi there,
>
> I want to automatically generated hundreds of figures with matplotlib.
> For each figure, I could use 'plot(Xi)' and 'show()' to draw the figure,
> and press the 'save' button in the figure panel, but this is not too
> automatically. Although I could use 'savefig()' to save the figures
> rather than using 'show()' to show it, and this makes whole program
> fully automatically, I don't know howto set the figure size before
> 'save' it (e.g. set size to 3000x1000pixel). The function 'savefig()'
> doesn't have any option to set figure size. So which function should I
> go to? or what should I do before using 'savefig()'?
>
> Thanks a lot,
> CC
>
>
> -------------------------------------------------------------------------
> 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: Pierre GM <pgm...@gm...> - 2006-11-07 14:55:19
|
On Tuesday 07 November 2006 04:49, Bart van Kuik wrote:
> I have created plots, but I find the line style is a bit "vague". The
> line isn't one sharp, contrasting color, but smoothly blended to the
> background. Is the correct term anti aliasing?
Seems like it. Make sure the 'antialiased' property of your lines/dots is set
to False by modifying your matplotlibrc default file (if you want this
behaviour to become the default), or by using
rcParams['lines.antialiased']=False, or rc('lines.antialiased',False)...
|
|
From: Etrade G. <etr...@ds...> - 2006-11-07 14:54:18
|
Sorry, another really basic matplotlib question ... how do I set the font
family of the axis tick labels? I am using wxPython/wxMpl and not the
pylab interface so am trying to avoid getp/setp. I could do this using
matplotlib.rc but want to do it programatically
I tried
fig=self.get_figure()
ax1=fig.gca()
ax1.plot(x,y)
xt=ax1.get_xticklabels()
d = { 'family' : 'sans-serif' }
ax1.set_xticklabels(xt, d)
But Python goes haywire ... There has to be a simpler way but not found it yet.
I am trying to do the same for the legend properties. So far we have
p=matplotlib.font_manager.FontProperties()
p.set_family('sans-serif')
p.set_size('small')
fig.legend(lines, titles, 'upper right', prop=p)
but this looks fairly cludgy - is there a more elegant way of doing the
same thing?
Thanks in advance
Alun Griffiths
|
|
From: Etrade G. <etr...@ds...> - 2006-11-07 14:30:03
|
After poking around in the Pylab source, managed to sort the multiple line plotting using fig = self.get_figure() ax1 = fig.gca() ax2 = fig.add_axes(ax1.get_position(), sharex=ax1, frameon=False) so issue closed for the moment |
|
From: Charlie M. <cw...@gm...> - 2006-11-07 14:01:26
|
On 11/7/06, Alan Isaac <ai...@am...> wrote: > On Mon, 06 Nov 2006, Alan Isaac wrote: > > I'm using MacPython 2.5 with numpy installed, > > and I wish to install matplotlib. Possible? Easy? > > I'm brand new on the Mac and used to the Windows installers, > > so if you can point me to *step by step* instructions I'd be > > very grateful. > > I need to clarify: > I have compiled numpy 1.0 for MacPython 2.5 on OSX Tiger > and it is my current belief that I need > matplotlib 0.87.7 to go with that. Right? > > There are currently no Mac binaries for > that version on SourceForge or pythonmac. > > If I can use 0.87.6 > or if binaries will soon be posted > I'm set. This is best for me. You'll need 0.87.7. I will try to build/post these tonight. It's not terrible to get it compiled on OSX, but it's not trivial at the same time. - Charlie |
|
From: Alan I. <ai...@am...> - 2006-11-07 13:12:19
|
On Mon, 06 Nov 2006, Alan Isaac wrote: > I'm using MacPython 2.5 with numpy installed, > and I wish to install matplotlib. Possible? Easy? > I'm brand new on the Mac and used to the Windows installers, > so if you can point me to *step by step* instructions I'd be > very grateful. I need to clarify: I have compiled numpy 1.0 for MacPython 2.5 on OSX Tiger and it is my current belief that I need matplotlib 0.87.7 to go with that. Right? There are currently no Mac binaries for that version on SourceForge or pythonmac. If I can use 0.87.6 or if binaries will soon be posted I'm set. This is best for me. If not ... my question was about how hard it will be to compile from source (for someone like me who is not used to doing so and has no clue about how difficult in will be to provide the dependencies involved). Thank you, Alan Isaac PS I am aware of the instructions at http://matplotlib.sourceforge.net/installing.html but I'm asking for someone who did this succesfully to provide a bit more guidance since I recall a few posts about difficulties in following these. |
|
From: izak m. <iza...@ya...> - 2006-11-07 09:55:45
|
I want to plot the probability density function, but hist(...,normed=1,...) does not work as expected.
Here is the code (with ipython line prompts):
In [69]: n, bins, patches = hist(data, bins = 100, normed = 1)
[ 0.12485649, 0.03013777, 0.03874856, 0. , 0.00861079, 0. ,
0. , 0. , 0. , 0. , 0.0043054 , 0.0043054 ,
0. , 0. , 0.0043054 , 0. , 0. , 0. ,
0. , 0. , 0. , 0.0043054 , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0.0043054 ,]
In [72]: sum(n)
Out[72]: 0.22388059701492535
Should this not sum to 1.0 for it to be a PDF?
Thanks
The data used is:
Out[66]:
[3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
6.666666666666667,
6.666666666666667,
11.111111111111111,
11.111111111111111,
11.111111111111111,
11.111111111111111,
11.111111111111111,
11.111111111111111,
11.111111111111111,
12.5,
12.5,
12.5,
12.5,
16.666666666666664,
16.666666666666664,
16.666666666666664,
16.666666666666664,
16.666666666666664,
22.222222222222221,
22.222222222222221,
50.0,
56.666666666666664,
66.666666666666657,
100.0,
450.0]
---------------------------------
Want to start your own business? Learn how on Yahoo! Small Business. |
|
From: Bart v. K. <B.v...@sr...> - 2006-11-07 09:50:42
|
Hi list, I have created plots, but I find the line style is a bit "vague". The line isn't one sharp, contrasting color, but smoothly blended to the background. Is the correct term anti aliasing? When setting the linestyle to 'dotted', the plot is not very clear, see the following result: http://vankuik.nl/cgi/wiki.cgi/download/vague_dotted_plot.png Is there any way to make the dots real sharp and contrasting? Thanks, Bart |
|
From: Pierre GM <pgm...@gm...> - 2006-11-07 05:44:00
|
> One thing I cannot work out is the axis number presentation.
> Cannot find any documentation about how to control the presentation of
> the axis number.
Poke around ticker.formatter
> However I would prefer it would present in enginering notation (10, 100,
> 1e3, 10e3, 100e3, 1e6, 10e6 ...etc)
The easiest is to define your own formatter. Please try the solution below.
You can use it as:
gca().xaxis.set_major_formatter(EngrFormatter(3))
#####
-------------------------------------------------------------------------
#---- --- Formatters ---
#####
-------------------------------------------------------------------------
class EngrFormatter(ScalarFormatter):
"""A variation of the standard ScalarFormatter, using only multiples of
three
in the mantissa. A fixed number of decimals can be displayed with the optional
parameter `ndec` . If `ndec` is None (default), the number of decimals is
defined
from the current ticks.
"""
def __init__(self, ndec=None, useOffset=True, useMathText=False):
ScalarFormatter.__init__(self, useOffset, useMathText)
if ndec is None or ndec < 0:
self.format = None
elif ndec == 0:
self.format = "%d"
else:
self.format = "%%1.%if" % ndec
#........................
def _set_orderOfMagnitude(self, mrange):
"""Sets the order of margnitude."""
ScalarFormatter._set_orderOfMagnitude(self, mrange)
self.orderOfMagnitude = 3*(self.orderOfMagnitude//3)
#........................
def _set_format(self):
"""Sets the format string to format all ticklabels."""
# set the format string to format all the ticklabels
locs = (N.array(self.locs)-self.offset) /
10**self.orderOfMagnitude+1e-15
sigfigs = [len(str('%1.3f'% loc).split('.')[1].rstrip('0')) \
for loc in locs]
sigfigs.sort()
if self.format is None:
self.format = '%1.' + str(sigfigs[-1]) + 'f'
if self._usetex or self._useMathText: self.format = '$%s$'%self.format
|
|
From: steve g. <ste...@op...> - 2006-11-07 05:15:13
|
I am a new user to matplotlib, .. it's great. One thing I cannot work out is the axis number presentation. Cannot find any documentation about how to control the presentation of the axis number. Currently using the default TKAgg plotting GUI backend. It seems the axis will show up to 3 digits, then switch to Scientific notation. (10, 100, 1e3, 1e4, 1e5 etc) However I would prefer it would present in enginering notation (10, 100, 1e3, 10e3, 100e3, 1e6, 10e6 ...etc) While I could handle some of this scaling before plotting (make numbers in the Milli-Seconds range), it becomes non-intutive when I zoom in on details (in the Nano-Second range), and the number becomes 1.23e-4 of a milli sec. I'd prefer to just plot Seconds, and let Matplotlib scale the number to one of mS, uS, nS, as appropriate for the graph range, and zoom level. Is this outside the scope of the supplied GUI widget? Do I need to start thinking of using the plot widget directly, create my own GUI interface, and writing code to handle the scaling of axis in the way I like? Thanks Steve |
|
From: Chuang <chu...@gm...> - 2006-11-07 04:01:07
|
Hi there, I want to automatically generated hundreds of figures with matplotlib. For each figure, I could use 'plot(Xi)' and 'show()' to draw the figure, and press the 'save' button in the figure panel, but this is not too automatically. Although I could use 'savefig()' to save the figures rather than using 'show()' to show it, and this makes whole program fully automatically, I don't know howto set the figure size before 'save' it (e.g. set size to 3000x1000pixel). The function 'savefig()' doesn't have any option to set figure size. So which function should I go to? or what should I do before using 'savefig()'? Thanks a lot, CC |
|
From: Suresh P. <sto...@ya...> - 2006-11-07 02:44:17
|
I have a figure with two subplots as below. However, everything breaks
when I try to rotate the x-labels as indicated in the two commented out
lines. I obtain a small empty plot embedded in a large empty plot with no
x-labels and no legend either. I got this code from the tutorial; it
works perfectly fine for the same data/commands if only using a single
main plot.
pylab.subplot(211)
pylab.plot(historicalScore, label='blah')
pylab.setp(pylab.gca(), xticklabels=[])
pylab.ylabel('blah')
pylab.title('Historical Statistics')
pylab.legend(loc='upper left')
pylab.subplot(212)
pylab.plot(numBlah, label='#')
pylab.plot(historicalNum, label='blah')
pylab.xticks(dates)
#xlabels = pylab.axes().get_xticklabels()
#pylab.setp(xlabels, 'rotation', 90)
pylab.xlabel('blah')
pylab.ylabel('blah')
pylab.legend(loc='upper left')
Any idea what is wrong?
Thanks,
Suresh
|