csep.plots.plot_ROC_diagram
- csep.plots.plot_ROC_diagram(forecast, catalog, linear=True, plot_uniform=True, ax=None, show=True, **kwargs)[source]
Plots the ROC (Receiver Operating Characteristic) curve for a given forecast and observed catalog.
Usage Tutorials
- Parameters:
forecast (GriddedForecast) – Forecast object containing spatial forecast data.
catalog (CSEPCatalog) – Catalog object containing observed data.
linear (bool, optional) – If True, uses a linear scale for the X-axis, otherwise logarithmic. Defaults to True.
plot_uniform (bool, optional) – If True, plots the uniform (random) model as a reference. Defaults to True.
show (bool, optional) – If True, displays the plot. Defaults to True.
ax (matplotlib.axes.Axes, optional) – Axes object to plot on. If None, creates a new figure. Defaults to None.
**kwargs (optional) –
Additional keyword arguments for customization:
figsize (tuple): The size of the figure.
forecast_label (str): Label for the forecast data in the plot.
color (str): Color for the ROC curve line.
linestyle (str): Line style for the ROC curve.
xlabel (str): Label for the X-axis.
xlabel_fontsize (int): Font size for the X-axis label.
ylabel (str): Label for the Y-axis.
ylabel_fontsize (int): Font size for the Y-axis label.
xticks_fontsize (int): Font size for the X-axis ticks.
yticks_fontsize (int): Font size for the Y-axis ticks.
legend (bool): Whether to display a legend. Defaults to True.
legend_loc (str): Location of the legend. Defaults to ‘best’.
legend_fontsize (int): Font size of the legend text.
tight_layout (bool): Whether to use tight layout for the figure. Defaults to True.
- Returns:
The Axes object with the plot.
- Return type:
matplotlib.pyplot.Axes
Changed in version 0.8.0: plot_args dictionary is only partially supported and will be removed in v1.0.0.