Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Fix plot widget
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktBurger committed Apr 23, 2024
1 parent f27af59 commit 84a9180
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyleco_extras/gui/data_logger/data/plot_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ def toggleVerticalLines(self, checked: bool, l1: float = 0, l2: float = 1) -> No
self.lineV1.sigDragged.connect(self.evaluate_data)
self.lineV2: pg.InfiniteLine = self.plotWidget.addLine(x=l2, pen="y", movable=True)
self.lineV2.sigDragged.connect(self.evaluate_data)
if not checked and not self.actionEvaluate.isChecked():
self.lbEvaluation.setText("-")

@pyqtSlot(bool)
def toggleV(self, checked: bool) -> None:
Expand All @@ -306,7 +308,7 @@ def evaluate_data(self, value: int = 0) -> None:
l1, l2 = sorted((l1, l2))
if x_key == "index":
raw_data = self.main_window.get_data(y_key, start=-self.autoCut)
start = math.floor(l1)
start = max(math.floor(l1), 0)
stop = math.ceil(l2) + 1
data = raw_data[start:stop]
else:
Expand Down

0 comments on commit 84a9180

Please sign in to comment.