Do not render intermediate isobars

This commit is contained in:
XANTRONIX 2025-03-09 19:50:46 -04:00
parent d8831609d5
commit 3087fc1c9e

View file

@ -51,14 +51,14 @@ class SkewTGraph():
def draw_isobars(self, cr: cairo.Context, x: float, y: float):
cr.save()
cr.set_source_rgb(0.75, 0.75, 0.75)
for pressure in range(PRESSURE_MIN, PRESSURE_MAX+1, PRESSURE_STEP):
coords = self.graph_to_screen(-self.width / 2,
self.pressure_to_y(pressure))
if pressure % (2*PRESSURE_STEP) == 0:
cr.set_source_rgb(0.35, 0.35, 0.35)
else:
cr.set_source_rgb(0.75, 0.75, 0.75)
if pressure % (2*PRESSURE_STEP) != 0:
continue
cr.move_to(x + coords[0], y + coords[1])
cr.rel_line_to(self.width, 0)