Allow choice of direction; clockwise/anticlockwise

Fixes #105

This allows the bar to increase in an anticlockwise direction, and adapts `xy2val` such that it will still work with inverted bars.