From 565b113136bc9943a79f46e529378ca727146b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Le=20Guyader?= <loic.le.guyader@xfel.eu> Date: Thu, 19 May 2022 09:09:35 +0200 Subject: [PATCH] Returns list of Polygon and not a PatchCollection which cannot be reused --- src/toolbox_scs/routines/boz.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/toolbox_scs/routines/boz.py b/src/toolbox_scs/routines/boz.py index 807f8d2..30c03c1 100644 --- a/src/toolbox_scs/routines/boz.py +++ b/src/toolbox_scs/routines/boz.py @@ -17,7 +17,6 @@ import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from matplotlib import cm from matplotlib.patches import Polygon -from matplotlib.collections import PatchCollection from extra_data import open_run from extra_geom import DSSC_1MGeometry @@ -280,7 +279,7 @@ def _get_pixel_hexagons(module): module: int, module number Returns: - matplotlib PatchCollection of hexagons + a list of hexagons """ hexes = [] @@ -290,7 +289,7 @@ def _get_pixel_hexagons(module): c = 1e3*corners[y, x, :, :] # convert to mm hexes.append(Polygon(c)) - return PatchCollection(hexes) + return hexes def _add_colorbar(im, ax, loc='right', size='5%', pad=0.05): """Add a colobar on a new axes so it match the plot size. -- GitLab