I am using mantid workbench version 6.10.0.1 (18 Sep 2024).
My operating system is Red Hat Enterprise Linux, version 9.4 (Plow)
I receive an error when I try:
fig, ax = plt.subplots()
The error is:
AttributeError: ‘WorkbenchNavigationToolbar’ object has no attribute ‘sig_crosshair_toggle_triggered’
I will paste the full error message at the end
Expected behavior
Generate a figure and axes object for matplotlib
Actual behavior
AttributeError: ‘WorkbenchNavigationToolbar’ object has no attribute ‘sig_crosshair_toggle_triggered’
Steps to reproduce the behavior
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
Platforms affected
Mantid Workbench
The full error message
AttributeError: ‘WorkbenchNavigationToolbar’ object has no attribute ‘sig_crosshair_toggle_triggered’
File “”, line 6, in
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/matplotlib/pyplot.py”, line 1501, in subplots
fig = figure(**fig_kw)
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/matplotlib/_api/deprecation.py”, line 454, in wrapper
return func(*args, **kwargs)
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/matplotlib/pyplot.py”, line 840, in figure
manager = new_figure_manager(
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/matplotlib/pyplot.py”, line 384, in new_figure_manager
return _get_backend_mod().new_figure_manager(*args, **kwargs)
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/workbench/plotting/figuremanager.py”, line 650, in new_figure_manager
return new_figure_manager_given_figure(num, this_fig)
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/workbench/plotting/figuremanager.py”, line 664, in new_figure_manager_given_figure
return QAppThreadCall(_new_figure_manager_given_figure_impl)(int(num), figure)
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/mantidqt/utils/qt/qappthreadcall.py”, line 89, in call
else:
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/mantidqt/utils/qt/qappthreadcall.py”, line 107, in _on_call
except Exception: # pylint: disable=broad-except
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/workbench/plotting/figuremanager.py”, line 661, in _new_figure_manager_given_figure_impl
return force_method_calls_to_qapp_thread(FigureManagerWorkbench(canvas, num))
File “/opt/anaconda/envs/mantid/lib/python3.10/site-packages/workbench/plotting/figuremanager.py”, line 235, in init
self.toolbar.sig_crosshair_toggle_triggered.connect(self.crosshair_toggle)