Drawing WindBarbs in FloatCanvas

by @jehiah on 2006-07-27 08:02UTC
Filed under: All , Articles , Python , Programming , wxPython

I recently asked a question on the FloatCanvas mailing list about how to draw wind barbs in wxPython. I ended up with a solution which draws wind barbs like these.

If you don’t know what wind barbs are, they are a way of representing both the direction and strength of wind on a map. The more barbs on the line the stronger the wind. Large barbs count for 10 knots and small barbs count for 5 knots. The flags you see count for 50 knots. An example of how this looks on a map can be seen on the weather underground site.

You can download the code

(thanks to Chris Barker for the tip on modeling the code after FloatCanvas.Arrow; it turned out to be very similar)

Subscribe via RSS ı Email
© 2023 - Jehiah Czebotar