diff --git a/lib/xmet/skew_t.py b/lib/xmet/skew_t.py index 4ce35de..3a9bcb1 100644 --- a/lib/xmet/skew_t.py +++ b/lib/xmet/skew_t.py @@ -22,6 +22,8 @@ TEMP_CENTER = 0 # degrees C TEMP_STEP = 5 TEMP_STEP_COUNT = math.ceil(TEMP_RANGE / TEMP_STEP) +SKEW = 0.7 + def clamp(value, lowest, highest): if value < lowest: return lowest @@ -67,7 +69,7 @@ class SkewTGraph(): cr.restore() def skew_t_to_graph(self, x: float, y: float): - return (x+y, y) + return (x+SKEW*y, y) def sample_to_graph(self, temp: float, pressure: float): x = (temp / TEMP_STEP) * self.temp_step_width @@ -214,7 +216,7 @@ class SkewTLegend(): x_rel, y_rel = skew_t.sample_to_screen(temp, PRESSURE_MAX) if x_rel < 0: - y_rel = skew_t.height + x_rel + y_rel = skew_t.height + x_rel / SKEW x_rel = 0 if y_rel <= 0: