Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import absolute_import, print_function
from PyQt4 import QtGui
import sys
from itertools import cycle
from six import iteritems
from Muon.GUI.Common import message_box
from MultiPlotting.multiPlotting_widget import MultiPlotWidget
from MultiPlotting.multiPlotting_context import *
import mantid.simpleapi as mantid
class plotTestGui(QtGui.QMainWindow):
def __init__(self, parent=None):
super(plotTestGui, self).__init__(parent)
self._context = PlottingContext()
self.test = MultiPlotWidget(self._context, self)
self.setCentralWidget(self.test)
self.setWindowTitle("plot test")
def qapp():
if QtGui.QApplication.instance():
_app = QtGui.QApplication.instance()
else:
_app = QtGui.QApplication(sys.argv)
return _app
app = qapp()
try:
window = plotTestGui()
window.show()
app.exec_()
except RuntimeError as error:
message_box.warning(str(error))