diff --git a/src/CSET/operators/collapse.py b/src/CSET/operators/collapse.py index 5f65f97e3..723433201 100644 --- a/src/CSET/operators/collapse.py +++ b/src/CSET/operators/collapse.py @@ -39,8 +39,9 @@ def collapse( cube: iris.cube.Cube Cube to collapse and iterate over one dimension coordinate: str | list[str] - Coordinate(s) to collapse over i.e. 'time', 'longitude', 'latitude', - 'model_level_number'. A list of multiple coordinates can be given. + Coordinate(s) to collapse over e.g. 'time', 'longitude', 'latitude', + 'model_level_number', 'realization'. A list of multiple coordinates can + be given. method: str Type of collapse i.e. method: 'MEAN', 'MAX', 'MIN', 'MEDIAN', 'PERCENTILE' getattr creates iris.analysis.MEAN, etc For PERCENTILE diff --git a/src/CSET/operators/plot.py b/src/CSET/operators/plot.py index d3ba680b4..d86bf5b20 100644 --- a/src/CSET/operators/plot.py +++ b/src/CSET/operators/plot.py @@ -23,7 +23,6 @@ import iris.cube import iris.exceptions import iris.plot as iplt -import matplotlib as mpl import matplotlib.pyplot as plt from markdown_it import MarkdownIt @@ -164,7 +163,7 @@ def spatial_contour_plot( # plt.rc('ytick',labelsize=22) # Filled contour plot of the field. - iplt.contourf(cube, cmap=mpl.cm.magma) + iplt.contourf(cube) # Add coastlines. plt.gca().coastlines(resolution="10m") @@ -243,7 +242,7 @@ def postage_stamp_contour_plot( colorbar = plt.colorbar(plot, colorbar_axes, orientation="horizontal") colorbar.set_label(f"{cube.name()} / {cube.units}") - plt.savefig(filename) + plt.savefig(filename, bbox_inches="tight") logging.info("Saved contour postage stamp plot to %s", filename) _make_plot_html_page(filename) return cube