Plotting#
Plotting methods are exposed on the same accessors as the data-processing
methods, while their implementation lives in artist.__plot.
Native Triangular Cells#
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(12, 6))
da.icon.tri_plot(ax)
PolyCollection Backend#
For large native-grid fields or nested-domain outlines, da.viz.tricontourf
can draw ICON cell polygons directly with Matplotlib PolyCollection after
ds.icon.add_grid(...) has attached the grid:
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
projection = ccrs.Robinson()
fig, ax = plt.subplots(subplot_kw={"projection": projection})
da.viz.tricontourf(
ax,
backend="polycollection",
projection=projection,
edgecolor="face",
)
Quick Map#
ax = da.art.quick_plot()
Slice Line#
points = [[13.0, 52.0], [14.0, 53.0]]
gridpoints = ds.icon.nearest_gridpoints(points)
ax = ds.icon.show_slice_line(points, gridpoints)
Non-Cylindrical Gridlines#
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
fig, ax = plt.subplots(subplot_kw={"projection": ccrs.Robinson()})
ds.icon.noncyl_gridlines(
ax,
xticks=range(-180, 181, 60),
yticks=range(-90, 91, 30),
)
Vertical Slice#
da.art.plot_slice(
ds["z_mc"],
gridpoints,
t=0,
deg_E_start=13,
deg_E_end=14,
deg_N=52,
)