Skip to content
Snippets Groups Projects
Commit 0217410b authored by Thomas Kluyver's avatar Thomas Kluyver Committed by Karim Ahmed
Browse files

Fix another usage of matplotlib Axes.collections

parent 51587896
No related branches found
No related tags found
1 merge request!984Try updating to Python 3.11 & update all deps
...@@ -392,9 +392,15 @@ def show_processed_modules_jungfrau( ...@@ -392,9 +392,15 @@ def show_processed_modules_jungfrau(
ax.set_axis_off() ax.set_axis_off()
ax.get_legend().set_visible(False) ax.get_legend().set_visible(False)
modules = [c for c in ax.collections if isinstance(c, PatchCollection)][0]
# Remove non-tiles markings from figure
for coll in ax.collections:
if coll is not modules:
coll.remove()
# Set each module colour individually, # Set each module colour individually,
# extra_geom provides a single color for all modules. # extra_geom provides a single color for all modules.
modules, = ax.collections = ax.collections[:1]
facecolors = np.repeat(modules.get_facecolor(), len(expected_modules), axis=0) facecolors = np.repeat(modules.get_facecolor(), len(expected_modules), axis=0)
counter = 0 # Used as index within the `Noise` matrix counter = 0 # Used as index within the `Noise` matrix
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment