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
(10) |
2
(6) |
3
(13) |
4
(3) |
5
(10) |
6
(4) |
7
(2) |
8
(15) |
9
(10) |
10
(44) |
11
(17) |
12
(9) |
13
(2) |
14
(2) |
15
(4) |
16
(8) |
17
(13) |
18
(11) |
19
(12) |
20
|
21
|
22
(10) |
23
(10) |
24
(11) |
25
(11) |
26
(9) |
27
(1) |
28
|
29
(15) |
30
(14) |
31
(7) |
|
|
|
Phil Rasch wrote: > On Mon, Aug 22, 2005 at 12:55:16PM -1000, Eric Firing wrote: > >>(from phil:) > > .... stuff deleted ...... > >>Phil, Jeff, >> >>Yes, the present colorbar is designed for use with images, not with >>contourf, and fixing it (or making a new one) is something I have wanted >>to do for quite a while. I just haven't gotten to it yet. Prompted by >>your two emails, maybe I can at least take a close look during the next >>week to see what it would take. It might be easy--probably is. No >>promises yet, though. >> >>Eric > > > Thanks Eric, > > I also believe it should be easy to do. But it is better done by > somebody more familiar with matplotlib and python than I. I have > written such codes for other languages but need more practice before > I could do it elegantly in python. > > As long as you are digging around in there, can I have you think about > another couple features? > > 1) The best colorbars in my mind have "triangles" at the endpoints > that indicate the color for the region higher than the highest > contour, and lower than the lowest contours. This allows one to label > only the meaningful boundaries and not specify how much above or below > those regions. > > 2) I frequently need to set contour intervals (the filled region > boundaries) to be approximately logarithmic. But I dont want to have > these filled regions occupy a fraction of the colorbar proportional to > their fraction of the total interval. I want each region to be equal > area on the colorbar. > > An example of these features can be seen in the attached PNG figure > that I created in Yorick with a colorbar code I wrote. I havent tried > for beauty, but these figure are OK for for working plots. You can see > the point for the unequal contour intervals in the difference plot at > the bottom. > > For the codes I wrote this necessitated supplying arguments to the > colorbar function like.... > > colorbar(levs, colors) > where levels was an N element array, and colors was an N+1 element > list containing color info for each filled region. > > Thanks for listening. > > Phil >
On Mon, Aug 22, 2005 at 12:55:16PM -1000, Eric Firing wrote: > (from phil:) .... stuff deleted ...... > > Phil, Jeff, > > Yes, the present colorbar is designed for use with images, not with > contourf, and fixing it (or making a new one) is something I have wanted > to do for quite a while. I just haven't gotten to it yet. Prompted by > your two emails, maybe I can at least take a close look during the next > week to see what it would take. It might be easy--probably is. No > promises yet, though. > > Eric Thanks Eric, I also believe it should be easy to do. But it is better done by somebody more familiar with matplotlib and python than I. I have written such codes for other languages but need more practice before I could do it elegantly in python. As long as you are digging around in there, can I have you think about another couple features? 1) The best colorbars in my mind have "triangles" at the endpoints that indicate the color for the region higher than the highest contour, and lower than the lowest contours. This allows one to label only the meaningful boundaries and not specify how much above or below those regions. 2) I frequently need to set contour intervals (the filled region boundaries) to be approximately logarithmic. But I dont want to have these filled regions occupy a fraction of the colorbar proportional to their fraction of the total interval. I want each region to be equal area on the colorbar. An example of these features can be seen in the attached PNG figure that I created in Yorick with a colorbar code I wrote. I havent tried for beauty, but these figure are OK for for working plots. You can see the point for the unequal contour intervals in the difference plot at the bottom. For the codes I wrote this necessitated supplying arguments to the colorbar function like.... colorbar(levs, colors) where levels was an N element array, and colors was an N+1 element list containing color info for each filled region. Thanks for listening. Phil
I'm getting the following error: from matplotlib.pylab import * File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 709, in ? figimage.__doc__ = Figure.figimage.__doc__ + """ TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' " Any ideas what it might be and how I can get around it? Thanks, VJ
(from phil:) > I want to arrange the colorbar so that a very small number of colors > are displayed rather than the "continuous shading" that most of the > example plots are using. This lets viewers of the figure unambiguously > identify precisely the range of value in the filled region. (from Jeff:) > Note that that contourf is using 10 discrete colors to represent the > data, but the colorbar is showing all 256 colors in the colormap. Do > you know of any way to force the colorbar to show only those colors > that contourf uses? Phil, Jeff, Yes, the present colorbar is designed for use with images, not with contourf, and fixing it (or making a new one) is something I have wanted to do for quite a while. I just haven't gotten to it yet. Prompted by your two emails, maybe I can at least take a close look during the next week to see what it would take. It might be easy--probably is. No promises yet, though. Eric
Thanks for the suggestion I've now got lines through the origin. Do you = know of anyway to add tick marks and labels to those lines?=20 David >>> Vidar Gundersen <vid...@37...> 08/22/05 8:52 PM >>> =3D=3D=3D=3D=3D Original message from David Cameron | 2005年8月22日: > How can I create a plot with x and y axis (inc ticks and > labels) through the origin (0,0)? this is very similar to what i wanted to do in a recent post, see the thread titled "gridlines at 0,0 only", http://sourceforge.net/mailarchive/message.php?msg_id=3D12231581 the short version of it: props =3D dict(color=3D"black", linestyle=3D"--", linewidth=3D1) axvline(x=3D0, **props)=20 axhline(y=3D0, **props) thanks for asking, it would be a nice feature to have this as a stand-alone option for plot() or grid() commands. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle = Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users
===== Original message from David Cameron | 2005年8月22日: > How can I create a plot with x and y axis (inc ticks and > labels) through the origin (0,0)? this is very similar to what i wanted to do in a recent post, see the thread titled "gridlines at 0,0 only", http://sourceforge.net/mailarchive/message.php?msg_id=12231581 the short version of it: props = dict(color="black", linestyle="--", linewidth=1) axvline(x=0, **props) axhline(y=0, **props) thanks for asking, it would be a nice feature to have this as a stand-alone option for plot() or grid() commands.
Hello,=20 Thanks very much for matplotlib its fast becoming the main tool I use for = plotting! I'm fairly new to matplotlib so apologies if this seems like an obvious = question. I'm plotting a fairly standard scatter plot using plot.=20 something like....=20 plot(x,y,'kx')=20 and my data is normalised so ([-1,1],[-1,1]).=20 How can I create a plot with x and y axis (inc ticks and labels) through = the origin (0,0)? Many thanks for any help David=20 Dr David Cameron Centre for Ecology and Hydrology - Edinburgh Bush Estate Penicuik, Midlothian=20 EH26 0QB, UK Tel: +44/0 131 445-8577 Fax: -3943 Email: dc...@ce...
Phil Rasch wrote: >I need help for what ought to be a pretty simple task. I am a beginner >to matplotlib, and have only written a few hundred lines of python in >my life so please take it easy on me. > >I want to arrange the colorbar so that a very small number of colors >are displayed rather than the "continuous shading" that most of the >example plots are using. This lets viewers of the figure unambiguously >identify precisely the range of value in the filled region. > >To demonstrate the problem I have modified the contourf_demo.py >example script. > >Here is how I tried to set it up. > >I specify 5 contour levels. The enpoint contour levels actually >exceed the max and min values of the field. I expect 4 filled colors to >appear on the figure, and 3 red contour lines,. There should be 4 colors >on the colorbar. The endpoint of the range plotted on the colorbar >should be -0.2 and 0.1, with a color change every 0.1 (eg 4 colors). >No matter what I try (varying number of filled regions and varying >clim) something is wrong. > >I have tried everything I can think of to force this and it isnt >working. Can some kind sole suggest the fix? > >Here is the script > >Thanks > >Phil >-------------------------------------------------------- >#!/usr/bin/env python >from pylab import * >import matplotlib.numerix.ma as ma >origin = 'lower' >#origin = 'upper' > >delta = 0.03 >x = y = arange(-3.0, 3.01, delta) >X, Y = meshgrid(x, y) >Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) >Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) >Z = Z1 - Z2 >ZZ = reshape(Z,[1,len(Z)*len(Z)]) >print "rangeof Z", min(min(ZZ)), max(max(ZZ)) > >levs = [-.2,-.1,0.,0.1,0.2]; >cmap = cm.get_cmap('bone', len(levs)-1) > >levels, colls = contourf(X, Y, Z, levs, > cmap=cmap, > origin=origin) >print levels >levs2, colls2 = contour(X, Y, Z, levels, > colors = 'r',linewidths = 2, > origin=origin, > hold='on') > > >cb = colorbar(tickfmt='%1.3f') >clim(levs[0],levs[-1]) >#savefig('contourf_demo') >show() > > > Phil: I've often wanted to do this too. Here's my attempt at creating a custom colormap with 16 linear segments using LinearSegmentedColormap. The contour plot looks fine, but the colorbar looks wrong. Maybe someone on the list can see what I did wrong. -Jeff from numarray import * from pylab import * def make_colormap(cmapname,rgb): """create matplotlib cmap instance from list of rgb tuples (0-255)""" x = []; r = []; g = []; b = [] for n,xrgb in enumerate(rgb): if len(xrgb) > 3: # x is specified. x.append(float(xrgb[0])) r.append(float(xrgb[1])) g.append(float(xrgb[2])) b.append(float(xrgb[3])) else: # assume linear range for x. x.append(float(n+1)) r.append(float(xrgb[0])) g.append(float(xrgb[1])) b.append(float(xrgb[2])) x = array( x , Float) r = array( r , Float)/255. g = array( g , Float)/255. b = array( b , Float)/255. xNorm = (x - x[0])/(x[-1] - x[0]) red = [] blue = [] green = [] for i in range(len(x)): red.append([xNorm[i],r[i],r[i]]) green.append([xNorm[i],g[i],g[i]]) blue.append([xNorm[i],b[i],b[i]]) cdict = {'red':red, 'green':green, 'blue':blue} return cm.colors.LinearSegmentedColormap(cmapname,cdict,N=len(r)) def func3(x,y): return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2) if __name__ == '__main__': dx, dy = 0.05, 0.05 x = arange(-3.0, 3.0001, dx) y = arange(-3.0, 3.0001, dy) X,Y = meshgrid(x, y) Z = func3(X, Y) Z = Z - min(ravel(Z)) Z = Z - 0.5*max(ravel(Z)) # Green to Magenta in 16 steps from # http://geography.uoregon.edu/datagraphics/color_scales.htm rgb = [ ( 0, 80, 0), ( 0, 134, 0), ( 0, 187, 0), ( 0, 241, 0), ( 80, 255, 80), (134, 255, 134), (187, 255, 187), (255, 255, 255), (255, 241, 255), (255, 187, 255), (255, 134, 255), (255, 80, 255), (241, 0, 241), (187, 0, 187), (134, 0, 134), ( 80, 0, 80)] cmapname = 'GrMg_16' colormap = make_colormap(cmapname,rgb) l,c = contour (X, Y, Z, 15, linewidths=0.5,colors='k') l,c = contourf(X, Y, Z, 15, cmap=colormap,colors=None) colorbar() # segments on colorbar are not linear? title(cmapname) axis([-3,3,-3,3]) show() -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/CDC R/CDC1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
On Monday 22 August 2005 5:07 am, Eric Emsellem wrote: > Hi, > > the problem I mentioned regarding "stupid" Bounding Boxes in PS file in > my last post was in fact already known: > > - when using the option *text.usetex=True* in my matplotlibrc I should > have checked which version of ghostscript I was using since that option > requires to have a recent one. I had 7.07, and now switched to 8.51 > after downloading/compiling the version available on the web: my problem > is solved and my ps/eps files created with a savefig() in matplotlib > look great. > > Thanks a lot to Darren Dale for pointing out this to me, and sorry for > the trouble I caused. Hoping this post will help future beginners like me! No need to apologize. When I get a chance, I'll see if I can get MPL to check the ghostscript version and issue a warning if necessary. Darren
Hi, the problem I mentioned regarding "stupid" Bounding Boxes in PS file in my last post was in fact already known: - when using the option *text.usetex=True* in my matplotlibrc I should have checked which version of ghostscript I was using since that option requires to have a recent one. I had 7.07, and now switched to 8.51 after downloading/compiling the version available on the web: my problem is solved and my ps/eps files created with a savefig() in matplotlib look great. Thanks a lot to Darren Dale for pointing out this to me, and sorry for the trouble I caused. Hoping this post will help future beginners like me! Cheers Eric -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem ===============================================================
I need help for what ought to be a pretty simple task. I am a beginner to matplotlib, and have only written a few hundred lines of python in my life so please take it easy on me. I want to arrange the colorbar so that a very small number of colors are displayed rather than the "continuous shading" that most of the example plots are using. This lets viewers of the figure unambiguously identify precisely the range of value in the filled region. To demonstrate the problem I have modified the contourf_demo.py example script. Here is how I tried to set it up. I specify 5 contour levels. The enpoint contour levels actually exceed the max and min values of the field. I expect 4 filled colors to appear on the figure, and 3 red contour lines,. There should be 4 colors on the colorbar. The endpoint of the range plotted on the colorbar should be -0.2 and 0.1, with a color change every 0.1 (eg 4 colors). No matter what I try (varying number of filled regions and varying clim) something is wrong. I have tried everything I can think of to force this and it isnt working. Can some kind sole suggest the fix? Here is the script Thanks Phil -------------------------------------------------------- #!/usr/bin/env python from pylab import * import matplotlib.numerix.ma as ma origin = 'lower' #origin = 'upper' delta = 0.03 x = y = arange(-3.0, 3.01, delta) X, Y = meshgrid(x, y) Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) Z = Z1 - Z2 ZZ = reshape(Z,[1,len(Z)*len(Z)]) print "rangeof Z", min(min(ZZ)), max(max(ZZ)) levs = [-.2,-.1,0.,0.1,0.2]; cmap = cm.get_cmap('bone', len(levs)-1) levels, colls = contourf(X, Y, Z, levs, cmap=cmap, origin=origin) print levels levs2, colls2 = contour(X, Y, Z, levels, colors = 'r',linewidths = 2, origin=origin, hold='on') cb = colorbar(tickfmt='%1.3f') clim(levs[0],levs[-1]) #savefig('contourf_demo') show()
Derrick Snowden wrote: > Hi all, > > Recently, a sizable thread accrued focused on different installation > problems with matplotlib on Mac OSX. I largely ignored the thread > since I work on a Linux machine at work and had a windows machine at > home. Last week I pitched the Windows machine out the window and went > to the store to buy a Mac. > I don't want to abuse the good nature of the people on this list but I > was wondering if someone might have a pointer for a gentle intro to > Python on the Mac. If there is a good place to get some background I > might be able to avoid the standard newbie questions. For example I > dutifully installed Fink and have been using it to install some Python > packages. However I notice that the Python installation from fink > seems to be different than Python that comes with OSX Panther > (/Library/Python I think). I always hated having two versions of > Python on windows (the windows native port and the cygwin python) but > I saw no way around it. Should I anticipate having two python > installations on the mac as well? > Derrick: Just thought of another reason why I prefer the fink, unix-x11 environment - you can run matplotlib remotely via an ssh tunnel and have the plot display back on your computer. I use this a lot when working from home - ssh to the mac on my desk at work, run my script and have the plot display back on my home computer. Can't do that with an aqua native matplotlib, unless you use remote desktop or VNC. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/CDC R/CDC1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
Charles Moad wrote: > My 2 cents: > For ipython you MUST have readline which does not come by default with > osx. It is easy enough to install from this package: > http://pythonmac.org/packages/readline-5.0-py2.3-macosx10.3.zip > > Install this package, then you need to either: > 1) move readline.so from /Library/Python/2.3 to > /Library/Python/2.3/site-packages > 2) install http://pythonmac.org/packages/TigerPython23Compat.pkg.zip Thanks for this info. I hope you don't mind, I've copied it to the OSX section of the manual for the next release. Cheers, f
Derrick Snowden wrote: > someone might have a pointer for a gentle intro to > Python on the Mac. If there is a good place to get some background I > might be able to avoid the standard newbie questions. For example I > dutifully installed Fink and have been using it to install some Python > packages. However I notice that the Python installation from fink seems > to be different than Python that comes with OSX Panther (/Library/Python > I think). I always hated having two versions of Python on windows (the > windows native port and the cygwin python) but I saw no way around it. > Should I anticipate having two python installations on the mac as well? I think you've got the right impression, also reinforced by Jeff: fink (and/or darwinports) is a lot like cygwin on Windows: A parallel unix-like system. I think Jeff has laid out very well why you'd want to use it: If you want a system that is pretty much like you'd get with other unixes. However, what this means is that it really is kind of distinct from the rest of OS-X, fink stuff works with fink stuff, and OS-X stuff works with OS-X stuff. My feeling is that it's easiest if, for a given purpose (say, python development), you go either all fink or no fink, and not try to mix them. I'm going to give my opinion here as to what you should do: If you want a system that is much like what you're used to with Linux (and cygwin), then go all-fink. If you want to have your python work more integrated with OS-X (this is the approach I'm taking), then stick with the non-fink Python options: 1) subscribe to the python-mac mailing list: http://www.python.org/sigs/pythonmac-sig/ 2) Choose a version of Python. I'm assuming you have Tiger. It comes with python 3.2. You can use that, but I think more folks now are using Bob Ippolito's "official unofficial" 2.4.1 build: http://undefined.org/python/ (also install the TigerPython24Fix) 3) Get any packages you can from: http://pythonmac.org/packages/ If you can't get a package there, then you can usually it yourself. SciPy is a challenge in this regard, but most stuff is not too tough. I've contributed a build of matplotlib 0.82. In that package, I described how I did it, so if you want a newer version, you can build it yourself. If you do, please contribute it back to that repository, by posting to the pythonmac list. Install Py2App, and then use bdist_mpkg to build mac packages of any extension you build, and then contibute them to pythonmac.org As you are using other systems, I'd recomend wxPython (from pythonmac.org, or the wxPython site). It's not quite as maintained as PyGTK for matplotlib, but it works fine, and it's really the best option for cross platform development. For just the Mac, someone was working on a Cocoa back-end for matplotlib, you might want to look out for that. -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...
My 2 cents: I also dislike having two pythons installed, and I develop pretty much everything with the bundled apple framework. This also makes it easier come dependency time when moving your work to another mac. numeric/numarry/ipython are cake to install, "python setup.py install" For ipython you MUST have readline which does not come by default with osx. It is easy enough to install from this package: http://pythonmac.org/packages/readline-5.0-py2.3-macosx10.3.zip Install this package, then you need to either: 1) move readline.so from /Library/Python/2.3 to /Library/Python/2.3/site-packages 2) install http://pythonmac.org/packages/TigerPython23Compat.pkg.zip For building matplotlib you can just use fink's libpng and freetype, or install them from source to /usr/local. WX and Tk (and aggs) should work out of the box since both are included with tiger. This should be suffice for the setup you are wanting. Again, it is a personal preference and this is just my preferred approach. - Charlie Derrick Snowden wrote: > Hi all, > > Recently, a sizable thread accrued focused on different installation > problems with matplotlib on Mac OSX. I largely ignored the thread since > I work on a Linux machine at work and had a windows machine at home. > Last week I pitched the Windows machine out the window and went to the > store to buy a Mac. > I don't want to abuse the good nature of the people on this list but I > was wondering if someone might have a pointer for a gentle intro to > Python on the Mac. If there is a good place to get some background I > might be able to avoid the standard newbie questions. For example I > dutifully installed Fink and have been using it to install some Python > packages. However I notice that the Python installation from fink seems > to be different than Python that comes with OSX Panther (/Library/Python > I think). I always hated having two versions of Python on windows (the > windows native port and the cygwin python) but I saw no way around it. > Should I anticipate having two python installations on the mac as well? > > I guess what I'm asking for is not details on installation procedures > but rather a couple of comments on "best practices" from some of the > pros out there. > > My goal would be to have a working > python/numeric/numarry/ipython/matplotlib installation in the place that > is easiest to maintain. I'm not a bleeding edge sort of user however... > > Thanks for any comments... > Derrick > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Derrick, I would put a slightly different emphasis on what Jeff said. Matplotlib works just fine with MacPython. You'll need the Apple developer's tools and to build matplotlib with the usual 'sudo python setup.py install'. That's not to say that the effort of making a matplotlib package for Fink is not worthwhile: it is. But you do not *have* to use Fink's python to use matplotlib. Like Jeff said, MacPython can't use GTk (I think), while Fink's python can. Well, I haven't tried to get GTk to work. For GUI toolkits, WX works and Tk mostly works with MacPython. Of course, Numeric, numarray, and ipython work fine too. Cheers, --Matt
Derrick Snowden wrote: > Hi all, > > Recently, a sizable thread accrued focused on different installation > problems with matplotlib on Mac OSX. I largely ignored the thread > since I work on a Linux machine at work and had a windows machine at > home. Last week I pitched the Windows machine out the window and went > to the store to buy a Mac. > I don't want to abuse the good nature of the people on this list but I > was wondering if someone might have a pointer for a gentle intro to > Python on the Mac. If there is a good place to get some background I > might be able to avoid the standard newbie questions. For example I > dutifully installed Fink and have been using it to install some Python > packages. However I notice that the Python installation from fink > seems to be different than Python that comes with OSX Panther > (/Library/Python I think). I always hated having two versions of > Python on windows (the windows native port and the cygwin python) but > I saw no way around it. Should I anticipate having two python > installations on the mac as well? Derrick: I'm the fink maintainer for the python and matplotlib packages, so let me explain the logic here. The fink python is a unix-build, and is intended primarily as a more 'unix-friendly'alternative to the Apple provided framework build. For example, it allows developers to test both aqua-native and X11 versions of their software on the same box (by running their programs with fink python and Apple python). You can also run the gtk-agg backend with the fink version of python+matplotlib, which you can't with Apple python+matplotlib. I myself prefer the gtk-agg backend (it's the most actively maintained and updated), so that's why I use the fink matplotlib. > > I guess what I'm asking for is not details on installation procedures > but rather a couple of comments on "best practices" from some of the > pros out there. > > My goal would be to have a working > python/numeric/numarry/ipython/matplotlib installation in the place > that is easiest to maintain. I'm not a bleeding edge sort of user > however... 'fink install matplotlib-py24 ipython-py24' will get you all those packages in one shot with fink. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/CDC R/CDC1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
Hi all, Recently, a sizable thread accrued focused on different installation problems with matplotlib on Mac OSX. I largely ignored the thread since I work on a Linux machine at work and had a windows machine at home. Last week I pitched the Windows machine out the window and went to the store to buy a Mac. I don't want to abuse the good nature of the people on this list but I was wondering if someone might have a pointer for a gentle intro to Python on the Mac. If there is a good place to get some background I might be able to avoid the standard newbie questions. For example I dutifully installed Fink and have been using it to install some Python packages. However I notice that the Python installation from fink seems to be different than Python that comes with OSX Panther (/Library/Python I think). I always hated having two versions of Python on windows (the windows native port and the cygwin python) but I saw no way around it. Should I anticipate having two python installations on the mac as well? I guess what I'm asking for is not details on installation procedures but rather a couple of comments on "best practices" from some of the pros out there. My goal would be to have a working python/numeric/numarry/ipython/matplotlib installation in the place that is easiest to maintain. I'm not a bleeding edge sort of user however... Thanks for any comments... Derrick
On Friday 19 August 2005 6:37 am, Eric Emsellem wrote: > Hi, > doing a simple thing like: > > plot([0,1],[0,1]) > savefig('try.eps') > > I get a stupid (large) bounding box: > %%BoundingBox: 0 0 765 1214 > > (with a "ps" file I get: %%BoundingBox: 0 0 918 1299 which is even worse) > > ==> to be right I should either get something of the order of : 230 805 > 720 1180 > or have a very different positioning (and still a much smaller BB) > > I probably have a bad setup somewhere but could not find it. How can I > then obtain reasonable Bounding Boxes for my eps files (to be used in > papers..)? (I looked at the archived emails but did not find help there) I can't reproduce this here. Please post a complete script that sets any non-standard rc settings. Darren
Hi, doing a simple thing like: plot([0,1],[0,1]) savefig('try.eps') I get a stupid (large) bounding box: %%BoundingBox: 0 0 765 1214 (with a "ps" file I get: %%BoundingBox: 0 0 918 1299 which is even worse) ==> to be right I should either get something of the order of : 230 805 720 1180 or have a very different positioning (and still a much smaller BB) I probably have a bad setup somewhere but could not find it. How can I then obtain reasonable Bounding Boxes for my eps files (to be used in papers..)? (I looked at the archived emails but did not find help there) Thanks! Eric -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem ===============================================================
Hi, is there a way to get an image of a patch? I'd like to use patches to display Regions Of Interest and also use then use them as masks on the image for subsequent region based analysis. regards, Graeme ===== code snippet ====== #!/usr/bin/env python import wasabi, ugm import pylab # # 22-frames * 90-slices * 128-y * 128-x # dy = ugm.ugm('dy22.img') # # grab the 20th frame # vol = dy.vol([20]) # # returns a series of roi's that are defined as a set of vertices of a polygon # eg. # roi['cerebellum'] = numarray.array([[x0,y0], [x1,y1], ...., [xN, yN]]) # roi['caudate'] ... # roi = wasabi.roi('p2873s0_HAW_emdy22.xml') pylab.figure() ax = pylab.gca() n = 0 col = 'rgbcmyk' p = [] for fld in roi.keys() : # # draw the polygon regions as patches with transparency # p.append(ax.fill(roi[fld][:,0], roi[fld][:,1], col[n], alpha=0.5, linewidth=0)) pylab.hold(True) n += 1 #end for pylab.imshow(vol[45,:,:], cmap = pylab.cm.hot, origin = 'lower') print p # # is there a way to 'get' an array of pixels set in the patches p[0], p[1] so that they can be used as masks # on the image. #
On Thursday 18 August 2005 7:49 pm, Mark Bakker wrote: > Hello - > > I searched the mailing list, but couldn't find an answer. > > I want to vary the color (or width for that matter) of a line according to > an additional array of values. Very much like the 's' array in scatter > plot. In this fashion every (x0,y0), (x1,y1) segment has either a different > color or width. > > Can this be done easily, or should I just loop through my x,y array and > call plot every time with a different color/width? I always thought it would be really slick to present error bars with this kind of effect, so I would also like to know if it is possible.
>>>>> "Nils" == Nils Wagner <nw...@me...> writes: Nils> Hi all, The title is not illustrated but for what reason ? Hi Nils, This is a bug -- not sure what causes it yet. To make sure it doesn't fall through the cracks, would you mind submitting a sourceforge bug at http://sourceforge.net/tracker/?group_id=80706&atid=560720 ? Thanks for the report! JDH
Hello - I searched the mailing list, but couldn't find an answer. I want to vary the color (or width for that matter) of a line according to= =20 an additional array of values. Very much like the 's' array in scatter plot= . In this fashion every (x0,y0), (x1,y1) segment has either a different color= =20 or width. Can this be done easily, or should I just loop through my x,y array and cal= l=20 plot every time with a different color/width? Thanks, Mark
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> I am making a polar plot, and the ticklabels are Darren> overlapping the plot a little bit. I tried to compensate Darren> by increase the tick.major.pad rc setting, but it does not Darren> seem to be respected. Darren> Any suggestions on where to look for this? See ax.set_thetagrids, where ax is PolarAxes instance. In particular the "frac" arg. Note that your approach would be more consistent (eg respecting the tick pad) but this should work. JDH