From 140ac87e556eee21e40f03ddfe625a6ed102583e Mon Sep 17 00:00:00 2001 From: Leonardo Schwarz Date: Thu, 20 Jun 2024 15:24:53 +0200 Subject: [PATCH] fix orientation --- src/depiction_targeted_preproc/workflow/vis/clustering.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/depiction_targeted_preproc/workflow/vis/clustering.py b/src/depiction_targeted_preproc/workflow/vis/clustering.py index ae56287..cae5cd7 100644 --- a/src/depiction_targeted_preproc/workflow/vis/clustering.py +++ b/src/depiction_targeted_preproc/workflow/vis/clustering.py @@ -12,7 +12,7 @@ def vis_clustering(input_netcdf_path: Annotated[Path, Option()], output_png_path source_image = xarray.open_dataarray(input_netcdf_path) fig = plt.figure(figsize=(10, 10)) ax = fig.gca() - source_image.plot(cmap="tab10", ax=ax) + source_image.isel(c=0).plot.imshow(x="x", y="y", cmap="tab10", ax=ax, yincrease=False) ax.set_aspect("equal") # n_classes = len(set(source_image.values.ravel()))