diff --git a/power_plot.py b/power_plot.py index 39743c865344bce720731c0967b3757853d8da39..668f8c40d327dd849e8c26a8d097e4abc752b0c8 100755 --- a/power_plot.py +++ b/power_plot.py @@ -38,6 +38,7 @@ class PowerPlot: def __init__(self, fig, yname, offset=None): self.fig = fig + self.ax = fig.add_subplot() self.ax.set_xlabel("Time (UTC)") self.ax.set_ylabel(yname) @@ -51,11 +52,13 @@ class PowerPlot: self.min, self.max = None, None fig.suptitle(yname, fontsize=16) - fig.tight_layout() + (self.totalplot,) = self.ax.plot([], [], ".", color="blue", alpha=0.1) (self.totalplothighlight,) = self.ax.plot( [], [], ".", color="red", markersize=10 ) + self.fig.tight_layout() + def set_totalplot_values(self, xdata, ydata): self.totalplot.set_data(xdata, ydata) @@ -143,7 +146,7 @@ class PowerPlotMainWindow(QMainWindow): now = time.time() self.last_update = now - fig = Figure(figsize=(8, 6), dpi=75) + fig = Figure(figsize=(16, 9), dpi=75) canvas = FigureCanvas(fig) layout.addWidget(canvas)