validFormat return false if formats.empty

Fixes crash when no format is specified
Add correct unittest for validFormat
Fix bug in calculation of Axis.min_tick

This could result in drawing of axis ticks outside of the axis
boundaries
Added debug output to plotcli
Better axis tick calculations
Limit rate of saving figures to at most 4 times per second
Fix error in axis labelling