diff --git a/src/cristallina/plot.py b/src/cristallina/plot.py index 1fd6b1e..ba72218 100644 --- a/src/cristallina/plot.py +++ b/src/cristallina/plot.py @@ -157,7 +157,7 @@ def plot_2d_channel(data: SFDataFiles, channel_name, ax=None): axis_styling(ax, channel_name, description) -def plot_detector_image(image_data, title=None, comment=None, ax=None, rois=None, norms=None, log_colorscale=False, **fig_kw): +def plot_detector_image(image_data, title=None, comment=None, ax=None, rois=None, norms=None, log_colorscale=False, show_legend=True, **fig_kw): """ Plots channel data for a channel that contains an image (2d array) of numeric values per pulse. Optional: @@ -207,8 +207,11 @@ def plot_detector_image(image_data, title=None, comment=None, ax=None, rois=None else: description = f"mean: {mean:.2e},\nstd: {std:.2e}" + if not show_legend: + description="" + axis_styling(ax, title, description) - ax.legend(loc=4) + def plot_image_channel(data: SFDataFiles, channel_name, pulse=0, ax=None, rois=None, norms=None, log_colorscale=False):