climpred.classes.PredictionEnsemble.plot#
- PredictionEnsemble.plot(variable: str | None = None, ax: Any | None = None, show_members: bool = False, cmap: str | None = None, x: str = 'time') plt.Axes [source]#
Plot datasets from
PredictionEnsemble
.Wraps
climpred.graphics.plot_ensemble_perfect_model()
orclimpred.graphics.plot_lead_timeseries_hindcast()
.- Parameters:
variable – variable to show. Defaults to first in data_vars.
ax – Axis to use in plotting. By default, creates a new axis.
show_members – whether to display all members individually. Defaults to False.
cmap – Name of matplotlib-recognized colorbar. Defaults to
viridis
forHindcastEnsemble
andtab10
forPerfectModelEnsemble
.x – Name of x-axis. Use
time
to show observations and hindcasts in real time. Useinit
to see hindcasts as initializations. Forx=init
only initialized is shown and only works forHindcastEnsemble
.
Note
Alternatively inspect initialized datasets by
PredictionEnsemble.get_initialized()[v].plot.line(x=time)
to seevalidtime
on x-axis orPredictionEnsemble.get_initialized()[v].plot.line(x=init)
to seeinit
on x-axis.- Returns:
ax – plt.axes