Esempio n. 1
0
 def add_overlay(self, spectrum, show=True):
     x, y = spectrum.data
     color = calculate_color(len(self.overlays) + 1)
     self.overlays.append(pg.PlotDataItem(x, y, pen=pg.mkPen(color=color, width=1.5)))
     self.overlay_names.append(spectrum.name)
     self.overlay_show.append(True)
     if show:
         self.spectrum_plot.addItem(self.overlays[-1])
         self.legend.addItem(self.overlays[-1], spectrum.name)
Esempio n. 2
0
 def add_overlay(self, spectrum, show=True):
     x, y = spectrum.data
     color = calculate_color(len(self.overlays) + 1)
     self.overlays.append(pg.PlotDataItem(x, y, pen=pg.mkPen(color=color, width=1.5)))
     self.overlay_names.append(spectrum.name)
     self.overlay_show.append(True)
     if show:
         self.spectrum_plot.addItem(self.overlays[-1])
         self.legend.addItem(self.overlays[-1], spectrum.name)
Esempio n. 3
0
 def __init__(self, plot_item, legend_item, positions, intensities, name=None, baseline=0):
     self.plot_item = plot_item
     self.legend_item = legend_item
     self.line_items = []
     self.index = PhasePlot.num_phases
     self.pen = pg.mkPen(color=calculate_color(self.index + 12), width=1.3, style=QtCore.Qt.DashLine)
     self.ref_legend_line = pg.PlotDataItem(pen=self.pen)
     self.name = ''
     PhasePlot.num_phases += 1
     self.create_items(positions, intensities, name, baseline)
Esempio n. 4
0
 def __init__(self, plot_item, legend_item, positions, intensities, name=None, baseline=0):
     self.plot_item = plot_item
     self.legend_item = legend_item
     self.line_items = []
     self.index = PhasePlot.num_phases
     self.pen = pg.mkPen(color=calculate_color(self.index + 12), width=1.3, style=QtCore.Qt.DashLine)
     self.ref_legend_line = pg.PlotDataItem(pen=self.pen)
     self.name = ""
     PhasePlot.num_phases += 1
     self.create_items(positions, intensities, name, baseline)
Esempio n. 5
0
 def __init__(self, plot_item, legend_item, positions, intensities, name=None, baseline=0):
     self.plot_item = plot_item
     self.legend_item = legend_item
     self.visible = True
     self.line_items = []
     self.line_visible = []
     self.spectrum_x_range = []
     self.index = PhasePlot.num_phases
     self.color = calculate_color(self.index + 9)
     self.pen = pg.mkPen(color=self.color, width=0.9, style=QtCore.Qt.SolidLine)
     self.ref_legend_line = pg.PlotDataItem(pen=self.pen)
     self.name = ''
     PhasePlot.num_phases += 1
     self.create_items(positions, intensities, name, baseline)