From e872025cd9687c108663b5eebd345e8c9568f809 Mon Sep 17 00:00:00 2001 From: Olivier Burggraaff Date: Thu, 4 Apr 2024 19:26:50 +0200 Subject: [PATCH] Plot any parameter --- plot_ensemble_parameter_single.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plot_ensemble_parameter_single.py b/plot_ensemble_parameter_single.py index f275eac..bf74a2a 100644 --- a/plot_ensemble_parameter_single.py +++ b/plot_ensemble_parameter_single.py @@ -17,7 +17,7 @@ args = parser.parse_args() args.PARAMETER_NAME = args.output_dir.stem -args.PARAMETER = fpcup.parameters.pcse_inputs[args.PARAMETER_NAME] +args.PARAMETER = fpcup.parameters.all_parameters[args.PARAMETER_NAME] ### CONSTANTS @@ -77,9 +77,11 @@ def number_of_replicates(data: fpcup.geo.gpd.GeoDataFrame, column: str) -> int: summary_by_soiltype.groupby("geometry").plot.line(args.PARAMETER_NAME, output.name, ax=ax, alpha=0.5, legend=False) # Add reference line for default value, if available - if hasattr(args.PARAMETER, "default"): + try: for ax in axs.ravel(): ax.axvline(args.PARAMETER.default, color="black", linestyle="--", alpha=0.5) + except (TypeError, AttributeError): + pass # Titles / labels try: