项目作者: madphilosopher

项目描述 :
SVG barometer gauge with kPa scale
高级语言: Python
项目地址: git://github.com/madphilosopher/svg-barometer.git
创建时间: 2020-02-19T19:41:09Z
项目社区:https://github.com/madphilosopher/svg-barometer

开源协议:Other

下载


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

  1. import barometer
  2. 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.

  1. 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 :copyright: 2017, Jannis Redmann.