code: public static void computeAutoGeneratedAxisValues(float start, float stop, int steps, AxisAutoValues outValues) {
          double range = stop - start;
          if (steps == 0 || range <= 0) {
              outValues.values = new float[]{};
              outValues.valuesNumber = 0;
              return;
          }
  
          double rawInterval = range / steps;
          double interval = roundToOneSignificantFigure(rawInterval);
          double intervalMagnitude = Math.pow(10, (int) Math.log10(interval));
          int intervalSigDigit = (int) (interval / intervalMagnitude);
          if (intervalSigDigit > 5) {
              // Use one order of magnitude higher, to avoid intervals like 0.9 or 90
              interval = Math.floor(10 * intervalMagnitude);
          }
  
          double first = Math.ceil(start / interval) * interval;
          double last = nextUp(Math.floor(stop / interval) * interval);
  
          double intervalValue;
          int valueIndex;
          int valuesNum = 0;
          for (intervalValue = first; intervalValue <= last; intervalValue += interval) {
              ++valuesNum;
          }
  
          outValues.valuesNumber = valuesNum;
  
          if (outValues.values.length < valuesNum) {
              // Ensure stops contains at least numStops elements.
              outValues.values = new float[valuesNum];
          }
  
          for (intervalValue = first, valueIndex = 0; valueIndex < valuesNum; intervalValue += interval, ++valueIndex) {
              outValues.values[valueIndex] = (float) intervalValue;
          }
  
          if (interval < 1) {
              outValues.decimals = (int) Math.ceil(-Math.log10(interval));
          } else {
              outValues.decimals = 0;
          }
      }
docs: Computes the set of axis labels to show given start and stop boundaries and an ideal number of stops between
  these boundaries.
  
  @param start     The minimum extreme (e.g. the left edge) for the axis.
  @param stop      The maximum extreme (e.g. the right edge) for the axis.
  @param steps     The ideal number of stops to create. This should be based on available screen space; the more
  space
  there is, the more stops should be shown.
  @param outValues The destination {@link AxisAutoValues} object to populate.