From 9a8f8abbe472ebfbace45a406b081a9a07c801de Mon Sep 17 00:00:00 2001 From: Titov Leonid Date: Fri, 6 Dec 2024 11:12:08 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20=D0=9E=D1=82=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=80=D0=B5=D0=B7=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=D1=82=D0=B0=D1=82=D0=B8=D0=B2=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gui/plotter.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/plotter.py b/src/gui/plotter.py index 5c0a894..aafa981 100644 --- a/src/gui/plotter.py +++ b/src/gui/plotter.py @@ -1,5 +1,7 @@ import pandas as pd -from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QGraphicsRectItem +from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QGraphicsRectItem +from PyQt5.QtGui import QFont + import pyqtgraph as pg import numpy as np from numpy import floating @@ -160,9 +162,13 @@ class PlotWidget(BasePlotWidget): if settings["performance"]: tesla_TWC = round((1 - TWC_time/tesla_time)*100,2) tesla_ideal = round((1 - ideal_time/tesla_time)*100,2) - TWC_ideal = round((TWC_time/ideal_time - 1)*100,2) - performance_label = QLabel(f"Сокращение длительности: фактическое = {tesla_TWC} %, идеальное = {tesla_ideal} %, разница идеала и факта = {TWC_ideal}%") + TWC_ideal = round((ideal_time/TWC_time)*100,2) + + performance_label = QLabel(f"Сокращение длительности: фактическое = {tesla_TWC} %, идеальное = {tesla_ideal} %; КДИП = {TWC_ideal}%") layout.addWidget(performance_label) + + performance_label.update() + layout.addWidget(plot_widget) widget.setLayout(layout)