title: Axis scale displays a wrong value
body: <p>Within ZedGraph you can draw an XY graph easily. Let's use default scale for X axis and a custom scale (0 to 10, major step 2.5, minor step 1) for Y, then redraw the graph:</p>
  
  <pre><code>public Form1()
  {
      InitializeComponent();
      zedGraphControl1.GraphPane.YAxis.Scale.Min = 0;
      zedGraphControl1.GraphPane.YAxis.Scale.Max = 10;
      zedGraphControl1.GraphPane.YAxis.Scale.MajorStep = 2.5;
      zedGraphControl1.GraphPane.YAxis.Scale.MinorStep = 1;
      zedGraphControl1.AxisChange();
      zedGraphControl1.Invalidate();
  }
  </code></pre>
  
  <p>Which will display this:</p>
  
  <p><a href="https://i.stack.imgur.com/iVglX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iVglX.png" alt="enter image description here"></a></p>
  
  <p>As you can see, <code>3</code> and <code>8</code> are <code>2.5</code> and <code>7.5</code> displayed in the wrong format. Here's how ZedGraph decide of the format to use:</p>
  
  <pre><code>internal void SetScaleMag(double min, double max, double step)
  {
      // set the scale magnitude if required
      if (this._magAuto)
      {
          // Find the optimal scale display multiple
          double minMag = Math.Floor(Math.Log10(Math.Abs(this._min)));
          double maxMag = Math.Floor(Math.Log10(Math.Abs(this._max)));
  
          double mag = Math.Max(maxMag, minMag);
  
          // Do not use scale multiples for magnitudes below 4
          if (Math.Abs(mag) &lt;= 3)
          {
              mag = 0;
          }
  
          // Use a power of 10 that is a multiple of 3 (engineering scale)
          this._mag = (int)(Math.Floor(mag / 3.0) * 3.0);
      }
  
      // Calculate the appropriate number of dec places to display if required
      if (this._formatAuto)
      {
          int numDec = 0 - (int)(Math.Floor(Math.Log10(this._majorStep)) - this._mag);
          if (numDec &lt; 0)
          {
              numDec = 0;
          }
  
          this._format = "f" + numDec.ToString(CultureInfo.InvariantCulture);
      }
  }
  </code></pre>
  
  <p>Which, here, leads to <code>f0</code>. Obviously this is not correct. I could just add 1 to <code>numDec</code> but this would display useless information for XAxis (0,20;0.40...)</p>
  
  <p>I know that if I use values like <code>10/3d</code> as major step I will <em>never</em> be able to lose information but I would prefer to display 6.7 instead of 7 (reduce the error).</p>
  
  <p>Is there a way to fix this?</p>