title: How can I use DateAxisItem of PyQtGraph?
body: <p>I'm using PyQtGraph '0.9.8+gd627e39' on Python 3.6.2(32bit) and Windows 10.</p>
  
  <p>My goal is to plot real time data with an X-axis that shows datetime.</p>
  
  <pre><code>Time                                                Value
  datetime.datetime(2018, 3, 1, 9, 36, 50, 136415)    10
  datetime.datetime(2018, 3, 1, 9, 36, 51, 330912)    9
  datetime.datetime(2018, 3, 1, 9, 36, 51, 382815)    12
  datetime.datetime(2018, 3, 1, 9, 36, 52, 928818)    11
  ...
  </code></pre>
  
  <p>I looked up related issues such as 
  <a href="https://gist.github.com/friendzis/4e98ebe2cf29c0c2c232" rel="noreferrer">https://gist.github.com/friendzis/4e98ebe2cf29c0c2c232</a>, <a href="https://stackoverflow.com/questions/28296049/pyqtgraph-plotting-time-series">pyqtgraph, plotting time series</a>, but it's still hard for me to grasp how to use <code>DateAxisItem</code></p>
  
  <p>I tried to make a simple code using the module, </p>
  
  <pre><code>import numpy as np
  import pyqtgraph as pg
  from pyqtgraph.Qt import QtCore, QtGui
  from datetime import datetime
  from time import time
  
  t1 = datetime.now()
  t2 = datetime.now()
  
  list_x = [ t1, t2 ]
  list_y = [ 0, 1 ]
  
  date_axis = pg.graphicsItems.DateAxisItem.DateAxisItem(orientation = 'bottom')
  graph = pg.PlotWidget(axisItems = {'bottom': date_axis})
  
  graph.plot(x=list_x, y=list_y, pen=None, symbol='o')
  graph.show()
  </code></pre>
  
  <p>but it shows an error message and doesn't show its X-axis at all.</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;tmp 10&gt;", line 19, in &lt;module&gt;
      graph.plot(x=list_x, y=list_y, pen=None, symbol='o')
  File "d:\python36-32\lib\site-packages\pyqtgraph\graphicsItems\PlotItem\PlotItem.py", line 636, in plot
      item = PlotDataItem(*args, **kargs)
  File "d:\python36-32\lib\site-packages\pyqtgraph\graphicsItems\PlotDataItem.py", line 177, in __init__
      self.setData(*args, **kargs)
  File "d:\python36-32\lib\site-packages\pyqtgraph\graphicsItems\PlotDataItem.py", line 461, in setData
      self.updateItems()
  File "d:\python36-32\lib\site-packages\pyqtgraph\graphicsItems\PlotDataItem.py", line 493, in updateItems
      self.scatter.setData(x=x, y=y, **scatterArgs)
  File "d:\python36-32\lib\site-packages\pyqtgraph\graphicsItems\ScatterPlotItem.py", line 308, in setData
      self.addPoints(*args, **kargs)
  File "d:\python36-32\lib\site-packages\pyqtgraph\graphicsItems\ScatterPlotItem.py", line 388, in addPoints
      newData['x'] = kargs['x']
  TypeError: float() argument must be a string or a number, not 'datetime.datetime'
  </code></pre>
  
  <p>Is it because <code>DateAxisItem</code> doesn't support datetime? It would be great if I could understand the module by looking its code, but unfortunately, my skills are not good.</p>
  
  <p>I'd appreciate it if anyone could show me how to use the module with some simple data.</p>