diff --git a/ensembleperturbation/plotting/surrogate.py b/ensembleperturbation/plotting/surrogate.py index 7d066b40..b3d369aa 100644 --- a/ensembleperturbation/plotting/surrogate.py +++ b/ensembleperturbation/plotting/surrogate.py @@ -594,6 +594,7 @@ def plot_selected_probability_fields( output_directory: PathLike, label_unit_convert_factor: float = 1, label_unit_name: str = 'm', + storm: str = None, ): probabilities = node_prob_field.probabilities @@ -655,6 +656,20 @@ def plot_selected_probability_fields( map_axis.set_xlim(xlim) map_axis.set_ylim(ylim) + if storm is not None: + if not isinstance(storm, VortexTrack): + try: + storm = VortexTrack.from_file(storm) + except FileNotFoundError: + storm = VortexTrack(storm) + + map_axis.plot( + storm.data['longitude'], storm.data['latitude'], 'k--', label=storm.name, + ) + + if storm.name is not None: + map_axis.legend(fontsize=6) + pyplot.subplots_adjust(wspace=0.02, right=0.96) cax = pyplot.axes([0.95, 0.55, 0.015, 0.3]) cbar = figure.colorbar(im, extend='neither', cax=cax)