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,