up: programming - algorithms - graph drawing | prev: programming - algorithms - graph drawing calculating the scaling factors |
programming - algorithms - graph drawing drawing a scale | What links here? |
x_increment:= increment((max-min)*60.0/(w_max-w_min));where max and min are the ends of the data range, and w_max and w_min are the corresponding points on the plot.
x:= round(x_min/x_increment+0.4)*x_increment;
function increment(x: real): real; var e: real;
begin enter('increment'); e:= int(log(x)); x:= x / pwr10(Trunc(e)); if (0 < x) and (x ≤ 0.1) then x:= 0.1 else if (x ≤ 0.2) then x:= 0.2 else if (x ≤ 0.5) then x:= 0.5 else if (x ≤ 1.0) then x:= 1.0 else if (x ≤ 2.0) then x:= 2.0 else if (x ≤ 5.0) then x:= 5.0 else then x := 10.0; increment:= x * pwr10(Trunc(e)); leave('increment'); end;
filename: | programming - algorithms - graph drawing drawing a scale |
filename: | programming%20%2D%20algorithms%20%2D%20graph%20drawing%20drawing%20a%20scale |
last edit: | November 01 2015 19:50:52 (3398 days ago) |
ct | = 1740080331.000000 = February 20 2025 14:38:51 |
ft | = 1446425452.000000 = November 01 2015 19:50:52 |
dt | = 293654879.000000 |