Enlarges the current minimum and maximum ranges to include the data range of the last plotObject added, if it is an XY_DATA or ARROWS plotObject. Does not set the new limits as default, does not redraw the plot.
()
| 2411 | * if it is an XY_DATA or ARROWS plotObject. |
| 2412 | * Does not set the new limits as default, does not redraw the plot. */ |
| 2413 | void fitRangeToLastPlotObject() { |
| 2414 | if (allPlotObjects.size() < 1) return; |
| 2415 | PlotObject plotObject = allPlotObjects.lastElement(); |
| 2416 | if (Double.isNaN(currentMinMax[0]) || Double.isNaN(currentMinMax[2])) { // no range determined yet? |
| 2417 | setLimitsToFit(false); |
| 2418 | } else { //we have min&max already, just extend the range if necessary |
| 2419 | enlargeRange = new int[currentMinMax.length]; |
| 2420 | getMinAndMax(currentMinMax, enlargeRange, plotObject, ALL_AXES_RANGE); |
| 2421 | enlargeRange(currentMinMax); |
| 2422 | } |
| 2423 | } |
| 2424 | |
| 2425 | /** Gets the minimum and maximum values from an XY_DATA or ARROWS plotObject; |
| 2426 | * axisRangeFlags determine for which axis (X_RANGE for x axis, Y_RANGE for y axis) |
no test coverage detected