home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 379508981

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/2034#issuecomment-379508981 https://api.github.com/repos/pydata/xarray/issues/2034 379508981 MDEyOklzc3VlQ29tbWVudDM3OTUwODk4MQ== 9960249 2018-04-08T00:26:22Z 2018-04-08T00:26:22Z NONE

Sure, I hope it can help! The psy-maps package, which is the psyplot plugin for georeferenced plots, is built on the cartopy package (sorry, that is not made clear in the docs currently). For interpreting coordinates following the CF-Conventions, however, I wrote my own decoder class (http://psyplot.readthedocs.io/en/latest/api/psyplot.data.html#psyplot.data.CFDecoder). But you should not have to care about the latter, since this is integrated into the framework.

After having installed the packages, e.g. via

bash conda install -c conda-forge psyplot psy-maps psyplot-gui

you can simply create a plot from the command line via

bash psyplot your-netcdf-file.nc -pm mapplot

and it will open the GUI to create a plot. Or you type

bash psyplot your-netcdf-file.nc -pm mapplot -n your-variable -o plots.pdf to save it immediately to a PDF file named plots.pdf.

There are however a lot more possibilities and formatting options.

Within python, you can just create a georeferenced plot via

python import psyplot.project as psy psy.plot.mapplot('your-netcdf-file.nc', name='your-variable')

which will then create a new figure with an instance of cartopy's GeoAxes on it. For more options and configurations of your plots, I refer to the docs :wink:, where you also find an example gallery, but you can of course always open an issue in the psyplot repository and I am happy to help

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  310547057
Powered by Datasette · Queries took 0.616ms · About: xarray-datasette