Commit 5526d251 authored by Stephen Smith's avatar Stephen Smith Committed by Smith
Browse files

Move MultiPlotting

parent 5805d00c
......@@ -6,8 +6,8 @@
# SPDX - License - Identifier: GPL - 3.0 +
from qtpy import QtWidgets, QtCore
import qtpy
from MultiPlotting.AxisChanger.axis_changer_presenter import AxisChangerPresenter
from MultiPlotting.AxisChanger.axis_changer_view import AxisChangerView
from mantidqtinterfaces.MultiPlotting.AxisChanger.axis_changer_presenter import AxisChangerPresenter
from mantidqtinterfaces.MultiPlotting.AxisChanger.axis_changer_view import AxisChangerView
class QuickEditView(QtWidgets.QWidget):
......
......@@ -4,8 +4,8 @@
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from MultiPlotting.QuickEdit.quickEdit_view import QuickEditView
from MultiPlotting.QuickEdit.quickEdit_presenter import QuickEditPresenter
from mantidqtinterfaces.MultiPlotting.QuickEdit.quickEdit_view import QuickEditView
from mantidqtinterfaces.MultiPlotting.QuickEdit.quickEdit_presenter import QuickEditPresenter
class QuickEditWidget(object):
......
......@@ -4,8 +4,8 @@
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from MultiPlotting.gridspec_engine import gridspecEngine
from MultiPlotting.subplot.subplot_context import subplotContext
from mantidqtinterfaces.MultiPlotting.gridspec_engine import gridspecEngine
from mantidqtinterfaces.MultiPlotting.subplot.subplot_context import subplotContext
import mantid.simpleapi as mantid
......
......@@ -6,9 +6,9 @@
# SPDX - License - Identifier: GPL - 3.0 +
from qtpy import QtWidgets, QtCore
from copy import deepcopy
from MultiPlotting.subplot.subplot import subplot
from MultiPlotting.QuickEdit.quickEdit_widget import QuickEditWidget
from MultiPlotting.multi_plotting_context import *
from mantidqtinterfaces.MultiPlotting.subplot.subplot import subplot
from mantidqtinterfaces.MultiPlotting.QuickEdit.quickEdit_widget import QuickEditWidget
from mantidqtinterfaces.MultiPlotting.multi_plotting_context import *
class MultiPlotWindow(QtWidgets.QMainWindow):
......@@ -57,6 +57,7 @@ class MultiPlotWidget(QtWidgets.QWidget):
self.setLayout(layout)
""" plotting """
def add_subplot(self, name):
self.plots.add_subplot(name, len(self.quickEdit.get_subplots()))
......@@ -136,6 +137,7 @@ class MultiPlotWidget(QtWidgets.QWidget):
self.plots.disconnect_rm_subplot_signal()
""" update GUI """
def _if_empty_close(self):
if not self._context.subplots:
self.closeSignal.emit()
......
......@@ -11,10 +11,10 @@ from copy import deepcopy
from matplotlib.figure import Figure
from mantidqt.MPLwidgets import FigureCanvasQTAgg as FigureCanvas
from MultiPlotting.navigation_toolbar import myToolbar
from MultiPlotting.edit_windows.remove_plot_window import RemovePlotWindow
from MultiPlotting.edit_windows.select_subplot import SelectSubplot
from MultiPlotting.subplot.subplot_ADS_observer import SubplotADSObserver
from mantidqtinterfaces.MultiPlotting.navigation_toolbar import myToolbar
from mantidqtinterfaces.MultiPlotting.edit_windows.remove_plot_window import RemovePlotWindow
from mantidqtinterfaces.MultiPlotting.edit_windows.select_subplot import SelectSubplot
from mantidqtinterfaces.MultiPlotting.subplot.subplot_ADS_observer import SubplotADSObserver
# use this to manage lines and workspaces directly
......@@ -54,6 +54,7 @@ class subplot(QtWidgets.QWidget):
""" this is called when the zoom
or pan are used. We want to send a
signal to update the axis ranges """
def draw_event_callback(self, event):
self.figure.tight_layout()
for subplot in self.plot_objects.keys():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment