Get X Axis label and interval
-
Hi All, I am trying to come up with an algorithm to get following three piece of information to plot a chart: 1. Start : Should be close to the minimum value of the dataset 2. Stop : Should be close to the maximum value of the dataset 3. Interval : Should be such that it will have "0" on the axis when interval traverses from minimum to maximum. Example: dataset{-266,-17.6,0.5,2000,6000} My final return values should be: Start: 400 Stop: 6000 Interval:200 Note: Since start is 400 and interval is 200, we will have 0 as a point on the x-axis.
-
Hi All, I am trying to come up with an algorithm to get following three piece of information to plot a chart: 1. Start : Should be close to the minimum value of the dataset 2. Stop : Should be close to the maximum value of the dataset 3. Interval : Should be such that it will have "0" on the axis when interval traverses from minimum to maximum. Example: dataset{-266,-17.6,0.5,2000,6000} My final return values should be: Start: 400 Stop: 6000 Interval:200 Note: Since start is 400 and interval is 200, we will have 0 as a point on the x-axis.
-
How did you choose 400 to be 'close' to -266? Plotting the values from 400 to 6000 in intervals of 200 is a simple straight line. Your question is not clear.
400 value is in example. I came up with those numbers to explain what I am trying to achieve. Actually, I did figure this out. Thanks.