Example #1
0
    def __init__(self, xlabel, ylabel, parent=None, **kwds):
        LiveWidget1D.__init__(self, parent)

        self.axes.resetCurves()
        self.setTitles({'x': xlabel, 'y': ylabel})
        self._curves = [
            MaskedPlotCurve([0], [1],
                            linewidth=2,
                            legend='',
                            markertype=SOLID_CIRCLE_MARKER,
                            markercolor=kwds.get('color2', COLOR_RED),
                            linecolor=kwds.get('color2', COLOR_RED)),
            MaskedPlotCurve([0], [.1],
                            linewidth=2,
                            legend='',
                            markertype=SOLID_CIRCLE_MARKER,
                            markercolor=kwds.get('color1', COLOR_BLACK),
                            linecolor=kwds.get('color1', COLOR_BLACK)),
        ]
        for curve in self._curves:
            curve.GR_MARKERSIZE = 20
            self.axes.addCurves(curve)

        # Disable creating a mouse selection to zoom
        self.gr.setMouseSelectionEnabled(False)
        self.plot.setLegend(True)
Example #2
0
 def __init__(self, parent):
     LiveWidget1D.__init__(self, parent)
     self.plot.viewport = [0.02, .98, 0.1, .98]
     self.plot.xlabel = 'channel'
     self.plot.ylabel = 'counts'
     self.axes.xdual = False
     self.axes.ticksize = 0.005
Example #3
0
 def __init__(self, parent):
     LiveWidget1D.__init__(self, parent)
     self.plot.viewport = [0.05, .98, 0.1, .98]
     self.plot.xlabel = 'tths (deg)'
     self.plot.ylabel = 'counts'
     self.axes.xdual = False
     self.axes.xtick = 1
     self.axes.majorx = 10
     self.axes.ticksize = 0.005
Example #4
0
 def __init__(self, parent):
     LiveWidget1D.__init__(self, parent)
     self.plot.viewport = [0.05, .98, 0.1, .98]
     self.axes.xdual = False
     self.axes.xtick = 5
     self.axes.majorx = 10
     self.axes.ticksize = 0.005
     self.gr.update()
     self._zoomed = False
Example #5
0
    def __init__(self, xlabel, ylabel, ncurves=1, parent=None, **kwds):
        LiveWidget1D.__init__(self, parent)

        self.axes.resetCurves()
        self.setTitles({'x': xlabel, 'y': ylabel})

        self._curves = [
            MaskedPlotCurve([0], [1], linewidth=2, legend='',
                            linecolor=kwds.get('color1', COLOR_BLACK)),
            MaskedPlotCurve([0], [.1], linewidth=2, legend='',
                            linecolor=kwds.get('color2', COLOR_GREEN)),
        ]
        for curve in self._curves[:ncurves]:
            self.axes.addCurves(curve)
        self.plot.setLegend(True)
        # Disable creating a mouse selection to zoom
        self.gr.setMouseSelectionEnabled(False)
Example #6
0
 def __init__(self, parent=None, **kwds):
     LiveWidget1D.__init__(self, parent)
     self.setTitles({'x': 'time slots', 'y': 'summed counts'})
     self.axes.resetCurves()
     self._curves = [
         MaskedPlotCurve([0], [1],
                         linecolor=GRCOLORS['blue'],
                         markertype=CIRCLE_MARKER,
                         linetype=None),
         NicosPlotCurve([0], [.1],
                        linecolor=COLOR_BLUE,
                        markertype=DOT_MARKER),
     ]
     self._curves[0].markersize = 10
     for curve in self._curves:
         self.axes.addCurves(curve)
     # Disable creating a mouse selection to zoom
     self.gr.setMouseSelectionEnabled(False)
Example #7
0
    def __init__(self, xlabel, ylabel, ncurves=1, parent=None, **kwds):
        LiveWidget1D.__init__(self, parent)
        self.plot.xlabel = xlabel
        self.plot.ylabel = ylabel

        self.curve.linecolor = kwds.get('color1', COLOR_BLACK)
        self.curve.linewidth = 2

        if ncurves > 1:
            self.curve2 = NicosPlotCurve([0], [.1],
                                         linecolor=kwds.get(
                                             'color2', COLOR_GREEN))
            self.curve2.linewidth = 2
            self.axes.addCurves(self.curve2)
        else:
            self.curve2 = None

        # Disable creating a mouse selection to zoom
        self.gr.setMouseSelectionEnabled(False)
        self.plot.setLegend(True)
Example #8
0
    def __init__(self, xlabel, ylabel, parent=None, **kwds):
        LiveWidget1D.__init__(self, parent)
        self.plot.xlabel = xlabel
        self.plot.ylabel = ylabel

        self.curve.linecolor = kwds.get('color2', COLOR_RED)
        self.curve.linewidth = 2
        self.curve.GR_MARKERSIZE = 20
        self.curve.markertype = SOLID_CIRCLE_MARKER
        self.curve.markercolor = kwds.get('color2', COLOR_RED)

        self.downcurve = NicosPlotCurve(
            [0], [.1], linecolor=kwds.get('color1', COLOR_BLACK))
        self.downcurve.linewidth = 2
        self.downcurve.markertype = SOLID_CIRCLE_MARKER
        self.downcurve.GR_MARKERSIZE = 20
        self.downcurve.markertype = SOLID_CIRCLE_MARKER
        self.downcurve.markercolor = kwds.get('color1', COLOR_BLACK)
        self.axes.addCurves(self.downcurve)

        # Disable creating a mouse selection to zoom
        self.gr.setMouseSelectionEnabled(False)
        self.plot.setLegend(True)
Example #9
0
 def __init__(self, parent):
     BaseLiveWidget1D.__init__(self, parent)
     self.plot.viewport = [0.1, .95, 0.1, .85]
Example #10
0
 def __init__(self, name='', parent=None):
     DefaultLiveWidget1D.__init__(self, parent)
     self.setMinimumSize(150, 150)
     self.name = name
Example #11
0
 def __init__(self, parent=None):
     LiveWidget1D.__init__(self, parent)
     self.axes.xdual = False