Repository navigation
Replies: 2 comments
|
Hi @rosimarwx Here is a fantastic guide from the HoloViews documentation. The following should work: import uxarray as ux
import cartopy.crs as ccrs
expName = "plus4K"
dx = "TC_3km"
grid_path = "/glade/work/rberrios/MPAS/grid_files/x5.tropical_3km_10N.grid.nc"
data_path = "/glade/derecho/scratch/rberrios/te/tmp/%s/%s/sub_history.2000-06-19_12.00.00.nc"%(expName,dx)
uxds = ux.open_dataset(grid_path, data_path)
olrtoa_plot = uxds["olrtoa"][0].plot.rasterize(
method="point",
projection=ccrs.Mollweide(),
pixel_ratio=2.0,
fig_size=400,
xaxis=None,
yaxis=None,
backend="matplotlib"
)
hv.save(olrtoa_plot, "olrtoa_plot.png", fmt='png') |
0 replies
|
@rosimarwx I don't know if you're still looking for a solution, but I've found that with the more recent Matplotlib-without-HoloViz method (https://uxarray.readthedocs.io/en/latest/user-guide/mpl.html#rasterization) you can set the figure DPI before calling |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Proposed new feature or change:
Hi! I have been using uxarray to plot unstructured MPAS-Atmosphere output with >29 million cells. So far, so good. I would like to save publication-quality figures from my uxarray plots, but I cannot find this feature anywhere in the documentation. When I plot using matplotlib, I would save the figure with something like
plt.savefig('./figureName.jpeg',dpi=600,bbox_inches='tight'). Does a feature like this exist with uxarray? If not, would it be possible to be added?Here is my minimal code example:
Many thanks!
Rosimar (from NSF NCAR/MMM)
All reactions