fixed inconsistent legend padding when switching between discrete and scale values