A few gauges to start off the collection
Hi,
Our company needed a few dials/gauges for graphical display of data. We toyed with a product called “ChartDirector” but got over it pretty quickly and decided to implement it ourselves in Matplotlib. After whipping up sufficient functionality to keep our clients happy, I was given permission to release them here.
There are six gauges in total, a linear and logarithmic version of: a 180deg rotary dial, a horizontal meter, and a vertical meter. They are pretty messy inside but work well, and include some reasonable (but not super-duper fantastic) input checking.
The three logarithmic gauges don’t deal with limits that are not factors of 10, but they could. I’ve supplied the source in case you feel the need to subject yourself to my rudimentary programming skills.
(NOTE: There is a bug in using the modulo function (%) with floating-point numbers which bit us. There’s a workaround in these files, but I’m not a big fan. Perhaps I’m too green but I don’t feel such a bug should create such massive errors. For more information, type this into your python shell: ‘1.0 % 0.1’ )
- Jamil Khan
Design Engineer,
Calyptech Pty. Ltd.
gauge.py (7.11 KB)
h_meter.py (5.98 KB)
v_meter.py (5.72 KB)
log_gauge.py (8.17 KB)
log_h_meter.py (5.6 KB)
log_v_meter.py (5.74 KB)