title: How to plot annotated heatmap on plotly?
body: <p>I'm trying to make a annotated heatmap on plotly. </p>
  
  <pre><code>import plotly.plotly as py
  import plotly.tools as tls
  from plotly.graph_objs import *
  import numpy as np
  import pandas as pd
  import matplotlib.pyplot as plt
  
  df = pd.read_csv('masterc.csv')
  
  locations = {}
  anno = []
  
  for i in range(df.shape[0]):
      locations.setdefault((df.iat[i,2],df.iat[i,6]),0)
      locations[(df.iat[i,2],df.iat[i,6])]+=df.iat[i,8]
  
  x1 = []
  y1 = []
  z1 = []
  z1_text = []
  
  for key in locations.keys():
      if key[0] not in x1:
          x1 += [key[0],]
      if key[1] not in y1:
          y1 += [key[1],]
  
  
  
  for y in y1:
      dummy = []
      for x in x1:
          if (x,y) in locations.keys():
              dummy += [locations[(x,y)],]
          else:
              dummy += [0,]
      z1 += [dummy,]
  
  data = z1
  
  arr = np.array(data)
  
  fig, ax = plt.subplots()
  
  ax.imshow(data, cmap='seismic')
  
  for (i, j), z in np.ndenumerate(data):
      ax.text(j, i, '{:f}'.format(z), ha='center', va='center')
  
  ax.set_xticklabels(x1, rotation=90)
  ax.set_yticklabels(y1)
  
  #plt.show()
  py.plot_mpl(fig)
  </code></pre>
  
  <p>I'm getting the following warning </p>
  
  <pre><code>Warning (from warnings module):
    File "C:\Python27\lib\site-packages\plotly\matplotlylib\renderer.py", line 394
      warnings.warn("Aw. Snap! You're gonna have to hold off on "
  UserWarning: Aw. Snap! You're gonna have to hold off on the selfies for now. Plotly can't import images from matplotlib yet!
  </code></pre>
  
  <p>and finally the following error</p>
  
  <pre><code>Traceback (most recent call last):
    File "E:\Project Kumbh\heatmap with annotations.py", line 58, in &lt;module&gt;
      py.plot_mpl(fig)
    File "C:\Python27\lib\site-packages\plotly\plotly\plotly.py", line 261, in plot_mpl
      return plot(fig, **plot_options)
    File "C:\Python27\lib\site-packages\plotly\plotly\plotly.py", line 155, in plot
      figure = tools.return_figure_from_figure_or_data(figure_or_data, validate)
    File "C:\Python27\lib\site-packages\plotly\tools.py", line 1409, in return_figure_from_figure_or_data
      if not figure['data']:
  KeyError: 'data'
  </code></pre>
  
  <p>Is there anyway to get around this error? Or is there any simple way to make an annotated heatmap on plotly?</p>