Skip to content

madphilosopher/svg-barometer

Repository files navigation

SVG Barometer

Simple barometer gauge with a kPa scale, based on the design of the Lee Valley Tools barometer.

Example Image

Example barometer with indicator needle and reference needle.

Example Usage

import barometer

barometer.write_svg("barometer.svg", p_ref=97.35, p_ind=100.20)

Each needle is optional, so the following code will only draw the indicator needle.

barometer.write_svg("barometer.svg", p_ind=100.20)

Live Image

There is a live image showing the current and past sea level pressure readings for CYEG at dashboard.madphilosopher.ca.

Compatibility

Tested under Python 2.7.12, 2.7.17, and Python 3.5.2, 3.6.9.

Script Font for Labels

The stylized script font used in the example image is Anaktoria, which will only render properly if you have Anaktoria installed on your system.

Rendered using Inkscape, it looks like this PNG image.

Acknowledgements

My python code adapts the javascript derhuerst/svg-partial-circle by @derhuerst to compute the arc of the pressure scale. Copyright ©️ 2017, Jannis Redmann.

Releases

No releases published

Packages

No packages published