From 8f96849fc4066bbc0346ba700a7f4c229204c42a Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Mon, 3 Mar 2025 17:50:43 -0500 Subject: [PATCH] Render speed legends both N and S --- lib/xmet/hodograph.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/xmet/hodograph.py b/lib/xmet/hodograph.py index 8569fa4..a570f42 100644 --- a/lib/xmet/hodograph.py +++ b/lib/xmet/hodograph.py @@ -108,12 +108,13 @@ class Hodograph(): text = "%dkt" % speed extents = cr.text_extents(text) - sx, sy = self.sample_to_screen(speed, 180) + for angle in (0, 180): + sx, sy = self.sample_to_screen(speed, angle) - cr.move_to(x + sx + extents.width * 0.25, - y + sy - extents.height * 1.5) - cr.show_text(text) - cr.stroke() + cr.move_to(x + sx + extents.width * 0.25, + y + sy - extents.height * 1.5) + cr.show_text(text) + cr.stroke() cr.restore()