Re: [Matplotlib-users] Projection Direction Distortion
Hi Jody, Thanks for getting in touch. My reply in line also: On 26/04/13 18:34, Jody Klymak wrote: Not clear how a direction is given as a lon lat. Do you mean you have a set of vectors, each defined as lon/lat pairs? My usage is to examine boundary conditions for a spectral wave model. Thus, I have data points at locations given in**geographic coordinates with bearings to describe the wave directions. It depends on what you want - if you want the arrow to point where the wind would go after X minutes, then you want the "distortion". If you want the viewer to be able to pick off the geographic heading by eye, then simply convert your lon lat pairs to heading/length pairs and plot them in the axis frame. See http://matplotlib.org/basemap/users/mapcoords.html for how to convert from basemap to the underlying axis frame. To clarify, the wave model I am using demands wave directions in the projection of the grid which is being used, and I am trying to figure out if I need to change the inputs to the wave model, using basemap as an indicator, potentially a pre-processor. In fact, I'm having a bit of a intellectual crisis trying to understand what an instantaneous wave direction is and whether such a thing should be effected by the projection it is in! In an ideal world your projection would not be over such a large area that any of this matters - if your vector is off by 1 degree, who will be able to tell in a plot? In the plots and also in the model, I think it will make very little difference to the outputs. However, I am very interested in quantification of uncertainty and therefore I want to demonstrate that it could (should the directions need adjustment) make a difference to the results, particularly if you were a bit slack with your choice of grid projection. Thanks again for your help and I'm sorry if this is a little "off topic", but I know basemap users are a smart bunch to consult with. :) All the best, Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King's Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Projection Direction Distortion
Dear all, I have a set of wave directions in lon lat, but I want to display them in a UTM type projection. I believe the directions will be distorted, but I'm not sure by how much. Does anyone know of a method for calculating new directions under a projection change? Thanks again for your help, Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] AnchoredSizeBar Color
Hi, Is there anyway to set the color of an AnchoredSizeBar artist from the mpl_toolkits.axes_grid.anchored_artists toolkit? Thanks, Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Basemap datum assumption
Hello all, I have a quick question regarding the datum assumption when entering lon/lat data into a Basemap object. My understanding is that Basemap will use the datum specified upon creation, the default being a sphere of radius 6,370,997 meters and assume that the lon, lat entered in a call follows the same convention. Then, if you have lon lat which uses a different datum to the projection of the basemap you must convert this to lon/lat in the correct datum *before* then converting to projection coordinates using the basemap object. Is that correct? Assuming my understanding above is correct, I don't feel that this process is made clear in the documentation for basemap and I'm sure many make the mistake of thinking of lon/lat as an absolute across all geodetic standards. I know ignorance is not an excuse, but it might be nice if people got a more explicit warning to take care with their inputs. For reference, I found this blog which describes the datum mistake nicely: http://ragrawal.wordpress.com/2009/01/24/a-point-about-latitudelongitude Kindest regards, Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King's Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Why is pip not mentioned in the Installation Documentation?
Neal, thanks for the warning. I found the thread of your discussion here actually: http://lists.fedoraproject.org/pipermail/devel/2012-February/162496.html It's very interesting. My feeling would be that a PyPI fedora repository would make the most sense - much like the current Fedora TexLive2012 testing repository - but obviously this is no small job. "python setup.py install" doesn't have similar issues, I take it? Mat On 20/11/12 11:40, Neal Becker wrote: The problem is that pip packages something as a dir where easy_install packages as a file, or vice-versa. Then when you update, cpio will fail (doesn't know how to replace a dir with a file, or vice-versa). Next, the entire installation will abort Leaving you with a mess. I understand it's possible to manually then fix this mess using (some obscure) yum incantations, but I don't recall what. Usually at this point I wipe the disc. This has happened to me multiple times on multiple machines, and was discussed at some length on fedora-dev list maybe 1 year ago. The basic message was that I shouldn't use pip to install into the system dirs. But even using pip --user is not answer, because pip will see that e.g., matplotlib wants a newer version of pytz, and will attempt to remove the system pytz (and fail and abort). The only reliable approach is virtualenv. Not really very satisfactory. On Tue, Nov 20, 2012 at 6:02 AM, Mathew Topper <mailto:mathew.top...@ed.ac.uk>> wrote: Hi Neal, Is that due to conflicting package versions? I haven't suffered any particular issues like this yet, but it seems to me that pip would be improved if it interacted better with the environment it was in. How hard would it be to get pip to interact with yum and apt, for instance, to get valid binaries and/or devel files? I can't help thinking that Latex packaging is very similar, in that linux distributions often struggle to keep up, which I guess is why TexLive started. And then to complicate matters further, our sys admin said he didn't like pip as he would rather generate RPMs, in order that there is not a lot of work to do for system rebuilds in our labs. I found pypi2rpm, but that looks pretty bleeding edge and I think I'm getting out of my depth as a humble scientist. Mat On 19/11/12 12:59, Neal Becker wrote: Mathew Topper wrote: Hi, I'm interested to know why the pip package manager is not more widely supported for installation of python packages like matplotlib? Matplotlib seems to be particularly slowly updated in the Fedora repositories, for example, so I often find that a source installation is necessary. I know this isn't especially difficult for the experienced user, but surely using something like pip would make this process for accessible for all users of python packages, particularly those that do not receive much attention from the big distribution maintainers? Yet, pip doesn't get a mention on the installation documentation of matplotlib or many other python packs. I would love to hear anyone's thoughts on this matter. Many Thanks, Mat It is dangerous to use pip on fedora, it may result in your next attempt to update the system failing horribly. If you use it, try to install with --user. Unfortunately, this often won't work because pip will then complain when attempting to remove a system version of some dep. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net <mailto:Matplotlib-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top.
Re: [Matplotlib-users] Why is pip not mentioned in the Installation Documentation?
Hi Neal, Is that due to conflicting package versions? I haven't suffered any particular issues like this yet, but it seems to me that pip would be improved if it interacted better with the environment it was in. How hard would it be to get pip to interact with yum and apt, for instance, to get valid binaries and/or devel files? I can't help thinking that Latex packaging is very similar, in that linux distributions often struggle to keep up, which I guess is why TexLive started. And then to complicate matters further, our sys admin said he didn't like pip as he would rather generate RPMs, in order that there is not a lot of work to do for system rebuilds in our labs. I found pypi2rpm, but that looks pretty bleeding edge and I think I'm getting out of my depth as a humble scientist. Mat On 19/11/12 12:59, Neal Becker wrote: Mathew Topper wrote: Hi, I'm interested to know why the pip package manager is not more widely supported for installation of python packages like matplotlib? Matplotlib seems to be particularly slowly updated in the Fedora repositories, for example, so I often find that a source installation is necessary. I know this isn't especially difficult for the experienced user, but surely using something like pip would make this process for accessible for all users of python packages, particularly those that do not receive much attention from the big distribution maintainers? Yet, pip doesn't get a mention on the installation documentation of matplotlib or many other python packs. I would love to hear anyone's thoughts on this matter. Many Thanks, Mat It is dangerous to use pip on fedora, it may result in your next attempt to update the system failing horribly. If you use it, try to install with --user. Unfortunately, this often won't work because pip will then complain when attempting to remove a system version of some dep. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King's Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Why is pip not mentioned in the Installation Documentation?
Thanks Mike, that's good to know. Will packages dependant on matplotlib (I'm thinking of basemap) be encouraged to follow suit? I know that python package management is a massive headache for our system maintainers here, and any simplification would be gratefully received. Cheers, Mat On 16/11/12 13:59, Michael Droettboom wrote: One of the reasons (historically) is that the build scripts predate setuptools and ships copies of dependencies rather than using easy_install or pip to install them. There is an open PR to address this here: https://github.com/matplotlib/matplotlib/pull/1454 But you do make a good point that `pip` should be mentioned in the docs as part of that change. Mike On 11/16/2012 05:54 AM, Mathew Topper wrote: Hi, I'm interested to know why the pip package manager is not more widely supported for installation of python packages like matplotlib? Matplotlib seems to be particularly slowly updated in the Fedora repositories, for example, so I often find that a source installation is necessary. I know this isn't especially difficult for the experienced user, but surely using something like pip would make this process for accessible for all users of python packages, particularly those that do not receive much attention from the big distribution maintainers? Yet, pip doesn't get a mention on the installation documentation of matplotlib or many other python packs. I would love to hear anyone's thoughts on this matter. Many Thanks, Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King's Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Matplotlib-users mailing list https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King's Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Why is pip not mentioned in the Installation Documentation?
Hi, I'm interested to know why the pip package manager is not more widely supported for installation of python packages like matplotlib? Matplotlib seems to be particularly slowly updated in the Fedora repositories, for example, so I often find that a source installation is necessary. I know this isn't especially difficult for the experienced user, but surely using something like pip would make this process for accessible for all users of python packages, particularly those that do not receive much attention from the big distribution maintainers? Yet, pip doesn't get a mention on the installation documentation of matplotlib or many other python packs. I would love to hear anyone's thoughts on this matter. Many Thanks, Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King's Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 2D array plot picking explicit values to colour and legend
Hi Eric, thanks for the tip about the legend. Regarding the data, assuming i am using pcolor, am I right in thinking that using Boundarynorm would be the best way to control the colors for each code? Thanks Mat On 04/09/2012 06:26 PM, Eric Firing wrote: On 04/09/2012 02:22 AM, Mathew Topper wrote: Dear matplotlib-users, I have a spatial data set that has coded values for each cell, which are limited to just a few numbers, ie -, 0, 100, and . I would like to display this data with a plot similar to pcolor, but I don't want a colorbar, I want a legend showing the colors for each code and an explanation for what each code represents. I would like to be able to choose a subset of the codes as well, for example just plotting the 0 and 100 codes and ignoring the - and codes. I have seen a few similar attempts that used BoundaryNorm, but I don't want to show a range of values I just want to set colors for a few explicit values. Those examples also had a colorbar and, as I said, I would prefer a legend. Can anyone offer any tips? For the plot itself you can use pcolor if your data are on a quadrilateral grid, or a PathCollection or PolyCollection otherwise. For the legend, you can use proxy artists: http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist Eric Thanks Mat -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King's Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 2D array plot picking explicit values to colour and legend
Dear matplotlib-users, I have a spatial data set that has coded values for each cell, which are limited to just a few numbers, ie -, 0, 100, and . I would like to display this data with a plot similar to pcolor, but I don't want a colorbar, I want a legend showing the colors for each code and an explanation for what each code represents. I would like to be able to choose a subset of the codes as well, for example just plotting the 0 and 100 codes and ignoring the - and codes. I have seen a few similar attempts that used BoundaryNorm, but I don't want to show a range of values I just want to set colors for a few explicit values. Those examples also had a colorbar and, as I said, I would prefer a legend. Can anyone offer any tips? Thanks Mat -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Could basemap plot in a UTM projection? - pyproj documentation
On 02/04/12 16:21, Jeff Whitaker wrote: On 4/2/12 9:10 AM, Mathew Topper wrote: Hi, I've been trawling round the internet for a while trying to work out if basemap could be made to plot using a UTM zone projection. I've found some references to pyproj that could be used to convert out of a UTM projection, but I haven't found any references to defining a custom projection for basemap. Is it possible? Also, there is not a lot of documentation regarding pyproj and I find this a little odd considering it comes packaged with basemap. Many Thanks, Mat Mat: Basemap can plot in the tranverse mercator projection (projecton='tmerc') - UTM zones are transverse mercator with specific lat/lon boundaries and a WGS84 ellipsoid. I suppose I could add UTM zone support if there is enough demand for it. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX: (303)497-6449 NOAA/OAR/PSD R/PSD1Email :jeffrey.s.whita...@noaa.gov 325 BroadwayOffice : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web:http://tinyurl.com/5telg Sorry, somehow the bottom of the last email I sent was in a funny format. Sorry to everyone for spamming this, but just in case it wasn't legible, here it is again OK, thanks Jeff. So I just need to know the lon/lat bounds of the desired UTM zone and I have effectively created a UTM projection of that zone in basemap i.e. for UTM29 we have 12W to 6W. Will basemap then except coordinates in meters defined by UTM29 or do I have to convert to lon/lat first? I have a bit of an interesting case where the region we are examining lies between UTM29 and UTM30, and I was interested in displaying how the change in projection effects the topography. Thanks Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Could basemap plot in a UTM projection? - pyproj documentation
On 02/04/12 16:21, Jeff Whitaker wrote: On 4/2/12 9:10 AM, Mathew Topper wrote: Hi, I've been trawling round the internet for a while trying to work out if basemap could be made to plot using a UTM zone projection. I've found some references to pyproj that could be used to convert out of a UTM projection, but I haven't found any references to defining a custom projection for basemap. Is it possible? Also, there is not a lot of documentation regarding pyproj and I find this a little odd considering it comes packaged with basemap. Many Thanks, Mat Mat: Basemap can plot in the tranverse mercator projection (projecton='tmerc') - UTM zones are transverse mercator with specific lat/lon boundaries and a WGS84 ellipsoid. I suppose I could add UTM zone support if there is enough demand for it. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX: (303)497-6449 NOAA/OAR/PSD R/PSD1Email :jeffrey.s.whita...@noaa.gov 325 BroadwayOffice : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web:http://tinyurl.com/5telg OK, thanks Jeff. So I just need to know the lon/lat bounds of the desired UTM zone and I have effectively created a UTM projection of that zone in basemap i.e. for UTM29 we have 12W to 6W. Will basemap then except coordinates in meters defined by UTM29 or do I have to convert to lon/lat first? I have a bit of an interesting case where the region we are examining lies between UTM29 and UTM30, and I was interested in displaying how the change in projection effects the topography. Thanks Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Could basemap plot in a UTM projection? - pyproj documentation
Hi, I've been trawling round the internet for a while trying to work out if basemap could be made to plot using a UTM zone projection. I've found some references to pyproj that could be used to convert out of a UTM projection, but I haven't found any references to defining a custom projection for basemap. Is it possible? Also, there is not a lot of documentation regarding pyproj and I find this a little odd considering it comes packaged with basemap. Many Thanks, Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Using basemap to generate xyz format files from netcdf files
Perfect, Jeff, thanks very much. I guess something like this is hiding in the documentation somewhere, but I must have failed to find it. All the best, Mat On 20/01/12 13:10, Jeff Whitaker wrote: > On 1/20/12 3:12 AM, Mathew Topper wrote: >> Hi Jeff, >> >> Sorry, an XYZ file is simply an ASCII file which can have either >> LON,LAT,HEIGHT entries or Cartesian X,Y,HEIGHT entries. I think I >> have confused myself a little here, as all I need to do is print the >> LON,LAT,HEIGHT data to a file and I've finished, and basemap is not >> required for this. The original question was whether once a basemap >> had been defined is there an easy way to extract the Cartesian >> coordinates to produce an XYZ file containing the Cartesian >> coordinates for the chosen projection rather than the geographic ones? >> >> Thanks >> >> Mat >> >> PS. This is in all in the context of converting data for use in a >> software package called MIKE. It sadly lacks the ability to deal with >> NetCDF files directly. > > Mat: If you have the longitudes and latitudes in numpy arrays lons, > lats, and m is a Basemap instance, > > x,y = m(lons,lats) > > gives you the projection coordinates. > > -Jeff >> >> On 19/01/12 16:54, Jeff Whitaker wrote: >>> On 1/19/12 5:55 AM, Mathew Topper wrote: >>>> Hi, >>>> >>>> I was wondering how hard it would be to generate xyz format files >>>> from netcdf files using python-netcdf4 and basemap? It seems that >>>> basemap has the capabilities to do those sort of conversions, but I >>>> am a bit of a novice to map data and I'm not sure what would be the >>>> correct approach to this. >>>> >>>> Many Thanks >>>> >>>> Mat >>> Mat: >>> >>> What's an xyz file? >>> >>> -Jeff >>> -- >>> Jeffrey S. Whitaker Phone : (303)497-6313 >>> Meteorologist FAX: (303)497-6449 >>> NOAA/OAR/PSD R/PSD1Email : jeffrey.s.whita...@noaa.gov >>> 325 BroadwayOffice : Skaggs Research Cntr 1D-113 >>> Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg >> >> -- >> Dr. Mathew Topper >> Institute for Energy Systems >> School of Engineering >> The University of Edinburgh >> Faraday Building >> The King’s Buildings >> Edinburgh EH9 3JL >> Tel: +44 (0)131 650 5570 >> School fax: +44 (0)131 650 6554 >> mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> >> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> >> >> >> The University of Edinburgh is a charitable body, registered in >> Scotland, with registration number SC005336. > -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Using basemap to generate xyz format files from netcdf files
Hi Jeff, Sorry, an XYZ file is simply an ASCII file which can have either LON,LAT,HEIGHT entries or Cartesian X,Y,HEIGHT entries. I think I have confused myself a little here, as all I need to do is print the LON,LAT,HEIGHT data to a file and I've finished, and basemap is not required for this. The original question was whether once a basemap had been defined is there an easy way to extract the Cartesian coordinates to produce an XYZ file containing the Cartesian coordinates for the chosen projection rather than the geographic ones? Thanks Mat PS. This is in all in the context of converting data for use in a software package called MIKE. It sadly lacks the ability to deal with NetCDF files directly. On 19/01/12 16:54, Jeff Whitaker wrote: > On 1/19/12 5:55 AM, Mathew Topper wrote: >> Hi, >> >> I was wondering how hard it would be to generate xyz format files >> from netcdf files using python-netcdf4 and basemap? It seems that >> basemap has the capabilities to do those sort of conversions, but I >> am a bit of a novice to map data and I'm not sure what would be the >> correct approach to this. >> >> Many Thanks >> >> Mat > Mat: > > What's an xyz file? > > -Jeff > -- > Jeffrey S. Whitaker Phone : (303)497-6313 > Meteorologist FAX: (303)497-6449 > NOAA/OAR/PSD R/PSD1Email : jeffrey.s.whita...@noaa.gov > 325 BroadwayOffice : Skaggs Research Cntr 1D-113 > Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Using basemap to generate xyz format files from netcdf files
Hi, I was wondering how hard it would be to generate xyz format files from netcdf files using python-netcdf4 and basemap? It seems that basemap has the capabilities to do those sort of conversions, but I am a bit of a novice to map data and I'm not sure what would be the correct approach to this. Many Thanks Mat -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk <mailto:mathew.top...@ed.ac.uk> http://www.see.ed.ac.uk <http://www.see.ed.ac.uk/> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users