def plot_day_summary(ax, quotes, ticksize=3, colorup='k', colordown='r'):
 lines = []
 for q in quotes:
  (t, open, close, high, low) = q[:5]
  if (close >= open):
   color = colorup
  else:
   color = colordown
  vline = Line2D(xdata=(t, t), ydata=(low, high), color=color, antialiased=False)
  oline = Line2D(xdata=(t, t), ydata=(open, open), color=color, antialiased=False, marker=TICKLEFT, markersize=ticksize)
  cline = Line2D(xdata=(t, t), ydata=(close, close), color=color, antialiased=False, markersize=ticksize, marker=TICKRIGHT)
  lines.extend((vline, oline, cline))
  ax.add_line(vline)
  ax.add_line(oline)
  ax.add_line(cline)
 ax.autoscale_view()
 return lines

def plot_day_summary ( ax , quotes , ticksize = 3 , colorup = 'k' , colordown = 'r' ) : lines = [ ] for q in quotes : ( t , open , close , high , low ) = q [ : 5 ] if ( close >= open ) : color = colorup else : color = colordown vline = Line2D ( xdata = ( t , t ) , ydata = ( low , high ) , color = color , antialiased = False ) oline = Line2D ( xdata = ( t , t ) , ydata = ( open , open ) , color = color , antialiased = False , marker = TICKLEFT , markersize = ticksize ) cline = Line2D ( xdata = ( t , t ) , ydata = ( close , close ) , color = color , antialiased = False , markersize = ticksize , marker = TICKRIGHT ) lines . extend ( ( vline , oline , cline ) ) ax . add_line ( vline ) ax . add_line ( oline ) ax . add_line ( cline ) ax . autoscale_view ( ) return lines
quotes is a list of tuples represent the time .