From 43a317fa0a7513748c725e3f83ead6a9310e5aeb Mon Sep 17 00:00:00 2001 From: Olivier Jossoud <olivier.jossoud@lsce.ipsl.fr> Date: Thu, 31 Oct 2019 08:54:22 +0100 Subject: [PATCH] PumpCalib. Plot. Add axis legend. --- src/uim/pumpcalibuim.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/uim/pumpcalibuim.py b/src/uim/pumpcalibuim.py index 25275bc..c0be36a 100644 --- a/src/uim/pumpcalibuim.py +++ b/src/uim/pumpcalibuim.py @@ -28,6 +28,7 @@ class PumpCalibUim: self.pump_prvd = self.set_current_pump_prvd() self.main_ui.pump_combobox_pump.currentTextChanged.connect(self.change_pump) + self.change_pump(self.main_ui.pump_combobox_pump.currentText()) self.runs_df = pd.DataFrame() self.coef_df = pd.DataFrame() @@ -58,11 +59,11 @@ class PumpCalibUim: def __update_runs_plot__(self, runs_df: pd.DataFrame, coef_df: pd.DataFrame) -> None: # Create plot item - plot_item = pg.PlotItem() + plot_item = pg.PlotItem(labels={"left": "ml/min", "bottom": "RPM"}) self.main_ui.pump_graphicsview_runs.setCentralItem(plot_item) # Create legend - legend = pg.LegendItem(offset=(40, 10)) + legend = pg.LegendItem(offset=(57, 5)) legend.setParentItem(plot_item.graphicsItem()) # Create the color scale -- GitLab