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: 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
|
|
From: Curtis C. <cu...@lp...> - 2006-11-06 21:37:48
|
Sorry, it wasn't working yesterday or earlier today for me. But it works
now. Thanks!
Cheers,
Curtis
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Curtis S. Cooper, Postdoctoral Research Associate *
* Lunar and Planetary Laboratory, University of Arizona *
* http://www.lpl.arizona.edu/~curtis/ *
* Kuiper Space Sciences, Rm. 423A *
* 1629 E. University Blvd., *
* Tucson, AZ 85721 * * * * * * * * * * * * * * *
* Wk: (520) 626-8596 *
* * * * * * * * * * * *
On Mon, 6 Nov 2006, Fernando Perez wrote:
> On 11/6/06, Curtis Cooper <cu...@lp...> wrote:
> > Hi,
> >
> > Is the website for the matplotlib project down permanently? I have been
> > trying to access matplotlib.sourceforge.net unsuccessfully for the past
> > day or so.
>
> Works fine from here (colorado.edu domain).
>
> Cheers,
>
> f
>
|
|
From: Fernando P. <fpe...@gm...> - 2006-11-06 21:34:50
|
On 11/6/06, Curtis Cooper <cu...@lp...> wrote: > Hi, > > Is the website for the matplotlib project down permanently? I have been > trying to access matplotlib.sourceforge.net unsuccessfully for the past > day or so. Works fine from here (colorado.edu domain). Cheers, f |
|
From: Curtis C. <cu...@lp...> - 2006-11-06 21:02:56
|
Hi, Is the website for the matplotlib project down permanently? I have been trying to access matplotlib.sourceforge.net unsuccessfully for the past day or so. Thanks, Curtis * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Curtis S. Cooper, Postdoctoral Research Associate * * Lunar and Planetary Laboratory, University of Arizona * * http://www.lpl.arizona.edu/~curtis/ * * Kuiper Space Sciences, Rm. 423A * * 1629 E. University Blvd., * * Tucson, AZ 85721 * * * * * * * * * * * * * * * * Wk: (520) 626-8596 * * * * * * * * * * * * * |
|
From: Alan I. <ai...@am...> - 2006-11-06 20:12:56
|
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. Thanks, Alan Isaac |
|
From: Alexander 'b. <boe...@gm...> - 2006-11-06 18:26:36
|
Hi
When using a legend with more than one entry, the line height of the
entries differ when mixing text with and without descender.
Another interpretation is that there should be more vertical space
between 2 entries, when the 1st text has no descender.
The same problem appears when one text has no ascender.
Is there a way to avoid this? I'd like to embed the graphs into latex
and than this looks really ugly.
Thanks for your help
cu boesi
--=20
<seasons82> was ist rl?
<seasons82> und muss man das wissen?
...der moment wo einem klar wird,
dass man zuviel chattet...
|
|
From: Christopher B. <Chr...@no...> - 2006-11-06 17:25:03
|
Werner F. Bruhin wrote:
>> I hope not. I am guessing that wxPython is like the linux kernel, so
>> 2.7 is a dev branch.
>
> Yes, 2.7 is a dev branch which normally lasts for quit some time,
> however this time round they are hoping to move to 2.8 pretty quickly, I
> believe before the end of the year.
yup -- and hoping to get it included in OS-X 10.5
>>> Is it not possible to have a wxPython nutral build?
>> A
>> while back we talked about and agreed on trying to remove the native
>> interfaces for gtk and wxpython to avoid these compilation headaches.
wxPython 2.7 (and, of course, 2.8) has some extra methods for dumping
binary data directly into wxBitmaps, so pure Python methods should be
just as fast as C++ ones. Of course, that's only wxPython-version
neutral for 2.7+ versions.
>> We are sticking with the unicode wxpython build for the
>> remainder of 0.87.x to avoid more confusion.
Good plan.
>> Ideally 0.88 will have the pure python blitting implementations.
I (and others) posted a bunch of information about how this could be
done in that thread a while back. Is anyone planning on doing it? I'd be
glad to consult, but don't have the time to do it myself right now (and
I'm not using MPL much at this point, so It's hard to justify)
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
|
|
From: Steve S. <el...@gm...> - 2006-11-06 16:00:24
|
Hi
I installed
python-matplotlib_0.87.5-2.1_amd64.deb (rev. 2761)
on Debian etch (Python 2.4.4c0) and get this warning when trying to plot
something:
In [1]: plot([1,2,3])
/usr/lib/python2.4/site-packages/matplotlib/font_manager.py:989:
UserWarning: Could not match sans-serif, normal, normal. Returning
/usr/share/matplotlib/mpl-data/cmtt10.ttf
warnings.warn('Could not match %s, %s, %s. Returning %s' % (name,
style, variant, self.defaultFont))
Out[1]: [<matplotlib.lines.Line2D instance at 0x2abfe1ff81b8>]
--
cheers,
steve
Random number generation is the art of producing pure gibberish as
quickly as possible.
|
|
From: John H. <jdh...@ac...> - 2006-11-06 15:39:25
|
>>>>> "Eric" == Eric Emsellem <ems...@ob...> writes:
Eric> Hi, below is a simple script illustration what I wish to do:
Eric> ==> use new symbols (here ellipses for example) and plot a
Eric> number of points with 'scatter', allowing transparency
Eric> (alpha=0.2) to see when two data points overlap. For some
Eric> reason this works: 1/ on the figure 2/ when saving as .png
Eric> but it does NOT work when saving as a Postscript file.
Eric> Is there an easy solution for this? (I am using GTKAgg, mpl
Eric> 0.87.5)
Eric> (doing a "convert" afterwards works but this is not very
Eric> practical here)
Postscript does not support transparency -- this is a limitation of
postscript and not the matplotlib ps backend. If you want vector
graphics with transparency, you'll need SVG or PDF.
JDH
|
|
From: Eric E. <ems...@ob...> - 2006-11-06 15:13:20
|
Hi,
below is a simple script illustration what I wish to do:
==> use new symbols (here ellipses for example) and plot a number of
points with 'scatter', allowing transparency (alpha=0.2) to see when two
data points overlap.
For some reason this works: 1/ on the figure 2/ when saving as .png
but it does NOT work when saving as a Postscript file.
Is there an easy solution for this? (I am using GTKAgg, mpl 0.87.5)
(doing a "convert" afterwards works but this is not very practical here)
thanks in advance
Eric
P.S.: for the example above, just using standard circles would have the
same effect
#===============================================
import numpy as num
rx, ry = 1.8, 1.
area = rx * ry * num.pi
theta = num.arange(0, 2*num.pi+0.01, 0.1)
verts = zip(rx/area*num.cos(theta), ry/area*num.sin(theta))
clf()
x = [0,0.1,0.2, 0.5]
y = [0.,0.1,0.,0.2]
scatter(x,y, c='0.8', edgecolor='k', faceted=True, s=300, marker=None,
verts=verts, alpha=0.2)
## saving as a png
savefig('tmp.png')
## the figure shows the transparency well
## now saving as a postscript
savefig('tmp.ps')
## ==> the symbols overlap but the transparency is gone
--
====================================================================
Eric Emsellem ems...@ob...
Centre de Recherche Astrophysique de Lyon
9 av. Charles-Andre tel: +33 (0)4 78 86 83 84
69561 Saint-Genis Laval Cedex fax: +33 (0)4 78 86 83 86
France http://www-obs.univ-lyon1.fr/eric.emsellem
====================================================================
|
|
From: Etrade G. <etr...@ds...> - 2006-11-06 14:59:05
|
John am trying to make a plot something along the lines of the attached. This has a single plot area with separate y-axes on either side of the plot, rather than two plot areas, each with their own axis Best regards Alun Griffiths At 14:24 06/11/2006, John Hunter wrote: > >>>>> "Etrade" == Etrade Griffiths <etr...@ds...> writes: > > Etrade> Hi new to Matplotlib and struggling to make a plot that > Etrade> has three lines plotted on it: two are supposed to plot on > Etrade> the LH y axis and the third on the RH y axis. The code so > Etrade> far is > > > ax1 = fig.add_axes([0.1, 0.1, 0.8, 0.8]) > ax2 = fig.add_axes([0.9, 0.1, -0.8, 0.8]) > ^ > [left, bottom, width, height] > >negative numbers are not supported. I don't know what kind of layout >you want, but start with something like > > > ax1 = fig.add_axes([0.1, 0.1, 0.4, 0.8]) > ax2 = fig.add_axes([0.55, 0.1, 0.4, 0.8]) > >and once you have a working plot tweak from there. > >JDH |
|
From: John H. <jdh...@ac...> - 2006-11-06 14:31:18
|
>>>>> "Chris" == Chris Bartley <ch...@ed...> writes:
Chris> I have a matplotlib figure (by the way - matplot lib is
Chris> brilliant) with lots of widgets (buttons, check boxes) on
Chris> it, and am wondering if it is possible to put a combo box
Chris> on it?
There are GUI native widgets you can use (eg GTK or WX) if you are
doing GUI programming. matplotlib has a few simple GUI neutral
widgets in matplotlib.widgets, but not compo boxes. We could write
one...., but then someone would yell.
JDH
|
|
From: John H. <jdh...@ac...> - 2006-11-06 14:29:53
|
>>>>> "Charles" == Charles R Twardy <ct...@gm...> writes:
Charles> Hi folks, It seems that 'bar' no longer supports
Charles> asymmetric errorbars. Am I meant to call both 'bar' and
Charles> 'errorbar' if I want asymmetric errorbars on my
Charles> histograms? Is there a canonical idiom?
Charles> Sorry if I missed a previous answer to this.
I don't use asymmetric error bars so don't have any ready test code,
but looking at the implementation, the xerr and yerr kwargs to bar are
passed on to errorbar after a bit of array conversion and length
checking. Does this not work for you? If not, can you send a snippet
of freestanding test code?
Thanks,
JDH
|
|
From: John H. <jdh...@ac...> - 2006-11-06 14:27:09
|
>>>>> "Etrade" == Etrade Griffiths <etr...@ds...> writes:
Etrade> Hi new to Matplotlib and struggling to make a plot that
Etrade> has three lines plotted on it: two are supposed to plot on
Etrade> the LH y axis and the third on the RH y axis. The code so
Etrade> far is
ax1 = fig.add_axes([0.1, 0.1, 0.8, 0.8])
ax2 = fig.add_axes([0.9, 0.1, -0.8, 0.8])
^
[left, bottom, width, height]
negative numbers are not supported. I don't know what kind of layout
you want, but start with something like
ax1 = fig.add_axes([0.1, 0.1, 0.4, 0.8])
ax2 = fig.add_axes([0.55, 0.1, 0.4, 0.8])
and once you have a working plot tweak from there.
JDH
|
|
From: Etrade G. <etr...@ds...> - 2006-11-06 09:24:08
|
Hi
new to Matplotlib and struggling to make a plot that has three lines
plotted on it: two are supposed to plot on the LH y axis and the third on
the RH y axis. The code so far is
import os
import math
import wx
import wxmpl
import numpy
# =======================
# Define plot data window
# =======================
class ForecastData:
# Constructor
def __init__(self, d):
# Transfer parameters
self.dt = d['dt'] # time step size
self.tmax = d['tmax'] # maximum forecast time
# Set up arrays (filled with zeroes)
self.nstep=int(self.tmax/self.dt)
self.xtim=numpy.zeros((self.nstep,))
self.xoil=numpy.zeros((self.nstep,))
self.xwat=numpy.zeros((self.nstep,))
self.xgas=numpy.zeros((self.nstep,))
# ==================
# Define main window
# ==================
class PlotFrame(wxmpl.PlotFrame):
# Constructor for main window
def __init__(self, data):
# Create a wxmpl PlotFrame instance
wxmpl.PlotFrame.__init__(self, None, wx.ID_ANY, title='Production
profile')
fig = self.get_figure()
# Create an Axes on the Figure to plot in.
ax1 = fig.add_axes([0.1, 0.1, 0.8, 0.8])
ax2 = fig.add_axes([0.9, 0.1, -0.8, 0.8])
# Plot the data
ax1.plot(data.xtim, data.xoil, '-g', label='oil rate')
ax1.plot(data.xtim, data.xwat, '-b', label='water rate')
ax2.plot(data.xtim, data.xgas, '-r', label='gas rate')
# Add a legend
ax1.legend()
ax2.legend()
# Set axis titles
ax1.set_xlabel('time (years)', family='sans-serif')
ax1.set_ylabel('liquid rate (m3/d)', family='sans-serif')
ax2.set_ylabel('gas rate (m3/d)', family='sans-serif')
# ========================
# Define application class
# ========================
class App(wx.App):
def OnInit(self):
# Define data parameters for test model
d={}
d['dt']=0.1 # time step size
d['tmax']=10.0 # maximum forecast time
# Define data object
fcst_data = ForecastData(d)
# Fill data arrays with dummy data
tnow = 0.0
for n in range(fcst_data.nstep):
fcst_data.xtim[n]=tnow
fcst_data.xoil[n]=5000*math.exp(-0.1*tnow)
fcst_data.xgas[n]=600*math.sin(tnow)
fcst_data.xwat[n]=3000*math.exp(1.0-0.2*tnow)
tnow = tnow + fcst_data.dt
# Display top level window
self.frame = PlotFrame(fcst_data)
self.frame.Show()
self.SetTopWindow(self.frame)
return True
def main():
app = App(False)
app.MainLoop()
if __name__ == '__main__':
main()
About the only successful thing here is getting the RH y axis scale on the
RH of the plot :-(. The lines on ax1 don't show up so I guess ax2 is
obscuring it somehow (though I thought axisbg=None by default), the x axis
for axis 2 runs in the wrong direction (presumably because width is
negative) and the labels are all over the place. Hopefully, the labels
problem should be fairly easy to sort out once I can see the lines but
until then I'm a bit stuck. Tried to find an example of what I want to do,
but most of them seem to use subplots whereas I just want all my plots on
the same graph. Can somebody please point me in the right direction?
Thanks in advance
Alun Griffiths
|
|
From: Etrade G. <etr...@ds...> - 2006-11-06 09:04:57
|
Charlie thanks for the tip - it worked a charm. Alun Griffiths |
|
From: Charles R. T. <ct...@gm...> - 2006-11-06 06:55:39
|
Hi folks, It seems that 'bar' no longer supports asymmetric errorbars. Am I meant to call both 'bar' and 'errorbar' if I want asymmetric errorbars on my histograms? Is there a canonical idiom? Sorry if I missed a previous answer to this. -C -- Charles R. Twardy |