Skip to content

How to add coastlines to a UXARRAY plot #861

Answered by philipc2
bstephens82 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @bstephens82

Since our plotting API is written using GeoViews, you can add any feature you'd like by using the following syntax

import geoviews.feature as gf
projection = projection=ccrs.PlateCarree()

uxds['ug_mean_lev'][0,:].plot(title="ug_mean_lev", cmap='cubehelix_r', projection=ccrs.PlateCarree()) * gf.coastline(projection=projection)

You can see an example of this in our MPAS Visualization Example. I would note that only our Point plotting currently supports other projections as of right now using our direct API. We are working on getting this in soon.

If you are interested in a more classic Matplotlib implementation using Cartopy, we have recently added a new User Guide section …

Replies: 5 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by bstephens82
Comment options

You must be logged in to vote
1 reply
@philipc2
Comment options

Comment options

You must be logged in to vote
9 replies
@bstephens82
Comment options

@philipc2
Comment options

@bstephens82
Comment options

@philipc2
Comment options

@bstephens82
Comment options

Comment options

You must be logged in to vote
1 reply
@philipc2
Comment options

Comment options

You must be logged in to vote
1 reply
@philipc2
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants