Ejemplo n.º 1
0
    def __init__(self, parent=None):
        super(LevelsHistogram, self).__init__(parent=parent,
                                              title="",
                                              section="histogram")
        self.antialiased = False

        # a dict of dict : plot -> selected items -> HistogramItem
        self._tracked_items = {}
        self.curveparam = CurveParam(_("Curve"), icon="curve.png")
        self.curveparam.read_config(CONF, "histogram", "curve")

        self.histparam = HistogramParam(_("Histogram"), icon="histogram.png")
        self.histparam.logscale = False
        self.histparam.n_bins = 256

        self.range = XRangeSelection(0, 1)
        self.range_mono_color = self.range.shapeparam.sel_line.color
        self.range_multi_color = CONF.get("histogram", "range/multi/color",
                                          "red")

        self.add_item(self.range, z=5)
        self.SIG_RANGE_CHANGED.connect(self.range_changed)
        self.set_active_item(self.range)

        self.setMinimumHeight(80)
        self.setAxisMaxMajor(self.Y_LEFT, 5)
        self.setAxisMaxMinor(self.Y_LEFT, 0)

        if parent is None:
            self.set_axis_title("bottom", "Levels")
Ejemplo n.º 2
0
 def range(self, xmin, xmax):
     return XRangeSelection(xmin, xmax)
Ejemplo n.º 3
0
 def create_shape(self):
     self.label = None
     return XRangeSelection(0, 0)
Ejemplo n.º 4
0
 def create_shape(self):
     return XRangeSelection(0, 0)
Ejemplo n.º 5
0
 def create_shape(self):
     from guiqwt.shapes import XRangeSelection
     return XRangeSelection(0, 0)