Skip to content

Saving publication quality figures #1156

@rosimarwx

Description

@rosimarwx

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:

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)

uxds["olrtoa"][0].plot.rasterize(
    method="point",
    projection=ccrs.Mollweide(),
    pixel_ratio=2.0,
    fig_size=400,
    xaxis=None,
    yaxis=None,
    backend="matplotlib"
    )

Many thanks!
Rosimar (from NSF NCAR/MMM)

Metadata

Metadata

Assignees

Labels

new featureNew feature or request

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions