Algorithm for determining axis scaling

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
engelbeck
Posts: 4
Joined: Mon Aug 25, 2003 6:42 pm
Location: Puyallup, Wa

Algorithm for determining axis scaling

Post by engelbeck »

What method are you using to automatically determine the scaling intervals and tick marks on your plot scales?

:?:
Ranald M Engelbeck
Puyallup, Wa
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Abbreviated version for linear scales: If the default "Auto-tick marks" is checked, then for the X axis DPlot finds a tick mark interval that is a multiple of 1, 1.5, 2, 2.5, 3, 4, 5, 6, or 8 times a power of 10 and results in ~10 intervals, and forces the extents to be multiples of that interval. It then looks for an interval on the Y axis that gives roughly the same physical distance between tick marks as is used on the X axis (but not less than 5 nor more than 20 intervals).

If "Specify interval" is checked... well, looking just now I see it is doing something a bit unexpected. Whether you check "Specify extents" or not, DPlot doesn't round the current extents to multiples of the tick interval. Though this was no doubt done at a user's request, I don't think I like this. If "Specify extents" isn't checked then I'd think a more reasonable thing to do would be to set the extents to a multiple of the interval. I'll have to think on this one a bit.

If "Specify number" (of tick marks) is checked then DPlot does what I think you'd expect: it finds an interval that is, again, a multiple of 1, 1.5, 2, 2.5, 3, 4, 5, 6, or 8 times a power of 10 and forces the extents to be a multiple of that interval.
Visualize Your Data
support@dplot.com
Post Reply