Commit cb8aa8ee authored by Pedro Henrique Kopper's avatar Pedro Henrique Kopper

Tornar mais evidente o gráfico principal

parent 22ebb9d8
......@@ -65,9 +65,9 @@ class Graph():
def _configurePlots(self):
self.logger("[GRAPH]", "Found new device {}".format(self.config["device"]["type"]))
self.debugLayout = self.graph.addLayout(colspan=len(self.device["channels"]))
for channel in self.device["channels"]:
plotItem = self.debugLayout.addPlot()
self.debugLayout = self.graph.addLayout()
for i, channel in enumerate(self.device["channels"]):
plotItem = self.debugLayout.addPlot(row=i, col=1)
plot = plotItem.plot(pen=mkPen(mkColor(channel["color"]), width=2), name=channel["id"])
self.plots.append(plot)
plotItem.setClipToView(True)
......@@ -87,12 +87,14 @@ class Graph():
# TODO: escrever de forma mais limpa
self.plots[0].getViewBox().linkView(self.plots[0].getViewBox().XAxis, self.plots[1].getViewBox())
self.graph.nextRow()
self.combinedPlot = self.graph.addPlot()
self.combinedPlot = self.debugLayout.addPlot(row=0, col=2, rowspan=2)
self.combinedPlot.setClipToView(True)
self.combinedPlot.showGrid(True)
self.combinedPlot.getViewBox().enableAutoRange(plotItem.getViewBox().YAxis)
self.combinedPlot.setLabel("left", text="Amostra", units="V")
self.combinedPlot.setLabel("bottom", text="Pressão", units="bar")
qGraphicsGridLayout = self.debugLayout.layout
qGraphicsGridLayout.setColumnStretchFactor(1, 1)
qGraphicsGridLayout.setColumnStretchFactor(2, 3)
self.combinedPlot = self.combinedPlot.plot(pen=mkPen(mkColor("#FF0000"), width=2))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment