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
(28) |
2
(11) |
3
(15) |
4
(11) |
5
(13) |
6
(33) |
7
(13) |
8
(9) |
9
(2) |
10
(9) |
11
(27) |
12
(5) |
13
(10) |
14
(6) |
15
(9) |
16
(4) |
17
(2) |
18
(19) |
19
(11) |
20
(9) |
21
(16) |
22
(16) |
23
(5) |
24
(2) |
25
(8) |
26
(2) |
27
(11) |
28
(10) |
29
(5) |
30
(1) |
31
(2) |
|
|
|
|
|
|
On Sun, Aug 3, 2008 at 20:29, Sandro Tosi <mat...@gm...> wrote: > On Sun, Aug 3, 2008 at 20:19, Charlie Moad <cw...@gm...> wrote: >> I was going to wait on John about the docs, but I went ahead and cut the >> 0.98.3 release. The sdist including the docs was 34MB, so I decided not to >> include them. This would also cause the binaries to be huge if we included >> them there as well. The source release is up/tagged and I will post >> binaries asap. > > Thanks a lot, Charlie!! I'm downloading the brand new tarball and I'll > upgrade the Debian package short after. While building (in a clean chroot) the package to upload in Debian, I noticed some errors at doc creation (I attach the complete log, it might help you to track the issue), something like: WARNING: /tmp/buildd/matplotlib-0.98.3/build/lib.linux-x86_64-2.5/matplotlib/axes.py:docstring of matplotlib.axes.Axes.acorr:35: (ERROR/3) Unexpected indentation. WARNING: <autodoc>:0: (ERROR/3) Unexpected indentation. WARNING: /tmp/buildd/matplotlib-0.98.3/build/lib.linux-x86_64-2.5/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases.FigureCanvasBase.stop_event_loop_default:8: (WARNING/2) Literal block expected; none found. WARNING: /tmp/buildd/matplotlib-0.98.3/doc/api/backend_qt4agg_api.rst:5: (WARNING/2) autodoc can't import/find module 'matplotlib.backends.backend_qt4agg', it reported error: "cannot import name QtCore",please check your spelling and sys.path WARNING: /tmp/buildd/matplotlib-0.98.3/doc/api/cbook_api.rst:9: (WARNING/2) error while formatting signature for matplotlib.cbook.Xlator: arg is not a Python function WARNING: /tmp/buildd/matplotlib-0.98.3/build/lib.linux-x86_64-2.5/matplotlib/pyplot.py:docstring of matplotlib.pyplot.acorr:55: (ERROR/3) Unexpected indentation. WARNING: /tmp/buildd/matplotlib-0.98.3/build/lib.linux-x86_64-2.5/matplotlib/pyplot.py:docstring of matplotlib.pyplot.annotate:17: (ERROR/3) Unexpected indentation. [...] resolving references... writing... Error: <stdin>:1: syntax error near line 1 context: digraph >>> inheritance <<< s { WARNING: /tmp/buildd/matplotlib-0.98.3/doc/index.rst:None: (WARNING/2) 'dot' returned the errorcode 1 WARNING: unusable reference target found: https://sourceforge.net/project/admin/?group_id=80706 Error: <stdin>:1: syntax error near line 1 context: digraph >>> inheritance <<< s { WARNING: /tmp/buildd/matplotlib-0.98.3/doc/index.rst:None: (WARNING/2) 'dot' returned the errorcode 1 Error: <stdin>:1: syntax error near line 1 context: digraph >>> inheritance <<< s { WARNING: /tmp/buildd/matplotlib-0.98.3/doc/index.rst:None: (WARNING/2) 'dot' returned the errorcode 1 Error: <stdin>:1: syntax error near line 1 context: digraph >>> inheritance <<< s { WARNING: /tmp/buildd/matplotlib-0.98.3/doc/index.rst:None: (WARNING/2) 'dot' returned the errorcode 1 I don't know if something bad has happened in mpl code or something in Debian is broken right now (graphviz?), but it would help me if someone can confirm this is not happening only on my box. Thanks, -- Sandro Tosi (aka morph, Morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi
Matplotlib 0.98.3 is now available for download. We are not pushing an additional 0.91.x release at this time due to lack of updates to that branch. http://sourceforge.net/project/showfiles.php?group_id=80706 - Charlie ================================================================= 2008年08月03日 Released 0.98.3 at svn r5947 2008年08月01日 Backported memory leak fixes in _ttconv.cpp - MGD 2008年07月31日 Added masked array support to griddata. - JSW 2008年07月26日 Added optional C and reduce_C_function arguments to axes.hexbin(). This allows hexbin to accumulate the values of C based on the x,y coordinates and display in hexagonal bins. - ADS 2008年07月24日 Deprecated (raise NotImplementedError) all the mlab2 functions from matplotlib.mlab out of concern that some of them were not clean room implementations. JDH 2008年07月24日 Rewrite of a significant portion of the clabel code (class ContourLabeler) to improve inlining. - DMK 2008年07月22日 Added Barbs polygon collection (similar to Quiver) for plotting wind barbs. Added corresponding helpers to Axes and pyplot as well. (examples/pylab_examples/barb_demo.py shows it off.) - RMM 2008年07月21日 Added scikits.delaunay as matplotlib.delaunay. Added griddata function in matplotlib.mlab, with example (griddata_demo.py) in pylab_examples. griddata function will use mpl_toolkits._natgrid if installed. - JSW 2008年07月21日 Re-introduced offset_copy that works in the context of the new transforms. - MGD 2008年07月21日 Committed patch by Ryan May to add get_offsets and set_offsets to Collections base class - EF 2008年07月21日 Changed the "asarray" strategy in image.py so that colormapping of masked input should work for all image types (thanks Klaus Zimmerman) - EF 2008年07月20日 Rewrote cbook.delete_masked_points and corresponding unit test to support rgb color array inputs, datetime inputs, etc. - EF 2008年07月20日 Renamed unit/axes_unit.py to cbook_unit.py and modified in accord with Ryan's move of delete_masked_points from axes to cbook. - EF 2008年07月18日 Check for nan and inf in axes.delete_masked_points(). This should help hexbin and scatter deal with nans. - ADS 2008年07月17日 Added ability to manually select contour label locations. Also added a waitforbuttonpress function. - DMK 2008年07月17日 Fix bug with NaNs at end of path (thanks, Andrew Straw for the report) - MGD 2008年07月16日 Improve error handling in texmanager, thanks to Ian Henry for reporting - DSD 2008年07月12日 Added support for external backends with the "module://my_backend" syntax - JDH 2008年07月11日 Fix memory leak related to shared axes. Grouper should store weak references. - MGD 2008年07月10日 Bugfix: crash displaying fontconfig pattern - MGD 2008年07月10日 Bugfix: [ 2013963 ] update_datalim_bounds in Axes not works - MGD 2008年07月10日 Bugfix: [ 2014183 ] multiple imshow() causes gray edges - MGD 2008年07月09日 Fix rectangular axes patch on polar plots bug - MGD 2008年07月09日 Improve mathtext radical rendering - MGD 2008年07月08日 Improve mathtext superscript placement - MGD 2008年07月07日 Fix custom scales in pcolormesh (thanks Matthew Turk) - MGD 2008年07月03日 Implemented findobj method for artist and pyplot - see examples/pylab_examples/findobj_demo.py - JDH 2008年06月30日 Another attempt to fix TextWithDash - DSD 2008年06月30日 Removed Qt4 NavigationToolbar2.destroy -- it appears to have been unnecessary and caused a bug reported by P. Raybaut - DSD 2008年06月27日 Fixed tick positioning bug - MM 2008年06月27日 Fix dashed text bug where text was at the wrong end of the dash - MGD 2008年06月26日 Fix mathtext bug for expressions like $x_{\leftarrow}$ - MGD 2008年06月26日 Fix direction of horizontal/vertical hatches - MGD 2008年06月25日 Figure.figurePatch renamed Figure.patch, Axes.axesPatch renamed Axes.patch, Axes.axesFrame renamed Axes.frame, Axes.get_frame, which returns Axes.patch, is deprecated. Examples and users guide updated - JDH 2008年06月25日 Fix rendering quality of pcolor - MGD
On Sun, Aug 3, 2008 at 20:19, Charlie Moad <cw...@gm...> wrote: > On Sun, Aug 3, 2008 at 10:25 AM, Sandro Tosi <mat...@gm...> wrote: >> John, when you can, please create an official point release: I'm ready >> to package it, and the Debian Release Team asked me to upload in >> unstable (the staging are before testing/Lenny) to evaluate its >> inclusion in Lenny (so faster is better :D) > > I was going to wait on John about the docs, but I went ahead and cut the > 0.98.3 release. The sdist including the docs was 34MB, so I decided not to > include them. This would also cause the binaries to be huge if we included > them there as well. The source release is up/tagged and I will post > binaries asap. Thanks a lot, Charlie!! I'm downloading the brand new tarball and I'll upgrade the Debian package short after. Cheers, -- Sandro Tosi (aka morph, Morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi
On Sun, Aug 3, 2008 at 10:25 AM, Sandro Tosi <mat...@gm...> wrote: > On Sun, Aug 3, 2008 at 10:54, Mikhail Gusarov <dot...@do...> > wrote: > > As Lenny is already in freeze, I backported fix to 0.4.1 and now trying > > to get the confirmation from release team to upload it to > > testing-proposed-updates. > > > > Please test the package: http://dottedmag.net/~mag/sphinx/ > > I tested the package and it works fine (didn't test in a chroot, but > it works with svn-bp). > > John, when you can, please create an official point release: I'm ready > to package it, and the Debian Release Team asked me to upload in > unstable (the staging are before testing/Lenny) to evaluate its > inclusion in Lenny (so faster is better :D) > > Thanks, > Sandro > > -- > Sandro Tosi (aka morph, Morpheus, matrixhasu) > My website: http://matrixhasu.altervista.org/ > Me at Debian: http://wiki.debian.org/SandroTosi > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > I was going to wait on John about the docs, but I went ahead and cut the 0.98.3 release. The sdist including the docs was 34MB, so I decided not to include them. This would also cause the binaries to be huge if we included them there as well. The source release is up/tagged and I will post binaries asap. - Charlie
On Sun, Aug 3, 2008 at 10:54, Mikhail Gusarov <dot...@do...> wrote: > As Lenny is already in freeze, I backported fix to 0.4.1 and now trying > to get the confirmation from release team to upload it to > testing-proposed-updates. > > Please test the package: http://dottedmag.net/~mag/sphinx/ I tested the package and it works fine (didn't test in a chroot, but it works with svn-bp). John, when you can, please create an official point release: I'm ready to package it, and the Debian Release Team asked me to upload in unstable (the staging are before testing/Lenny) to evaluate its inclusion in Lenny (so faster is better :D) Thanks, Sandro -- Sandro Tosi (aka morph, Morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi
I'm plotting a 2d array representing energy-energy covariances: ... # (create and fill the 2d Array, 'mat') ... pylab.matshow( mat, origin='lower', extent=(elist[0],elist[-1],elist[0],elist[-1]) ) http://www.nabble.com/file/p18798793/covars.png The 'extent' keyword puts the correct initial and final energies on the scale for my matrix, but the energy range in between is not linear: can I customize the scale further? Also, I'd really like to plot both x and y axes of the array in log... so far I haven't found documentation for this (pylab.loglog for example expects two 1D arrays for x and f(x) ) Note that the minimum value for the matrix is actually 10^-5 eV, the next point is at about 10^4 eV and it increases from there... so the current scale is misleading. Thanks for your help! Caleb -- View this message in context: http://www.nabble.com/scale-for-2d-array-tp18798793p18798793.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Patrick Marsh wrote: > Hi Jeff (and others): > > Sorry for the misunderstanding. After your second email the first > makes more sense. > > However, I still cannot figure out how to extract the lat,lon pairs > from the LineCollection object. Searching on the web and based on > Scott's suggestion from another email, I see that in the past you > could use a get_vertex() option. However it appears to have been > discontinued in mpl v 0.98.1. <http://0.98.1.> Scott: Sorry, you're right - it's far from obvious how to get the x,y coordinates pairs out of a LineCollection. Each contour has a 'collections' attribute that is a LineCollections object. The get_paths() method of the LineCollections object returns a list of a matplotlib.path.Path objects, each of which has a 'vertices' attribute. So, something like this works for me in 0.98: for xy in CS.collections[0].get_paths(): # get the paths for the first contour for xy in xy.vertices: # iterate over the Path objects # xy[0],xy[1] are the x,y coordinates # these are the lon,lat coords (map is the Basemap instance) lon, lat = map(xy[0],xy[1],inverse=True) > > I'm a relative newcomer to Python (less than 6 months) and even > greener when it comes to the inner workings of matplotlib. I'm sure > I'm going to kick myself when this is figured out... > > -Patrick No worries - don't kick yourself. Although matplotlib is quite easy to use in general, the 'inner workings' take a while to grok. -Jeff > > > On Sat, Aug 2, 2008 at 7:33 PM, Jeff Whitaker <js...@fa... > <mailto:js...@fa...>> wrote: > > Patrick Marsh wrote: > > Thanks for the quick reply. > > I may not have been totally clear on what I'm trying to save > (or I totally misunderstood what you were trying to say - > which is certainly possible). > > I'm not wanting to save the lat, lon pairs from the map > projection. I'm trying to save the lat, lon pairs of the > contour. Using my original example, if I'm plotting winds > every 5 m/s, I'm wanting to pull off the lat, lon pairs for > the 5 m/s contours. > > > Patrick: I know - that's what I was trying to explain. You can > get the x,y coordinates of the *contours* from the collections > attribute of the ContourSet object returned by contour. Then you > convert those x,y values back to lon,lat values using the Basemap > instance. > > -Jeff > > > I'll check out the website and see if I find anything there. > > -Patrick > > > > On Sat, Aug 2, 2008 at 6:13 PM, Jeff Whitaker > <js...@fa... <mailto:js...@fa...> > <mailto:js...@fa... <mailto:js...@fa...>>> wrote: > > Patrick Marsh wrote: > > Hi Everyone, > > First email here... > > I am plotting meteorological data using matplotlib and > basemap - and can do this just fine. However, I would > like to backout the coordinates being used for the > contours that are plotted. > > For example, if I were to contour windspeed every 5 m/s > and plot this (which I can do just fine), I would > like to > save a copy of the lat, lon pairs as a text file. > However, I cannot for the life of me figure out > how to do > this. I have a feeling it is pretty simple and I'm > just > over looking something that can do this. Any help > would > be appreciated. > > Thanks, > > -Patrick Marsh > Graduate Student > School of Meteorology > University of Oklahoma > > > Patrick: contour and contourf return a ContourSet object. > ContourSet.collections is a matplotlib LineCollection (for > contour) or a PolyCollection (for contourf). You can > retrieve > the x,y (map projection) coordinates from these, and > transfer > them back to lat/lon coordinates using the Basemap > instance via > > lons,lats = map(x,y,inverse=True) # map is a Basemap > instance. > > See > > http://matplotlib.sourceforge.net/doc/html/api/collections_api.html > for more info on matplotlib collection objects. > > HTH, > -Jeff > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with > Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > <http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>> > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > <mailto:Mat...@li... > <mailto:Mat...@li...>> > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- Jeffrey S. Whitaker Phone : (303)497-6313 > NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 > 325 Broadway Boulder, CO, USA 80305-3328 > > > > > > -- > Jeffrey S. Whitaker Phone : (303)497-6313 > NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 > 325 Broadway Boulder, CO, USA 80305-3328 > > -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328
Twas brillig at 20:40:17 31.07.2008 UTC+02 when mat...@gm... did gyre and gimble: ST> The doc compilation is fine, the show-inheritance is fixed, but ST> just a confirmation: what was the page with the "clickable" image? ST> I seem to remember 'api/artist_api.html' but now the image in it ST> doesn't allow to be "browsable". As Lenny is already in freeze, I backported fix to 0.4.1 and now trying to get the confirmation from release team to upload it to testing-proposed-updates. Please test the package: http://dottedmag.net/~mag/sphinx/ --
the vertex list should just be a list of two element tuples... which are the XY positions of the verticies.. For example here is a function I used to split up individual closed contours: -------------------------- def split_features(vertex_list): #This function takes a list of verticies and breaks #it into a list of shapes (ie a list of list of verticies) #splits occur where a lon or lat jump of greater than 2 degrees # is found... and given that most contouring algorithums #work across the x-cord and our resolution is 1 degree this works.. jump_loc=[0] for i in range(len(vertex_list)-1): lon_jump=vertex_list[i+1][0]-vertex_list[i][0] lat_jump=vertex_list[i+1][1]-vertex_list[i][1] if (abs(lon_jump) > 2.0) or (abs(lat_jump) > 2.0): jump_loc.append(i+1) jump_loc.append(len(vertex_list)-1) print jump_loc shapes=[] for i in range(len(jump_loc)-1): shapes.append(vertex_list[jump_loc[i]:jump_loc[i+1]]) return shapes ------------------ Dr Scott Collis Postdoctoral Researcher Centre for Australian Weather and Climate Research (CAWCR) Atmosphere and Land Observation and Assessment Group Australian Bureau of Meteorology Room 9.57 Level 9 700 Collins Street Docklands 3008 Desk: (+613) 96694766 MB: 0412177550 http://www.bom.gov.au/bmrc/wefor/staff/scollis/ ________________________________ Message: 3 Date: Sat, 2 Aug 2008 21:14:02 -0500 From: "Patrick Marsh" <mar...@gm...> Subject: Re: [Matplotlib-users] Retrieve Coordinates from Contour To: "Jeff Whitaker" <js...@fa...> Cc: matplotlib-users <mat...@li...> Message-ID: <ea0...@ma...> Content-Type: text/plain; charset="iso-8859-1" Hi Jeff (and others): Sorry for the misunderstanding. After your second email the first makes more sense. However, I still cannot figure out how to extract the lat,lon pairs from the LineCollection object. Searching on the web and based on Scott's suggestion from another email, I see that in the past you could use a get_vertex() option. However it appears to have been discontinued in mpl v 0.98.1. I'm a relative newcomer to Python (less than 6 months) and even greener when it comes to the inner workings of matplotlib. I'm sure I'm going to kick myself when this is figured out... -Patrick On Sat, Aug 2, 2008 at 7:33 PM, Jeff Whitaker <js...@fa...> wrote: > Patrick Marsh wrote: > >> Thanks for the quick reply. >> >> I may not have been totally clear on what I'm trying to save (or I totally >> misunderstood what you were trying to say - which is certainly possible). >> >> I'm not wanting to save the lat, lon pairs from the map projection. I'm >> trying to save the lat, lon pairs of the contour. Using my original >> example, if I'm plotting winds every 5 m/s, I'm wanting to pull off the lat, >> lon pairs for the 5 m/s contours. >> > > Patrick: I know - that's what I was trying to explain. You can get the > x,y coordinates of the *contours* from the collections attribute of the > ContourSet object returned by contour. Then you convert those x,y values > back to lon,lat values using the Basemap instance. > > -Jeff > >> >> I'll check out the website and see if I find anything there. >> >> -Patrick >> >> >> >> On Sat, Aug 2, 2008 at 6:13 PM, Jeff Whitaker <js...@fa... >> <mailto:js...@fa...>> wrote: >> >> Patrick Marsh wrote: >> >> Hi Everyone, >> >> First email here... >> >> I am plotting meteorological data using matplotlib and >> basemap - and can do this just fine. However, I would >> like to backout the coordinates being used for the >> contours that are plotted. >> >> For example, if I were to contour windspeed every 5 m/s >> and plot this (which I can do just fine), I would like to >> save a copy of the lat, lon pairs as a text file. >> However, I cannot for the life of me figure out how to do >> this. I have a feeling it is pretty simple and I'm just >> over looking something that can do this. Any help would >> be appreciated. >> >> Thanks, >> >> -Patrick Marsh >> Graduate Student >> School of Meteorology >> University of Oklahoma >> >> >> Patrick: contour and contourf return a ContourSet object. >> ContourSet.collections is a matplotlib LineCollection (for >> contour) or a PolyCollection (for contourf). You can retrieve >> the x,y (map projection) coordinates from these, and transfer >> them back to lat/lon coordinates using the Basemap instance via >> >> lons,lats = map(x,y,inverse=True) # map is a Basemap instance. >> >> See >> >> http://matplotlib.sourceforge.net/doc/html/api/collections_api.html >> for more info on matplotlib collection objects. >> >> HTH, >> -Jeff >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move >> Developer's challenge >> Build the coolest Linux based applications with Moblin SDK >> & win great prizes >> Grand prize is a trip for two to an Open Source event >> anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> -- Jeffrey S. Whitaker Phone : (303)497-6313 >> NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 >> 325 Broadway Boulder, CO, USA 80305-3328 >> >> >> >> > > -- > Jeffrey S. Whitaker Phone : (303)497-6313 > NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 > 325 Broadway Boulder, CO, USA 80305-3328 > > -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ------------------------------ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users End of Matplotlib-users Digest, Vol 27, Issue 10 ************************************************
Jonathan, If you did not get a response by now, you can try the following. import os# set HOME environment variable to a directory the httpd server can write to os.environ[ 'HOME' ] = 'c:/www/app/tmp/' Good luck. -Rodney _____ From: mat...@li... [mailto:mat...@li...] On Behalf Of "Jonathan Hayward, http://JonathansCorner.com" Sent: Friday, August 01, 2008 11:26 AM To: Matplotlib Subject: [Matplotlib-users] Crash on import with CGI wrapped by PHP--unhappywith .matplotlib directory? I have a PHP script which authenticates a user and I am trying to get the PHP script to wrap a Python script using matplotlib. As it is, the script mostly works when invoked from the command line or as its own CGI script. When I call it from a PHP script, it doesn't produce output, and testing found that when I call a Python script from a PHP script, output works before but not after "import matplotlib": if the PHP script calls a script of: #!/usr/bin/python print "Before import matplotlib." import matplotlib; print "After import matplotlib." the first print statement succeeds but the second one fails; the server log shows a crash of: Before import matplotlib.Traceback (most recent call last): File "/home/jhayward/bintmp/test.py", line 5, in <module> import matplotlib; File "/usr/lib64/python2.5/site-packages/matplotlib/__init__.py", line 639, in <module> rcParams = rc_params() File "/usr/lib64/python2.5/site-packages/matplotlib/__init__.py", line 562, in rc_params fname = matplotlib_fname() File "/usr/lib64/python2.5/site-packages/matplotlib/__init__.py", line 513, in matplotlib_fname fname = os.path.join(get_configdir(), 'matplotlibrc') File "/usr/lib64/python2.5/site-packages/matplotlib/__init__.py", line 207, in wrapper ret = func(*args, **kwargs) File "/usr/lib64/python2.5/site-packages/matplotlib/__init__.py", line 403, in _get_configdir raise RuntimeError("Failed to create %s/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data"%h) RuntimeError: Failed to create /root/.matplotlib; consider setting MPLCONFIGDIR to a writable directory for matplotlib configuration data I think this error is somewhat misleading; it persisted after I ran a "chmod -R 1777 /root/.matplotlib". What is the proper way to adjust things so matplotlib will be happy with its .matplotlib directory? -- -- Jonathan Hayward, chr...@gm... ** To see an award-winning website with stories, essays, artwork, ** games, and a four-dimensional maze, why not visit my home page? ** All of this is waiting for you at http://JonathansCorner.com ++ Would you like to curl up with one of my hardcover books? ++ You can now get my books from http://CJSHayward.com
Hi Jeff (and others): Sorry for the misunderstanding. After your second email the first makes more sense. However, I still cannot figure out how to extract the lat,lon pairs from the LineCollection object. Searching on the web and based on Scott's suggestion from another email, I see that in the past you could use a get_vertex() option. However it appears to have been discontinued in mpl v 0.98.1. I'm a relative newcomer to Python (less than 6 months) and even greener when it comes to the inner workings of matplotlib. I'm sure I'm going to kick myself when this is figured out... -Patrick On Sat, Aug 2, 2008 at 7:33 PM, Jeff Whitaker <js...@fa...> wrote: > Patrick Marsh wrote: > >> Thanks for the quick reply. >> >> I may not have been totally clear on what I'm trying to save (or I totally >> misunderstood what you were trying to say - which is certainly possible). >> >> I'm not wanting to save the lat, lon pairs from the map projection. I'm >> trying to save the lat, lon pairs of the contour. Using my original >> example, if I'm plotting winds every 5 m/s, I'm wanting to pull off the lat, >> lon pairs for the 5 m/s contours. >> > > Patrick: I know - that's what I was trying to explain. You can get the > x,y coordinates of the *contours* from the collections attribute of the > ContourSet object returned by contour. Then you convert those x,y values > back to lon,lat values using the Basemap instance. > > -Jeff > >> >> I'll check out the website and see if I find anything there. >> >> -Patrick >> >> >> >> On Sat, Aug 2, 2008 at 6:13 PM, Jeff Whitaker <js...@fa... >> <mailto:js...@fa...>> wrote: >> >> Patrick Marsh wrote: >> >> Hi Everyone, >> >> First email here... >> >> I am plotting meteorological data using matplotlib and >> basemap - and can do this just fine. However, I would >> like to backout the coordinates being used for the >> contours that are plotted. >> >> For example, if I were to contour windspeed every 5 m/s >> and plot this (which I can do just fine), I would like to >> save a copy of the lat, lon pairs as a text file. >> However, I cannot for the life of me figure out how to do >> this. I have a feeling it is pretty simple and I'm just >> over looking something that can do this. Any help would >> be appreciated. >> >> Thanks, >> >> -Patrick Marsh >> Graduate Student >> School of Meteorology >> University of Oklahoma >> >> >> Patrick: contour and contourf return a ContourSet object. >> ContourSet.collections is a matplotlib LineCollection (for >> contour) or a PolyCollection (for contourf). You can retrieve >> the x,y (map projection) coordinates from these, and transfer >> them back to lat/lon coordinates using the Basemap instance via >> >> lons,lats = map(x,y,inverse=True) # map is a Basemap instance. >> >> See >> >> http://matplotlib.sourceforge.net/doc/html/api/collections_api.html >> for more info on matplotlib collection objects. >> >> HTH, >> -Jeff >> >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move >> Developer's challenge >> Build the coolest Linux based applications with Moblin SDK >> & win great prizes >> Grand prize is a trip for two to an Open Source event >> anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> -- Jeffrey S. Whitaker Phone : (303)497-6313 >> NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 >> 325 Broadway Boulder, CO, USA 80305-3328 >> >> >> >> > > -- > Jeffrey S. Whitaker Phone : (303)497-6313 > NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 > 325 Broadway Boulder, CO, USA 80305-3328 > >
Hi Patrick, I had to deal with this as well as I used Matplotlib's contourer to return position of features (eg certain levels of vorticity or MSLP) instead of basemapping it I just made a contour from the lat lons (ie cs=countour(lats, lons, field, levels=linspace(min,max,nl)) --code---code-- def generate_contour(lat,lon,data,level): #This program uses the matplotlib contouring program to generate a list of #verticies at a constant contour level f=figure() C=contour(lon,lat,data, [level]) col=C.collections vertex_list=col[0].get_verts() close(f) return vertex_list --code--code--code-- Dr Scott Collis Postdoctoral Researcher Centre for Australian Weather and Climate Research (CAWCR) Atmosphere and Land Observation and Assessment Group Australian Bureau of Meteorology Room 9.57 Level 9 700 Collins Street Docklands 3008 Desk: (+613) 96694766 MB: 0412177550 http://www.bom.gov.au/bmrc/wefor/staff/scollis/ Message: 1 Date: Sat, 2 Aug 2008 16:53:40 -0500 From: "Patrick Marsh" <mar...@gm...> Subject: [Matplotlib-users] Retrieve Coordinates from Contour To: matplotlib-users <mat...@li...> Message-ID: <ea0...@ma...> Content-Type: text/plain; charset="iso-8859-1" Hi Everyone, First email here... I am plotting meteorological data using matplotlib and basemap - and can do this just fine. However, I would like to backout the coordinates being used for the contours that are plotted. For example, if I were to contour windspeed every 5 m/s and plot this (which I can do just fine), I would like to save a copy of the lat, lon pairs as a text file. However, I cannot for the life of me figure out how to do this. I have a feeling it is pretty simple and I'm just over looking something that can do this. Any help would be appreciated. Thanks, -Patrick Marsh Graduate Student School of Meteorology University of Oklahoma
Patrick Marsh wrote: > Thanks for the quick reply. > > I may not have been totally clear on what I'm trying to save (or I > totally misunderstood what you were trying to say - which is certainly > possible). > > I'm not wanting to save the lat, lon pairs from the map projection. > I'm trying to save the lat, lon pairs of the contour. Using my > original example, if I'm plotting winds every 5 m/s, I'm wanting to > pull off the lat, lon pairs for the 5 m/s contours. Patrick: I know - that's what I was trying to explain. You can get the x,y coordinates of the *contours* from the collections attribute of the ContourSet object returned by contour. Then you convert those x,y values back to lon,lat values using the Basemap instance. -Jeff > > I'll check out the website and see if I find anything there. > > -Patrick > > > > On Sat, Aug 2, 2008 at 6:13 PM, Jeff Whitaker <js...@fa... > <mailto:js...@fa...>> wrote: > > Patrick Marsh wrote: > > Hi Everyone, > > First email here... > > I am plotting meteorological data using matplotlib and > basemap - and can do this just fine. However, I would > like to backout the coordinates being used for the > contours that are plotted. > > For example, if I were to contour windspeed every 5 m/s > and plot this (which I can do just fine), I would like to > save a copy of the lat, lon pairs as a text file. > However, I cannot for the life of me figure out how to do > this. I have a feeling it is pretty simple and I'm just > over looking something that can do this. Any help would > be appreciated. > > Thanks, > > -Patrick Marsh > Graduate Student > School of Meteorology > University of Oklahoma > > > Patrick: contour and contourf return a ContourSet object. > ContourSet.collections is a matplotlib LineCollection (for > contour) or a PolyCollection (for contourf). You can retrieve > the x,y (map projection) coordinates from these, and transfer > them back to lat/lon coordinates using the Basemap instance via > > lons,lats = map(x,y,inverse=True) # map is a Basemap instance. > > See > http://matplotlib.sourceforge.net/doc/html/api/collections_api.html > for more info on matplotlib collection objects. > > HTH, > -Jeff > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > Jeffrey S. Whitaker Phone : (303)497-6313 > NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 > 325 Broadway Boulder, CO, USA 80305-3328 > > > -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328
Thank you Michael, I tried switching the matplotlib font to Dejavu Sans but it also does not seem to recognize the lunate epsilon ε. When I wrote title(u'ε-Fe'), it printed ε-Fe instead. I tried several other fonts but the problem did not disappear. It seems that the bes choice after all is to write r'$\rm{\epsilon-Fe}$'. Thanks again Eli On Thu, Jul 31, 2008 at 9:03 AM, Michael Droettboom <md...@st...> wrote: > (Sorry for the delay -- just back from vacation) > > It looks like the default Vera Sans font that matplotlib uses doesn't > actually have the lunate epsilon character. If you have it installed, you > could have matplotlib use the DejaVu Sans font instead (which is essentially > Vera Sans with a larger set of characters). > > In your matplotlibrc, set font.sans to DejaVu Sans > > Cheers, > Mike > > Eli Brosh wrote: > >> Thanks, >> This unicode thing works like magic. >> The only thing I am still unable to do is to insert the symbol \epsilon >> (as distinct from \varepsilon). >> For some reason, the varepsilon ε is printed fine, but a blank square is >> printed instead of the lunate epsilon ε. >> That is u' ε ' works, while u' ε' does not. >> >> Any idea why this is happening ? >> >> Eli >> >> >> 2008年7月22日 Michael Droettboom <md...@st... <mailto:md...@st...>>: >> >> Yes, you would put it at the top of your .py file. >> >> In order to use Unicode in Python source code, you have to tell >> the Python interpreter what encoding the file is in. That's done >> with a little "magic" comment at the top of the file. The popular >> Unixy editors (emacs, vim etc.) also understand this comment and >> will save the file correctly. Possibly other editors do as well. >> >> For more gory details that you probably need, see this: >> >> http://www.amk.ca/python/howto/unicode >> >> particularly the section "Unicode Literals in Python Source Code". >> >> >> Cheers, >> Mike >> >> Eli Brosh wrote: >> >> Thanks, >> This seems to be a solution. >> I have an editor that supports unicode. >> But, can you please explain better how do I make the coding >> directive at the top of my source files ? >> Where do I write the command: >> # -*- coding: utf-8 -*- >> >> Is it inside the python script ? >> >> >> Sorry for the ignorance. >> Eli >> >> On Tue, Jul 22, 2008 at 10:14 AM, Michael Droettboom >> <md...@st... <mailto:md...@st...> >> <mailto:md...@st... <mailto:md...@st...>>> wrote: >> >> As an alternative, you could just use Unicode to insert the >> Greek >> characters: >> >> r"α-Fe (Someone 2003)" >> >> The default font used by matplotlib, Vera Sans, includes a full >> set of Greek characters. This, of course, requires an >> editor that >> supports Unicode and a coding directive at the top of your >> source >> files, eg.: >> >> # -*- coding: utf-8 -*- >> >> >> Cheers, >> Mike >> >> Eli Brosh wrote: >> >> Here is the use case I have in mind: >> Plotting properties of various phases of iron, I need a >> legend >> with greek letters and normal text: >> \alpha-Fe, Someone (2003) >> >> Now, I need the names e.g. someone to be upright. >> Also, the relbar between \alpha and Fe is shorter with >> normal >> text fonts than with italics. >> >> I can solve the problem by using r'\rm{\alpha-Fe, Someone >> (2003)}' but it would be easier if I could just change the >> defaults. >> >> Eli >> >> >> On Mon, Jul 21, 2008 at 6:21 PM, Michael Droettboom >> <md...@st... <mailto:md...@st...> >> <mailto:md...@st... <mailto:md...@st...>> >> <mailto:md...@st... <mailto:md...@st...> >> <mailto:md...@st... <mailto:md...@st...>>>> wrote: >> >> Unfortunately there isn't. This is *theoretically* >> possible >> with >> the STIX fonts, but that hasn't been implemented. >> However, with >> the Computer Modern fonts, many of the glyphs simply >> aren't >> present (upright Greek, for example) to make this >> happen. >> >> That said, I'm not sure this is necessarily a good idea. >> Math has >> a set of commonly accepted conventions about when to >> use italic >> vs. upright that may only confuse the reader when >> not followed. >> Can you provide a use case? >> >> Cheers, >> Mike >> >> Eli Brosh wrote: >> >> Hello >> I there a way to change the default mathtext >> font from >> cal to rm ? >> I would like to use the rm (serif) font without >> stating >> rm{...} or mathrm{...}. >> Is it possible to do using the matplotlibrc ? >> can you give me an example of how this is done ? >> >> Thanks >> Eli >> >> ------------------------------------------------------------------------ >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin >> Your Move >> Developer's challenge >> Build the coolest Linux based applications with >> Moblin >> SDK & >> win great prizes >> Grand prize is a trip for two to an Open Source >> event >> anywhere >> in the world >> >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/> >> < >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>> >> < >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/> >> < >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>>> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> <mailto:Mat...@li... >> <mailto:Mat...@li...>> >> <mailto:Mat...@li... >> <mailto:Mat...@li...> >> <mailto:Mat...@li... >> <mailto:Mat...@li...>>> >> >> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> >> -- Michael Droettboom >> Science Software Branch >> Operations and Engineering Division >> Space Telescope Science Institute >> Operated by AURA for NASA >> >> >> >> -- Michael Droettboom >> Science Software Branch >> Operations and Engineering Division >> Space Telescope Science Institute >> Operated by AURA for NASA >> >> >> > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > >
Thanks for the quick reply. I may not have been totally clear on what I'm trying to save (or I totally misunderstood what you were trying to say - which is certainly possible). I'm not wanting to save the lat, lon pairs from the map projection. I'm trying to save the lat, lon pairs of the contour. Using my original example, if I'm plotting winds every 5 m/s, I'm wanting to pull off the lat, lon pairs for the 5 m/s contours. I'll check out the website and see if I find anything there. -Patrick On Sat, Aug 2, 2008 at 6:13 PM, Jeff Whitaker <js...@fa...> wrote: > >> Patrick Marsh wrote: >> >>> Hi Everyone, >>> >>> First email here... >>> >>> I am plotting meteorological data using matplotlib and basemap - and can >>> do this just fine. However, I would like to backout the coordinates being >>> used for the contours that are plotted. >>> >>> For example, if I were to contour windspeed every 5 m/s and plot this >>> (which I can do just fine), I would like to save a copy of the lat, lon >>> pairs as a text file. However, I cannot for the life of me figure out how >>> to do this. I have a feeling it is pretty simple and I'm just over looking >>> something that can do this. Any help would be appreciated. >>> >>> Thanks, >>> >>> -Patrick Marsh >>> Graduate Student >>> School of Meteorology >>> University of Oklahoma >>> >> >> Patrick: contour and contourf return a ContourSet object. >> ContourSet.collections is a matplotlib LineCollection (for contour) or a >> PolyCollection (for contourf). You can retrieve the x,y (map projection) >> coordinates from these, and transfer them back to lat/lon coordinates using >> the Basemap instance via >> >> lons,lats = map(x,y,inverse=True) # map is a Basemap instance. >> >> See http://matplotlib.sourceforge.net/doc/html/api/collections_api.htmlfor more info on matplotlib collection objects. >> >> HTH, >> -Jeff >> >> ------------------------------------------------------------------------ >>> >>> ------------------------------------------------------------------------- >>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>> challenge >>> Build the coolest Linux based applications with Moblin SDK & win great >>> prizes >>> Grand prize is a trip for two to an Open Source event anywhere in the >>> world >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> >> >> >> -- >> Jeffrey S. Whitaker Phone : (303)497-6313 >> NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 >> 325 Broadway Boulder, CO, USA 80305-3328 >> >> >