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
(12) |
3
(12) |
4
(19) |
5
(7) |
6
(6) |
7
(2) |
8
(2) |
9
(11) |
10
(15) |
11
(27) |
12
(27) |
13
(18) |
14
(3) |
15
(3) |
16
(25) |
17
(9) |
18
(3) |
19
(4) |
20
(2) |
21
(4) |
22
(9) |
23
(28) |
24
(18) |
25
(16) |
26
(9) |
27
(4) |
28
(13) |
29
(15) |
30
(33) |
|
|
|
|
|
Thank you Jeff. I'll try out this solution. Gary. Jeff Whitaker wrote: <snip> > Gary: You might be able to use the _geoslib module to compute the > intersections of those polygons with the map boundary. I do a similar > thing with the coastline polygons in the _readboundarydata function. > The _boundarypolyll and _boundarypolyxy instance variables have the > vertices of the map projection region polygons in lat/lon and projection > coords. You could do somethig like this: > > from mpl_toolkits.basemap import _geoslib > poly = _geoslib.Polygon(b) # a geos Polygon instance > describing your polygon) > b = self._boundarypolyxy.boundary > bx = b[:,0]; by= b[:,1] > boundarypoly = _geoslib.Polygon(b) # a geos Polygon instance > describing the map region > if poly.intersects(boundarypoly): > geoms = poly.intersection(boundarypoly) > polygons = [] # polygon intersections to plot. > for psub in geoms: > b = psub.boundary # boundary of an intersection > polygons.append(zip(b[:,0],b[:,1])) > > -Jeff <snip>
> On Nov 3, 2009, at 3:08 PM, <PH...@ge...> > <PH...@ge... > > wrote: > > -----Original Message----- > > From: Tony S Yu [mailto:to...@MI...]> > >> Hi Paul, > >> > >> I think your matplotlibrc file should be put in: > >> /Users/paul/.matplotlib > >> > >> -Tony > > > > Thanks Tony, I'll give that a shot. Shouldn't keeping it in my > > current working directory work as well? One of the great things > > about using the matplotlibrc file on my Windows machine is that I > > can keep different files for different projects. -----Original Message----- From: Tony S Yu [mailto:to...@MI...] > (Paul, I hope you don't mind if I bring this bump this back to the > list). Not at all. I meant to reply to the whole list last time :) > Apparently I skimmed your original email and didn't see that you tried > putting the file in your working directory. That should work. (My > original response is still appropriate for a global rc file.) > > As suggested on the mpl website (specifically: > http://matplotlib.sourceforge.net/users/customizing.html > ), you can try printing out the path of the rc file being used by > adding the following to your script: > > >>> import matplotlib > >>> print matplotlib.matplotlib_fname() I missed this in my frustration last night (when I was last at my Mac). I'm confident that will be a huge help. > Also, you may want to check that the working directory is where you > think it is. For example, if you run a script from the terminal as: > > $ python ~/path/to/file.py > > Your working directory is '~' and not '~/path/to/'---so matplotlibrc > file located in the same directory as file.py would not be in the > working directory. Yeah. I've got all that part of it straightened out. I'll try everything tonight and post back tomorrow. > Otherwise, I have no idea why the matplotlibrc is not being found in > the working directory. Thanks, Tony. I really appreciate the help. -paul
On Nov 3, 2009, at 3:08 PM, <PH...@ge...> <PH...@ge... > wrote: > -----Original Message----- > From: Tony S Yu [mailto:to...@MI...]> >> Hi Paul, >> >> I think your matplotlibrc file should be put in: >> /Users/paul/.matplotlib >> >> -Tony > > Thanks Tony, I'll give that a shot. Shouldn't keeping it in my > current working directory work as well? One of the great things > about using the matplotlibrc file on my Windows machine is that I > can keep different files for different projects. (Paul, I hope you don't mind if I bring this bump this back to the list). Apparently I skimmed your original email and didn't see that you tried putting the file in your working directory. That should work. (My original response is still appropriate for a global rc file.) As suggested on the mpl website (specifically: http://matplotlib.sourceforge.net/users/customizing.html ), you can try printing out the path of the rc file being used by adding the following to your script: >>> import matplotlib >>> print matplotlib.matplotlib_fname() Also, you may want to check that the working directory is where you think it is. For example, if you run a script from the terminal as: $ python ~/path/to/file.py Your working directory is '~' and not '~/path/to/'---so matplotlibrc file located in the same directory as file.py would not be in the working directory. Otherwise, I have no idea why the matplotlibrc is not being found in the working directory. Best, -Tony
On Nov 3, 2009, at 1:11 PM, <PH...@Ge...> wrote: > Hey everyone, > > The existence of the matplotlibrc file is one reason I like MPL so > much. I won't go into the convoluted work flow I had for getting my > MATLAB figures completely processed in TeX, but it was nasty. > > On my Windows machine, I've used it with great success. But I can't > get my Mac (OS 10.5) to see it at all. I've put it in my current > working directory, in /Library/Frameworks/.../mpl_data, and in / > Users/paul. I've confirmed that those directories are in my sys.path > variable as well. Nothing seems to work. Hi Paul, I think your matplotlibrc file should be put in: /Users/paul/.matplotlib -Tony
Hey everyone, The existence of the matplotlibrc file is one reason I like MPL so much. I won't go into the convoluted work flow I had for getting my MATLAB figures completely processed in TeX, but it was nasty. On my Windows machine, I've used it with great success. But I can't get my Mac (OS 10.5) to see it at all. I've put it in my current working directory, in /Library/Frameworks/.../mpl_data, and in /Users/paul. I've confirmed that those directories are in my sys.path variable as well. Nothing seems to work. Mac OS 10.5 Python 2.6.2 MPL 0.99.1 Any advice? Thanks, Paul M. Hobson Senior Staff Engineer -- Geosyntec Consultants 55 SW Yamhill St, Ste 200 Portland, OR 97204 Phone: (503) 222-9518 Web: www.geosyntec.com
Gary Ruben wrote: > I'm plotting a coverage map of a sphere using the Mollweide plot in > basemap. The attachment is an example that is produced by sending an > array of polygons (one polygon per row described as four corners, one > per column) described using polar (theta) and azimuthal (phi) angles to > the following function. As a kludge, I discard any polygons that cross > the map boundary, but this produces artefacts and it would be better to > subdivide these and keep the parts. I was wondering whether there's a > function I missed that allows me to add polygons and performs the split > across the map boundary. > > Gary R. Gary: You might be able to use the _geoslib module to compute the intersections of those polygons with the map boundary. I do a similar thing with the coastline polygons in the _readboundarydata function. The _boundarypolyll and _boundarypolyxy instance variables have the vertices of the map projection region polygons in lat/lon and projection coords. You could do somethig like this: from mpl_toolkits.basemap import _geoslib poly = _geoslib.Polygon(b) # a geos Polygon instance describing your polygon) b = self._boundarypolyxy.boundary bx = b[:,0]; by= b[:,1] boundarypoly = _geoslib.Polygon(b) # a geos Polygon instance describing the map region if poly.intersects(boundarypoly): geoms = poly.intersection(boundarypoly) polygons = [] # polygon intersections to plot. for psub in geoms: b = psub.boundary # boundary of an intersection polygons.append(zip(b[:,0],b[:,1])) -Jeff > > def Mollweide(theta, phi): > def combinations(iterable, r): > ''' Python 2.6 itertools function''' > # combinations('ABCD', 2) --> AB AC AD BC BD CD > # combinations(range(4), 3) --> 012 013 023 123 > pool = tuple(iterable) > n = len(pool) > if r > n: > return > indices = range(r) > yield tuple(pool[i] for i in indices) > while True: > for i in reversed(range(r)): > if indices[i] != i + n - r: > break > else: > return > indices[i] += 1 > for j in range(i+1, r): > indices[j] = indices[j-1] + 1 > yield tuple(pool[i] for i in indices) > > > def boundary_crossed(pts): > crossed = False > for c in combinations(pts, 2): > if abs(c[0]-c[1])>180: > crossed = True > break > return crossed > > # Make Mollweide plot > m = Basemap(projection='moll', lon_0=0, resolution='c') > > # draw the edge of the map projection region (the projection limb) > m.drawmapboundary() > # draw lat/lon grid lines every 30 degrees. > m.drawmeridians(np.arange(0,360,30), dashes=[10,0]) > m.drawparallels(np.arange(-90,90,30), dashes=[10,0]) > > ax = plt.gca() # get current axes instance > for i in range(theta.shape[0]): > pts = np.vstack((theta[i], phi[i])).T > if boundary_crossed(pts[:,1]): > continue # skip polys that cross the map boundary > > polypts = [m(pt[1], pt[0]) for pt in pts] > poly = Polygon(polypts, facecolor="b", edgecolor="None", > alpha=0.5) > ax.add_patch(poly) > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
I'm plotting a coverage map of a sphere using the Mollweide plot in basemap. The attachment is an example that is produced by sending an array of polygons (one polygon per row described as four corners, one per column) described using polar (theta) and azimuthal (phi) angles to the following function. As a kludge, I discard any polygons that cross the map boundary, but this produces artefacts and it would be better to subdivide these and keep the parts. I was wondering whether there's a function I missed that allows me to add polygons and performs the split across the map boundary. Gary R. def Mollweide(theta, phi): def combinations(iterable, r): ''' Python 2.6 itertools function''' # combinations('ABCD', 2) --> AB AC AD BC BD CD # combinations(range(4), 3) --> 012 013 023 123 pool = tuple(iterable) n = len(pool) if r > n: return indices = range(r) yield tuple(pool[i] for i in indices) while True: for i in reversed(range(r)): if indices[i] != i + n - r: break else: return indices[i] += 1 for j in range(i+1, r): indices[j] = indices[j-1] + 1 yield tuple(pool[i] for i in indices) def boundary_crossed(pts): crossed = False for c in combinations(pts, 2): if abs(c[0]-c[1])>180: crossed = True break return crossed # Make Mollweide plot m = Basemap(projection='moll', lon_0=0, resolution='c') # draw the edge of the map projection region (the projection limb) m.drawmapboundary() # draw lat/lon grid lines every 30 degrees. m.drawmeridians(np.arange(0,360,30), dashes=[10,0]) m.drawparallels(np.arange(-90,90,30), dashes=[10,0]) ax = plt.gca() # get current axes instance for i in range(theta.shape[0]): pts = np.vstack((theta[i], phi[i])).T if boundary_crossed(pts[:,1]): continue # skip polys that cross the map boundary polypts = [m(pt[1], pt[0]) for pt in pts] poly = Polygon(polypts, facecolor="b", edgecolor="None", alpha=0.5) ax.add_patch(poly)
Unfortunately, I don't think something like cone plots can be easily done with current matplotlib. I guess you can define custom projection and such, as in the example below http://matplotlib.sourceforge.net/examples/api/custom_projection_example.html but this will involve some (maybe a lot) coding + some knowledge of mpl internals. With the experimental curvelinear coordinate support in axes_grid toolkit (and with yet-to-be-committed patch), one can draw very basic cone plot (see the attached). However, the current support is far from complete. I'm willing to make it better, but I'm afraid that this may not happen in a near future (likely not in this year). Of course, you can try to plot everything (axes boundary, ticks, ticklabels etc.) manually if you want, and maybe this is the best way currently available. Regards, -JJ On Sat, Oct 31, 2009 at 4:15 AM, ifriad <if...@gm...> wrote: > > Hi, > Does any one knows how to do those cone plots, > > I am attaching a sample plot. > > Thanks Ihab > http://old.nabble.com/file/p26140834/cone.png cone.png > -- > View this message in context: http://old.nabble.com/cone-plots-tp26140834p26140834.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On Mon, Nov 2, 2009 at 10:52 PM, David Sanders <dps...@gm...> wrote: > from pylab import * > > ion() > > N = 1000 > pos = zeros((N,2)) > > figure(figsize=(8,8)) > points, = plot(pos[:,0], pos[:,1], ',') > axis([-20,20,-20,20]) > > for t in range(1000): > > pos += uniform(-1,1,N*2).reshape(N,2) > points.set_data(pos[:,0].copy(), pos[:,1].copy()) > draw() The Line2D object keeps the input data as a cache and only update it (recache) if the new data is different than the cached one. The problem in this particular case is that the cache is actually a *pos* itself. And modifying the pos in place, actually modify the cache in the Line2D object. Thus, set_data sees that the given data is identical to the cached one, and skip the recaching. I'm not sure what is the best approach here, and I defer the fix (or not) to others. Meanwhile, you can force the recaching with recache method. i.e., call points.recache() after set_data. You don't need to make a copy also. As a matter of fact, I think it will give you a best performance (but not tested) if you directly update the cached data and do not call set_data. Note that in this particular case, pos == cache, so you actually don't need to call get_data, but this is not a general case. posx, posy = points.get_data(orig=True) for t in range(100): dx, dy = uniform(-1,1,N*2).reshape(2, N) # note the change in the shape posx += dx posy += dy points.recache() draw() Regards, -JJ
Hi, I have a problem with draw() to do simple animations of the contents of arrays in matplotlib. I was trying to use the idea in the animations cookbook ( http://www.scipy.org/Cookbook/Matplotlib/Animations) to animate some "random walkers", but found that the animation did not work. A minimal example of the problem is given by changing the first recipe in the cookbook to just draw random arrays. This version correctly animates as expected: from pylab import * import time ion() tstart = time.time() # for profiling x = rand(100) y = rand(100) line, = plot(x,y, ',') for i in arange(1,200): x = rand(100) y = rand(100) line.set_data(x,y) draw() # redraw the canvas Now, however, changing the "x =" and "y =" lines as follows: x[:] = rand(100) y[:] = rand(100) so that they are modified in place, rather than creating new arrays, no longer animates anything. I am using version 0.99 on linux (Kubuntu 9.10). The same behaviour is found from within ipython -pylab or from the command line with python. In my real application, I wish to use this as a simple way to animate a collection of random walkers. I thus have an array of positions which is updated at every step, and this is what I want to animate, which is the reason why I tried the array updating step above. So far, my code is as follows: from pylab import * ion() N = 1000 pos = zeros((N,2)) figure(figsize=(8,8)) points, = plot(pos[:,0], pos[:,1], ',') axis([-20,20,-20,20]) for t in range(1000): pos += uniform(-1,1,N*2).reshape(N,2) points.set_data(pos[:,0].copy(), pos[:,1].copy()) draw() The ".copy()" are an attempt at creating new arrays. Nonetheless, there is no animation. And if I put points._x in ipython, then it still has all zeros! Apparently the .set_data() hasn't done anything. Any help at getting this animation to work are greatly appreciated! Thanks and best wishes, David.
Does the egg at: http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/ matplotlib-0.99.1.1-py2.5-macosx-10.3-i386.egg not work for you? the 10.3 means "10.3 or greater", and I'm pretty sure it is Universal, rather than just i386 as well. It should work with the python.org Python 2.5 there is: matplotlib-0.99.1.1-py2.6-macosx-10.3-fat.egg for Python 2.6 I haven't had to compiled MPL is a good while. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
Hello All I did everything as Pierre suggested. But after using setup.py this is what I am getting "error: command 'gcc-4.0' failed with exit status 1" Anyone familiar with this bug On Nov 2, 2009, at 12:42 PM, Pierre de Buyl wrote: > Hello, > > >> There are multiple versions still existing on my computer. How can I >> clean up and install the latest version? Thank you all so much > You need to check the different paths accessed by Python. > >>> import sys > >>> print sys.path > and remove the possible matplotib files in these paths. Typically, > this includes /usr/lib/python2.6/site-packages, /usr/local/ > lib/..., /opt/lib/..., /sw/lib/... (on mac) > > Then, download the .tar.gz file from matplotlib website, uncompress > and in the folder run > $ python setup.py build > > That command will check dependencies before building, indicating > what is needed. > > If some dependencies are not met, I suggest to use a package > manager to install them. I use Fink on OS 10.4.11 with no problem, > but I am still at Python 2.5 running matplotlib 1.0.svn . > > Pierre > > > Le 2 nov. 09 à 20:11, R. Mitra a écrit : > >> Hello Again >> Since I got no replies for my last question and figuring that it >> must be a problem with numpy (as Eric pointed out) I now have running >> python 2.6.4 and numpy 1.3.0 on OSX 10.4.11. Is there a need to >> uninstall previous matplotlib and reinstall it again? This page >> sounds pretty complicated for me: http://matplotlib.sourceforge.net/ >> users/installing.html#build-osx? >> Mitra >> >> --------------------------------------------------------------------- >> --------- >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. >> Jumpstart your >> developing skills, take BlackBerry mobile applications to market >> and stay >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >