title: How do I plot system time on ZedGraph's XAxis using C#?
body: <p>I have searched some examples of ZedGraph, but I couldn't perform what I wanted. I am drawing real-time data each 20&nbsp;ms, and I want to show the system time on the x-axis (using the ZedGraph class <code>XAxis</code>). However when I try to draw milliseconds on the x-axis I cannot see any data. Here is my code:</p>
  
  <pre><code>//X-Axis Settings
  pane.XAxis.Scale.MinorStep = 1;
  pane.XAxis.Scale.MajorStep = 5;
  pane.XAxis.Type = AxisType.Date;
  pane.XAxis.Scale.Format = "HH:mm:ss.fff";
  pane.XAxis.Scale.Min = new XDate(DateTime.Now);
  pane.XAxis.Scale.Max = new XDate(DateTime.Now.AddSeconds(10));
  pane.XAxis.Scale.MinorUnit = DateUnit.Second;
  pane.XAxis.Scale.MajorUnit = DateUnit.Second;
  
  XDate time = new XDate(DateTime.Now.ToOADate());
  for (int i = 1; i &lt; 16; i++)
  {
      listAuido.Add(time, (double)Read_Data1[i]);
  }
  
  Scale xScale1 = zgcMasterPane.MasterPane.PaneList[0].XAxis.Scale;
  if (time.XLDate &gt; xScale1.Max)
  {
     xScale1.Max = (XDate)(DateTime.Now.AddSeconds(1));
     xScale1.Min = (XDate)(DateTime.Now.AddSeconds(-20));
  }
  </code></pre>
  
  <p>Edit: This code structure is solved my problem. </p>