i using core plot library drawing graph. dynamic values y-axis , calculate ymin , ymax result set. difference between (ymax-ymin) may low or high. want create dynamic intervals between these values. if difference low major interval should less , if high major interval should high. can't set preferrednumberofmajorticks static value values may vary. code should work every case. please guide me code example.
@eric response. tried both of solutions.first onecptaxislabelingpolicyequaldivisions divides range in 1 interval if ymax , ymin (128.5 , 123.2) 1 interval seems nice if values (5550-100) shows 1 interval such big difference of values.secondly tried cptaxislabelingpolicyfixedinterval , calculated majorintervallength dividing length different number of intervals,it works fine again don't want keep value of interval static .as if divide length 4 create 4 intervals low values 4.5 , 3.5. can please guide me if there way calculate no of intervals ymax , ymin?
try cptaxislabelingpolicyautomatic axis labeling policy. pick "nice" intervals within plot range ticks , labels. can use cptaxislabelingpolicyequaldivisions labeling policy divide plot range equal parts, although there no guarantees ticks on "nice" values. if want control, stick default labeling policy (cptaxislabelingpolicyfixedinterval). divide length of plot range (ymax-ymin) desired number of intervals compute majorintervallength.
Comments
Post a Comment