From 8240597ddb383ca8397a9c69514fc3e12761de49 Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial <xan@xantronix.com> Date: Sun, 23 Feb 2025 21:37:24 -0500 Subject: [PATCH] Move function to be closer to its caller --- lib/xmet/skew_t.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/xmet/skew_t.py b/lib/xmet/skew_t.py index 18657d3..b73f566 100644 --- a/lib/xmet/skew_t.py +++ b/lib/xmet/skew_t.py @@ -56,12 +56,6 @@ class SkewT(): return factor * self.height - def sample_to_graph(self, temp: float, pressure: float): - x = (temp / TEMP_STEP) * self.temp_step_width - y = self.pressure_y(pressure) - - return x + y, y - def draw_isobars(self, cr: cairo.Context, x: float, y: float): for pressure in range(PRESSURE_MIN, PRESSURE_MAX+1, PRESSURE_STEP): coord = self.graph_to_screen(-self.width / 2, @@ -88,6 +82,12 @@ class SkewT(): cr.line_to(x + screen_x2, y + screen_y2) cr.stroke() + def sample_to_graph(self, temp: float, pressure: float): + x = (temp / TEMP_STEP) * self.temp_step_width + y = self.pressure_y(pressure) + + return x + y, y + def draw_samples(self, cr: cairo.Context, x: float,