aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-14 22:49:44 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-14 22:49:44 -0400
commitbb2aa0a0be9541b3ffc2b348089d10a4ee2f26f3 (patch)
treec983dc29f8cba9ae32d890b774dc54181c66b00d
parent0a1c9a4d3cc6b6f814fe36019b501fb1c816e57f (diff)
downloadpyExpControl-bb2aa0a0be9541b3ffc2b348089d10a4ee2f26f3.tar.gz
pyExpControl-bb2aa0a0be9541b3ffc2b348089d10a4ee2f26f3.zip
added legend
-rw-r--r--eitControl.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/eitControl.py b/eitControl.py
index 84864ae..36c272d 100644
--- a/eitControl.py
+++ b/eitControl.py
@@ -74,6 +74,7 @@ class Experiment:
d2.addWidget(self.dataPlot)
self.dataPlot.setBackground(None)
self.dataPlot.showGrid(x=True, y=True)
+ self.dataPlot.addLegend()
w1 = pg.LayoutWidget()
bAutoZoom = QtGui.QPushButton('AutoZoom')
@@ -209,7 +210,7 @@ class Experiment:
color = self.channelsColor[name]
else:
color = (255,0,0)
- self.channelGraph[name]=self.dataPlot.plot(x,y, pen=None, symbol='o', symbolPen=None, symbolBrush=color, symbolSize=5)
+ self.channelGraph[name]=self.dataPlot.plot(x,y, pen=None, symbol='o', symbolPen=None, symbolBrush=color, symbolSize=5, name=name)
else:
self.channelGraph[name].setData(x,y)
stop = datetime.now()