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
(1) |
|
2
(10) |
3
(29) |
4
(56) |
5
(44) |
6
(26) |
7
(12) |
8
(1) |
|
9
(2) |
10
(11) |
11
(28) |
12
(17) |
13
(6) |
14
(17) |
15
(7) |
|
16
(1) |
17
(8) |
18
(8) |
19
(7) |
20
(2) |
21
(8) |
22
(4) |
|
23
(6) |
24
(1) |
25
(2) |
26
(8) |
27
(3) |
28
(5) |
29
(1) |
|
30
|
31
(1) |
|
|
|
|
|
|
From: Jeff W. <js...@fa...> - 2007-12-05 16:39:32
|
Michael Hearne wrote:
> Does anyone here have any experience converting GMT color palettes
> into pylab colormaps? I took a stab at it, and the results are not
> really what I expected.
>
> GMT, for the unfamiliar, is a scientific plotting/mapping package that
> I'm doing my best to rid myself of. If you've never heard of it, then
> you can probably ignore this message.
>
> Here's my attempt at bringing in a GMT color palette:
>
> #!/usr/bin/python
>
> from pylab import *
>
> #GMT color palette - Colors are specified by a RGB triplet with each
> value in the range
> #0-255. The palette below specifies that a data value between 1 and 2
> will be assigned a color
> #linearly interpreted between the colors (255,255,255) and (191,204,255).
>
> # 0 255 255 255 1 255 255 255
> # 1 255 255 255 2 191 204 255
> # 2 191 204 255 3 160 230 255
> # 3 160 230 255 4 128 255 255
> # 4 128 255 255 5 122 255 147
> # 5 122 255 147 6 255 255 0
> # 6 255 255 0 7 255 200 0
> # 7 255 200 0 8 255 145 0
> # 8 255 145 0 9 255 0 0
> # 9 255 0 0 10 200 0 0
> # 10 200 0 0 13 128 0 0
>
> cdict = {'red': ((0.0,1.00,1.0),
> (0.1,1.00,0.75),
> (0.2,0.75,0.63),
> (0.3,0.63,0.50),
> (0.4,0.50,0.48),
> (0.5,0.48,1.00),
> (0.6,1.00,1.00),
> (0.7,1.00,1.00),
> (0.8,1.00,1.00),
> (0.9,1.00,0.78),
> (1.0,0.78,0.50)),
> 'green': ((0.0,1.00,1.00),
> (0.1,1.00,0.80),
> (0.2,0.80,0.90),
> (0.3,0.90,1.00),
> (0.4,1.00,1.00),
> (0.5,1.00,1.00),
> (0.6,1.00,0.78),
> (0.7,0.78,0.57),
> (0.8,0.57,0.00),
> (0.9,0.00,0.00),
> (1.0,0.00,0.00)),
> 'blue': ((0.0,1.00,1.00),
> (0.1,1.00,1.00),
> (0.2,1.00,1.00),
> (0.3,1.00,1.00),
> (0.4,1.00,0.58),
> (0.5,0.58,0.00),
> (0.6,0.00,0.00),
> (0.7,0.00,0.00),
> (0.8,0.00,0.00),
> (0.9,0.00,0.00),
> (1.0,0.00,0.00))}
>
> my_cmap = matplotlib.colors.LinearSegmentedColormap('my_colormap',cdict)
> pcolor(rand(10,10),cmap=my_cmap)
> colorbar()
> savefig('colormap.png')
>
Michael: The basemap toolkit includes the GMT colormaps. To access
them, import cm from the basemap namespace (from
matplotlib.toolkits.basemap import cm). The names are prefixed with 'GMT_'.
-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: Michael H. <mh...@us...> - 2007-12-05 16:32:45
|
Does anyone here have any experience converting GMT color palettes
into pylab colormaps? I took a stab at it, and the results are not
really what I expected.
GMT, for the unfamiliar, is a scientific plotting/mapping package
that I'm doing my best to rid myself of. If you've never heard of
it, then you can probably ignore this message.
Here's my attempt at bringing in a GMT color palette:
#!/usr/bin/python
from pylab import *
#GMT color palette - Colors are specified by a RGB triplet with each
value in the range
#0-255. The palette below specifies that a data value between 1 and
2 will be assigned a color
#linearly interpreted between the colors (255,255,255) and
(191,204,255).
# 0 255 255 255 1 255 255 255
# 1 255 255 255 2 191 204 255
# 2 191 204 255 3 160 230 255
# 3 160 230 255 4 128 255 255
# 4 128 255 255 5 122 255 147
# 5 122 255 147 6 255 255 0
# 6 255 255 0 7 255 200 0
# 7 255 200 0 8 255 145 0
# 8 255 145 0 9 255 0 0
# 9 255 0 0 10 200 0 0
# 10 200 0 0 13 128 0 0
cdict = {'red': ((0.0,1.00,1.0),
(0.1,1.00,0.75),
(0.2,0.75,0.63),
(0.3,0.63,0.50),
(0.4,0.50,0.48),
(0.5,0.48,1.00),
(0.6,1.00,1.00),
(0.7,1.00,1.00),
(0.8,1.00,1.00),
(0.9,1.00,0.78),
(1.0,0.78,0.50)),
'green': ((0.0,1.00,1.00),
(0.1,1.00,0.80),
(0.2,0.80,0.90),
(0.3,0.90,1.00),
(0.4,1.00,1.00),
(0.5,1.00,1.00),
(0.6,1.00,0.78),
(0.7,0.78,0.57),
(0.8,0.57,0.00),
(0.9,0.00,0.00),
(1.0,0.00,0.00)),
'blue': ((0.0,1.00,1.00),
(0.1,1.00,1.00),
(0.2,1.00,1.00),
(0.3,1.00,1.00),
(0.4,1.00,0.58),
(0.5,0.58,0.00),
(0.6,0.00,0.00),
(0.7,0.00,0.00),
(0.8,0.00,0.00),
(0.9,0.00,0.00),
(1.0,0.00,0.00))}
my_cmap = matplotlib.colors.LinearSegmentedColormap('my_colormap',cdict)
pcolor(rand(10,10),cmap=my_cmap)
colorbar()
savefig('colormap.png')
------------------------------------------------------
Michael Hearne
mh...@us...
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
------------------------------------------------------
|
|
From: Fernando P. <fpe...@gm...> - 2007-12-05 16:24:03
|
On Dec 5, 2007 8:37 AM, Stephen Uhlhorn <ste...@gm...> wrote: > I was just wondering what the status of the CocoaAgg backend is since > there is not much info available. > > Can it be used interactively w/ipython? I don't know for a fact, but the answer is probalby no. Each GUI backend requires an explicit implementation in ipython, since they all have their own threading/callback/timer quirks (even qt3 and qt4 are different). Thus far, we don't have one for Cocoa. It may 'just work', but I don't know that, so if you find that it doesn't, and decide to dig in to implement the support, by all means send it our way! The file to look at for inspiration is: http://projects.scipy.org/ipython/ipython/browser/ipython/trunk/IPython/Shell.py Cheers, f |
|
From: Stephen U. <ste...@gm...> - 2007-12-05 15:37:38
|
I was just wondering what the status of the CocoaAgg backend is since there is not much info available. Can it be used interactively w/ipython? Can it be used to embed mpl in a cocoa app and take advantage of all the xcode/interface builder stuff in OS X? Thanks- -stephen |
|
From: John H. <jd...@gm...> - 2007-12-05 15:19:06
|
On Dec 5, 2007 6:38 AM, S=F8ren Nielsen <sor...@gm...> wrot= e: > Hi, > > Is it possible to expand the colorcycle that matplotlib uses by default? > > in axes.py, class _process_plot_var_args, def _clear_color_cycle(self) It > seems that self.colors are hardcoded to be self.colors =3D > ['b','g','r','c','m','y','k'] ... is there a way to extend this? (Without > changing the matplotlib code directly) I want to be able to extend it by = ex. > dashed lines or others.. i sometimes have a large number of plots to do, = and > the 7 default plot colors are not enough... > > I know I could manually make a handler in my program to handle the colors > when I plot... but it would seem nicer if I could just pass a list of plo= t > colors to matplotlib. I just made a chance in svn to expose the default color list. Here is an ipython session that shows how to use it: In [1]: import matplotlib.axes as mplaxes In [2]: x, y =3D rand(2,100) In [3]: plot(x, y, 2*x, 2*y) Out[3]: [<matplotlib.lines.Line2D instance at 0x8f2dc8c>, <matplotlib.lines.Line2D instance at 0x8f2dd6c>] In [4]: mplaxes._process_plot_var_args.defaultColors =3D ['red', 'darkslategray', 'wheat'] In [5]: clf() In [6]: plot(x, y, 2*x, 2*y) Darren, we might want to expose this in the matplotlib.conf, but perhaps is it a rare enough request that it is enough to let people tweak it manually when needed. The only thing that is a bit ugly is that Axes._process_plot_var_args has the leading underscore indicating it should not be used outside of mpl, but this is easy enough to remedy... JDH |
|
From: John H. <jd...@gm...> - 2007-12-05 15:08:12
|
On Dec 5, 2007 8:58 AM, Jos=E9 G=F3mez-Dans <jgo...@gm...> wrote: > Mmmm... I was just wondering whether compiling the new 0.91.1 version mig= ht > make the problem go away? I am currently running 0.90.1. Unlikely, we haven't changed anything in that code. One thing you can do, it is fairly labor intensive, is to paste the toolbar code from backend_gtk into your script and slowly start hacking away at it to see which gtk call is causing your problems. I don't see an easier way. Alternatively, you could get tkagg, qtagg or wxagg installed. If you want to stick with gtk, I can provide a sample script for you that defines the toolbar inline so you can hack on it. JDH |
|
From: Stephen U. <ste...@gm...> - 2007-12-05 15:08:11
|
On Dec 4, 2007 5:14 PM, Russell E. Owen <ro...@ce...> wrote: > If you use Tcl/Tk and use a current version (instead of the ancient > version that is built in) then use the packages at pythonmac. I just > built 0.91.1 today and it should show up there soon. Meanwhile you can > get it from here: > <http://www.astro.washington.edu/rowen/pythoninstallers/> > > I hope that someday the official Mac egg version will work with 3rd > party Tcl/Tk but no version I've tried has -- including 0.91.1. Does this mean that the only difference between the egg and pythonmac version is how it's linked against Tcl/Tk? Just for my edification, why can't the egg version be linked against/include a different Tcl/Tk? Thanks- -stephen |
|
From: <jgo...@gm...> - 2007-12-05 14:59:04
|
On Tuesday 04 December 2007 16:16:06 Jos=E9 G=F3mez-Dans wrote: > On Tuesday 04 December 2007 16:05:33 John Hunter wrote: > > On Dec 4, 2007 10:00 AM, Jos=E9 G=F3mez-Dans <jgo...@gm...> wro= te: > > Hmm, the plot thickens. How about embedding_in_gtk2.py -- this add the > > toolbar > > This does indeed slow things down. The minimal script that reproduces this > behaviour is the following (the delay appears round about the definition = of > toolbar): [...] Mmmm... I was just wondering whether compiling the new 0.91.1 version might= =20 make the problem go away? I am currently running 0.90.1. Thanks, J |
|
From: Darren D. <dar...@co...> - 2007-12-05 14:58:08
|
On Sunday 02 December 2007 06:55:01 am hjc520070 wrote:
> Xavier Gnata wrote:
> > Hi,
> >
> > Quoting matplotlib/__init__.py :
> >
> > def checkdep_ghostscript():
> > try:
> > if sys.platform =3D=3D 'win32':
> > command =3D 'gswin32c -v'
> > else:
> > command =3D 'gs -v'
> > stdin, stdout =3D os.popen4(command)
> > line =3D stdout.readlines()[0]
> > v =3D line.split()[2]
> > vtest =3D '.'.join(v.split('.')[:2]) # deal with version numbers
> > like '7.07.1'
> > float(vtest)
> > return vtest
> > except (IndexError, ValueError):
> > return None
> >
> > It fails on debian sid because 'gs -v' returns "GPL Ghostscript SVN
> > PRE-RELEASE 8.61 (2007-08-02)\n"
> >
> > Anyway, the parser will be ugly because it has to deal with version
> > numbers like '7.07.1'.
> > Should I propose a trivial patch to get thinks working on debian sid ?
> >
> > Xavier
> > ps :Why is there no standard way (like -v or --version) on *unix to get
> > the version *number*?? Only the version number. Why :(
> >
> > --
> > ############################################
> > Xavier Gnata
> > CRAL - Observatoire de Lyon
> > 9, avenue Charles Andr=C3=A9
> > 69561 Saint Genis Laval cedex
> > Phone: +33 4 78 86 85 28
> > Fax: +33 4 78 86 83 86
> > E-mail: gn...@ob...
> > ############################################
> >
> >
> > -----------------------------------------------------------------------=
=2D-
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> Yeah , I did face the same problem . My code is following:
> There seems to be something wrong in "ax.imshow(im)", I can't get the
> answer , Can sb help me .
The imshow documentation says "X may be a float array, a uint8 array or a P=
IL=20
image", but you are passing it an AxesImage instance, which wont work.=20
> The error message"ValueError: need more than 0 values to unpack"
> Thank you .
>
> # -*- coding:gb2312 -*-
> import wx
> from pylab import *
> from matplotlib.backends.backend_wx import FigureCanvasWx
> from matplotlib.figure import Figure
> from matplotlib.axes import *
> from numpy import *
>
> #-------------------------------------------------------------
> x=3Darray(range(0,100))
> y=3Darray(range(0,100))
> z=3Drand(100,100)
> figure(1)
> im=3Dimshow(z, interpolation=3D'bilinear', origin=3D'lower',cmap=3Dcm.gra=
y,
> extent=3D(0,100,0,100))
> levels =3D arange(0.3, 0.4, 0.9)
> contour(x,y,z,levels,origin=3D'lower',linewidths=3D2,extent=3D(0,100,0,10=
0))
>
>
> fig=3Dfigure(2)
> ax =3D fig.add_subplot(111)
> ax.imshow(im)
> ax.set_xlim(0,3)
> ax.set_ylim(0,2)
> show()
|
|
From: John H. <jd...@gm...> - 2007-12-05 14:52:45
|
On Dec 1, 2007 7:07 PM, twentypoundtrout <twe...@ya...> wrote: > > Hi. I installed matplotlib and get the following when I import pylab: There was a bug in our windows installer that should be fixed now. Please remove the matplotlib installation and reinstall with the downloads now available at the sourceforge site. Thanks, JDH |
|
From: John H. <jd...@gm...> - 2007-12-05 14:51:54
|
On Dec 2, 2007 1:04 AM, Brian Orr <bri...@gm...> wrote: > Hi All, > > I'm running into the following error when I try to run any of the matplotlib > examples: > > $ python anim.py > Traceback (most recent call last): > File "anim.py", line 19, in <module> > import pylab as p > File "C:\Python25\Lib\site-packages\pylab.py", line 1, in <module> > from matplotlib.pylab import * > File "C:\Python25\Lib\site-packages\matplotlib\pylab.py", line 206, in > <module> > from matplotlib.numerix import npyma as ma > File "C:\Python25\Lib\site-packages\matplotlib\numerix\__init__.py", line > 20, in <module> > from matplotlib import rcParams, verbose > ImportError: cannot import name rcParams > > I'm using the latest versions of matplotlib and numpy, ActivePython 2.5 (all > for Windows XP). Any help would be appreciated. There was a bug in our windows installer. Please remove the old mpl install, grab the latest installer from the download site, and try again. Sorry for the trouble! Thanks, JDH |
|
From: John H. <jd...@gm...> - 2007-12-05 14:50:58
|
On Dec 1, 2007 7:47 PM, hjc520070 <jia...@16...> wrote: > > The following run well . But I just want to make the image, with the x and y > as axis and z as the image value ,show on the figure. In the pylab , we can > just give a command "imshow" ,But here , I fail to do it , I have try > ax.imshow() again and again ,but fail. Can sb give me some advice . Thank > you . You cannot import pylab and use the FigureCanvasWx at the same time. Please follow the lead of examples/embedding_in_wx*.py if you want to use matplotlib in a wxpython GUI. Using pylab at the same time as the API is undefined and unsupported. JDH |
|
From: massimo s. <mas...@un...> - 2007-12-05 14:39:42
|
rex ha scritto: > massimo sandal <mas...@un...> [2007-12-04 09:18]: >> On a related note, I *hate* that hitting "reply" uses the mail address >> of the parent poster, instead than that of the mailing list. The scipy >> and the gentoo mailing list (two other examples I know) behave more >> properly. Is this a sourceforge quirk? > > The list follows RFC 2822. The Reply-To header is intended to be > created by the originator of the message. List software that > overwrites the Reply-To header destroys the function it's intended > for. > > There's an excellent essay on this at: > > http://woozle.org/~neale/papers/reply-to-still-harmful > > Mailman implements RFC 2369, which is intended to address this > issue. If you want replies to go to the list, I suggest that you > use a mail client that follows RFC 2369. If you choose to use old > software that doesn't recognize the List-Post header, please don't > complain about software that follows RFC standards. Thanks for the article. I read it, and I must say I disagree. This is the tricky part: "Your list software is not "the author of the message", so it must not set or in any way meddle with the Reply-To header. " That's what I think is wrong. When interacting with a mailing list, I assume I'm not interacting just with you or others. I'm receiving mails *from the ML* and sending mails *to the ML*. Not receiving mails from Alice and sending mails to Bob. In other words: A ML, in my experience, is not different from a public forum. When I hit "reply" on a forum, the post goes on the forum, not on the mailbox of the previous poster. I'm all for standards and for consistent behaviour and I understand the logic behind that article; what the authors of the RFC got wrong, in my opinion, it considering a mailing list just as a gigantic CC: by disconnected people instead than of a forum-like object. The fact both use the mail protocol doesn't change the fact they're different objects. But of course that's only a philosophical problem. Thanks to the article I also discovered that "reply to all" sends mail both to the ML and the original sender (Never bothered to try, my fault). Although I find it a little funny. m. -- Massimo Sandal University of Bologna Department of Biochemistry "G.Moruzzi" snail mail: Via Irnerio 48, 40126 Bologna, Italy email: mas...@un... tel: +39-051-2094388 fax: +39-051-2094387 |
|
From: Steve S. <el...@gm...> - 2007-12-05 13:27:24
|
rex wrote: > massimo sandal <mas...@un...> [2007-12-04 09:18]: >> On a related note, I *hate* that hitting "reply" uses the mail address >> of the parent poster, instead than that of the mailing list. The scipy >> and the gentoo mailing list (two other examples I know) behave more >> properly. Is this a sourceforge quirk? > [...] > If you choose to use old software that doesn't recognize the List-Post > header, please don't complain about software that follows RFC standards. If you happen to use Mozilla Thunderbird, there is an extension [1] that enables Reply-To-List. This works with a patched version of Thunderbird, which is included in several major distros. [1] http://alumnit.ca/wiki/index.php?page=ReplyToListThunderbirdExtension -- Random number generation is the art of producing pure gibberish as quickly as possible. |
|
From: <sor...@gm...> - 2007-12-05 12:38:53
|
Hi, Is it possible to expand the colorcycle that matplotlib uses by default? in axes.py, class _process_plot_var_args, def _clear_color_cycle(self) It seems that self.colors are hardcoded to be self.colors = ['b','g','r','c','m','y','k'] ... is there a way to extend this? (Without changing the matplotlib code directly) I want to be able to extend it by ex. dashed lines or others.. i sometimes have a large number of plots to do, and the 7 default plot colors are not enough... I know I could manually make a handler in my program to handle the colors when I plot... but it would seem nicer if I could just pass a list of plot colors to matplotlib. Regards, Soren |
|
From: Ryan M. <rm...@ou...> - 2007-12-05 04:25:39
|
Hi,
I think there's a bug in errorbar in trying to use asymmetric
y-errorbars. According to the docstring:
xerr and yerr may be any of:
a rank-0, Nx1 Numpy array - symmetric errorbars +/- value
an N-element list or tuple - symmetric errorbars +/- value
a rank-1, Nx2 Numpy array - asymmetric errorbars -column1/+column2
However, code below that tries to use the last of these options fails,
as shown in the example below.
from matplotlib import pyplot as P
import numpy as N
x = N.linspace(-3, 3, 100)
y = x**2
P.errorbar(x, y, yerr=N.c_[0.1*y, 0.2*y])
P.show()
This fails with:
Traceback (most recent call last):
File "errorbar_test.py", line 7, in <module>
P.errorbar(x, y, yerr=N.c_[0.1*y, 0.2*y])
File "/usr/lib64/python2.5/site-packages/matplotlib/pyplot.py", line
1591, in errorbar
ret = gca().errorbar(*args, **kwargs)
File "/usr/lib64/python2.5/site-packages/matplotlib/axes.py", line
3766, in errorbar
barcols.append( self.vlines(x, lower, upper, **lines_kw) )
File "/usr/lib64/python2.5/site-packages/matplotlib/axes.py", line
2528, in vlines
for thisx, (thisymin, thisymax) in zip(x,Y)]
ValueError: too many values to unpack
If I change yerr instead to (0.1*y, 0.2*y), which isn't listed as an
option, I get my desired behavior. Looking at the code, it seems to
come down to lines 3757-3764 in axes.py:
if iterable(yerr) and len(yerr)==2 and iterable(yerr[0]) and
iterable(yerr[1]):
# using list comps rather than arrays to preserve units
lower = [thisy-thiserr for (thisy, thiserr) in
cbook.safezip(y,yerr[0])]
upper = [thisy+thiserr for (thisy, thiserr) in
cbook.safezip(y,yerr[1])]
else:
# using list comps rather than arrays to preserve units
lower = [thisy-thiserr for (thisy, thiserr) in
cbook.safezip(y,yerr)]
upper = [thisy+thiserr for (thisy, thiserr) in
cbook.safezip(y,yerr)]
This code would actually seem to preclude the use of an Nx2 array, so
something probably needs to be changed to bring the docstring and the
code into agreement.
Thanks,
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
|
|
From: John H. <jd...@gm...> - 2007-12-05 03:05:53
|
On Dec 4, 2007 8:14 AM, Charlie Moad <cw...@gm...> wrote: > I have posted fresh win32 eggs and exe's on SF. I explicitly removed > the inclusion of msvcp from distutils in numpy. Please give them a > try and let me know if you have any more problems. Note: I just > posted the files so it might take a while for them to propagate. I don't think we've purged the mscvp71 dependency -- I just installed the 91.1 exe on my system and got the same error on pylab import. I can fix it by dropping the dll into c:\windows\system32 (and I updated the install notes to this effect) but this is a pretty onerous requirement for the naive user, so if we can figure out how to remove the dll dependency or ship the dll, that would be ideal. JDH |
|
From: Yongtao C. <cui...@gm...> - 2007-12-05 02:15:30
|
I don't know why those spaces always don't show up on the mailing list webpage. They looked fine on my gmail page. The 'test' function only has one 'for' loop. The four lines below the 'for' line are all in the loop. On Dec 4, 2007 8:52 PM, Yongtao Cui <cui...@gm...> wrote: > >>> import pylab > >>> def test(n): > >>> for i in range(n): > >>> f=pylab.figure(1) > >>> f.clf() > >>> a=f.add_axes([0.2, 0.2, 0.6, 0.6]) > >>> a.plot([1,2,3,4,5], 'ro') > >>> > > I tracked down the svn tree. The above script works ok in revision > 3737 and before, but crashes from revision 3738 and after. > > Yongtao > > > On Dec 2, 2007 4:15 PM, Yongtao Cui <cui...@gm...> wrote: > > Below is the minimum code with the right indent > > > > import pylab > > def test(n): > > for i in range(n): > > f=pylab.figure(1) > > f.clf() > > a=f.add_axes([0.2, 0.2, 0.6, 0.6]) > > a.plot([1,2,3,4,5], 'ro') > > > > > > On Dec 2, 2007 4:07 PM, Yongtao Cui <cui...@gm...> wrote: > > > Hi, > > > > > > I got the following error when clearing and plotting on the same > > > figure for many times. I found the following minimum code to reproduce > > > this error. I am using matplotlib-0.91.1 and wxpython2.8 on windows > > > xp. In the matplotlibrc file, I changed the backend to WXAgg and > > > interactive to True. > > > > > > import pylab > > > def test(n): > > > for i in range(n): > > > f=pylab.figure(1) > > > f.clf() > > > a=f.add_axes([0.2, 0.2, 0.6, 0.6]) > > > a.plot([1,2,3,4,5], 'ro') > > > > > > > > > The error only happens for a large n. For example, test(10) works > > > fine, but test(50) will cause the error. Also runing test(10) for a > > > few times will also cause the error. > > > > > > Could anyone give me some help? > > > > > > Thanks. > > > > > > The following is the error message: > > > > > > Traceback (most recent call last): > > > File "<input>", line 1, in <module> > > > File "<input>", line 3, in test > > > File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 191, in figure > > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py", > > > line 1227, in draw_if_interactive > > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py", > > > line 61, in draw > > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > > line 380, in draw > > > File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 612, in draw > > > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1344, in draw > > > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 596, in draw > > > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 170, in draw > > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 775, in draw > > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 317, in draw > > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 195, > > > in _get_layout > > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > > line 234, in get_text_width_height_descent > > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > > line 301, in _get_agg_font > > > RuntimeError: Could not open facefile > > > C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf; > > > Cannot_Open_Resource > > > > > > |
|
From: Yongtao C. <cui...@gm...> - 2007-12-05 01:52:38
|
>>> import pylab >>> def test(n): >>> for i in range(n): >>> f=pylab.figure(1) >>> f.clf() >>> a=f.add_axes([0.2, 0.2, 0.6, 0.6]) >>> a.plot([1,2,3,4,5], 'ro') >>> I tracked down the svn tree. The above script works ok in revision 3737 and before, but crashes from revision 3738 and after. Yongtao On Dec 2, 2007 4:15 PM, Yongtao Cui <cui...@gm...> wrote: > Below is the minimum code with the right indent > > import pylab > def test(n): > for i in range(n): > f=pylab.figure(1) > f.clf() > a=f.add_axes([0.2, 0.2, 0.6, 0.6]) > a.plot([1,2,3,4,5], 'ro') > > > On Dec 2, 2007 4:07 PM, Yongtao Cui <cui...@gm...> wrote: > > Hi, > > > > I got the following error when clearing and plotting on the same > > figure for many times. I found the following minimum code to reproduce > > this error. I am using matplotlib-0.91.1 and wxpython2.8 on windows > > xp. In the matplotlibrc file, I changed the backend to WXAgg and > > interactive to True. > > > > import pylab > > def test(n): > > for i in range(n): > > f=pylab.figure(1) > > f.clf() > > a=f.add_axes([0.2, 0.2, 0.6, 0.6]) > > a.plot([1,2,3,4,5], 'ro') > > > > > > The error only happens for a large n. For example, test(10) works > > fine, but test(50) will cause the error. Also runing test(10) for a > > few times will also cause the error. > > > > Could anyone give me some help? > > > > Thanks. > > > > The following is the error message: > > > > Traceback (most recent call last): > > File "<input>", line 1, in <module> > > File "<input>", line 3, in test > > File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 191, in figure > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py", > > line 1227, in draw_if_interactive > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wxagg.py", > > line 61, in draw > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > line 380, in draw > > File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 612, in draw > > File "C:\Python25\Lib\site-packages\matplotlib\axes.py", line 1344, in draw > > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 596, in draw > > File "C:\Python25\Lib\site-packages\matplotlib\axis.py", line 170, in draw > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 775, in draw > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 317, in draw > > File "C:\Python25\Lib\site-packages\matplotlib\text.py", line 195, > > in _get_layout > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > line 234, in get_text_width_height_descent > > File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py", > > line 301, in _get_agg_font > > RuntimeError: Could not open facefile > > C:\Python25\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf; > > Cannot_Open_Resource > > > |