From 0d831b62cf888e3ab186b1b6cb8c916bb363a8cc Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Wed, 26 Feb 2025 16:11:00 -0500 Subject: [PATCH] Fix height legend labels --- lib/xmet/hodograph.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/xmet/hodograph.py b/lib/xmet/hodograph.py index 7b66cd9..e2e4f64 100644 --- a/lib/xmet/hodograph.py +++ b/lib/xmet/hodograph.py @@ -204,7 +204,12 @@ class Hodograph(): cr.stroke() cr.move_to(offset + x, y + 3.5*width) - cr.show_text("%dkm" % (height / 1000)) + + if height < 1000: + cr.show_text("%dm" % height) + else: + cr.show_text("%dkm" % (height / 1000)) + cr.stroke() offset += interval