예제 #1
0
    def __init__(self, parent=None):
        """

        :param parent: Parent QWidget
        """
        super(ArrayStackPlot, self).__init__(parent)

        self.__signal = None
        self.__signal_name = None
        # the Z, Y, X axes apply to the last three dimensions of the signal
        # (in that order)
        self.__z_axis = None
        self.__z_axis_name = None
        self.__y_axis = None
        self.__y_axis_name = None
        self.__x_axis = None
        self.__x_axis_name = None

        self._stack_view = StackView(self)
        self._hline = qt.QFrame(self)
        self._hline.setFrameStyle(qt.QFrame.HLine)
        self._hline.setFrameShadow(qt.QFrame.Sunken)
        self._legend = qt.QLabel(self)
        self._selector = NumpyAxesSelector(self)
        self._selector.setNamedAxesSelectorVisibility(False)
        self.__selector_is_connected = False

        layout = qt.QVBoxLayout()
        layout.addWidget(self._stack_view)
        layout.addWidget(self._hline)
        layout.addWidget(self._legend)
        layout.addWidget(self._selector)

        self.setLayout(layout)
예제 #2
0
 def setUp(self):
     super(TestStackView, self).setUp()
     self.stackview = StackView()
     self.stackview.show()
     self.qWaitForWindowExposed(self.stackview)
     self.mystack = numpy.fromfunction(
         lambda i, j, k: numpy.sin(i / 15.) + numpy.cos(j / 4.) + 2 * numpy.
         sin(k / 6.), (10, 20, 30))
예제 #3
0
    def _createStackView(self):
        plot = StackView(self)
        self.stack = plot

        toolBar = toolbar.ProfileToolBar(plot, plot.getPlotWidget())
        toolBar.setScheme("imagestack")
        plot.addToolBar(toolBar)

        toolBar = plot.getProfileToolbar()
        toolBar.clear()
예제 #4
0
파일: plotExport.py 프로젝트: kklmn/ParSeq
def plot3Dsilx(nodeData):
    from silx.gui.plot import StackView

    saveType = nodeData[0]
    plot = StackView()
    plot.setColormap('viridis')
    plot.setGraphTitle(nodeData[1] + ' ' + saveType)
    plot.setLabels(nodeData[3])

    savedColumns = nodeData[4]
    for fname, props in savedColumns.items():
        maps = read3D(saveType, fname, props)

    # applied only to one (first) 3D map:
    v = maps[0]
    plot.setStack(v)
    # plot.saveGraph('test.png')
    plot.show()  # end plot3Dsilx