-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I was trying to make a plot that combined a surface plot showing the model grid and a transect line, next to a transect plot of that line. In matplotlib this can be created with multiple axes in one figure, using gridspec or similar. Neither the surface plot method nor the transect plot method accept an axes parameter - they assume they are the only plot on a figure.
Feature suggestion: Add an axes parameter to the plot methods:
def plot_on_figure(
figure: matplotlib.figure.Figure,
# ...
axes: matplotlib.axes.Axes | None = None,
):
if axes is None:
axes = figure.subplots(projection=dataset.ems.data_crs)
# ...