Improve handling of discrete vs continuous scales.