title: "min() arg is an empty sequence" when trying to convert my pandas plot into plotly
body: <p>I receive an <code>ValueError: min() arg is an empty sequence</code> when trying to convert a pandas dataframe plot to plotly. </p>
  
  <p>Here is a sample of the dataframe (with NaNs):</p>
  
  <p><code>ttab.loc[:,:"Irish"]</code></p>
  
  <pre><code>Group   English (British)   Americans (White)   Canadians   Scots   Irish
  Year                    
  1926    1   2   3   4   5
  1946    3   1   2   5   4
  1956    3   1   2   7   5
  1966    2   1   3   9   5
  1977    2   1   3   9   7
  1993    2   NaN NaN 6   1
  2001    4   1   3   NaN 5
  2001*   4   1   3   NaN 5
  2012    4   1   3   NaN 6
  </code></pre>
  
  <p>I make a pretty plot:</p>
  
  <pre><code># Time It
  import time
  begin = time.clock()
  
  # Inline plotting
  %matplotlib inline
  
  # Import libraries
  import matplotlib
  import numpy as np
  import matplotlib.pyplot as plt
  import pandas as pd
  import seaborn as sns
  from pandas.tools.plotting import scatter_matrix
  
  # (*) To communicate with Plotly's server, sign in with credentials file
  import plotly.plotly as py
  # (*) Useful Python/Plotly tools
  import plotly.tools as tls
  # (*) Graph objects to piece together plots
  from plotly.graph_objs import *
  
  # Read, clean, slice data here...
  # Rename columns, examine, rename groups here...
  # Merge, set index, transpose dataframe here....
  # Change datatype to float here...
  # Define color palette here...
  # Now Plot...
  
  # Package all mpl plotting commands inside one function
  def plot_mpl_fig():
  
      # plot parameters
      figsize = (12,12)
      axfontsize = 16
      legfontsize = 14
      labfontsize = 18
      yax = (30,0)
      lw = 2
  
      # Interpolate NaNs and plot as dashed lines
      ax = ttab.loc[:,:'Asian Indians'].interpolate().plot(color=colorlist, ylim=yax, lw=lw, fontsize=axfontsize, \
                                                       figsize=figsize, style='--')
  
      # Overplot the measured values with solid lines
      ttab.loc[:,:'Asian Indians'].plot(ax=ax, color=colorlist, ylim=yax, lw=lw, fontsize=axfontsize, figsize=figsize)
  
      # Legend handling
      lines, labels = ax.get_legend_handles_labels()
      ax.legend(lines[28:], labels[28:], loc='center left', bbox_to_anchor=(-0.3, 0.5), fontsize=legfontsize)
  
      # Labeling
      plt.xlabel('Year',fontsize=labfontsize)
      plt.ylabel('Rank',fontsize=labfontsize)
  
  # Plot it!
  plot_mpl_fig()
  
  # N.B. get matplotlib figure object and assign a variable to it
  mpl_fig1 = plt.figure()
  </code></pre>
  
  <p>And then I try to convert by following the example at: <a href="https://plot.ly/python/matplotlib-to-plotly-tutorial/" rel="noreferrer">https://plot.ly/python/matplotlib-to-plotly-tutorial/</a></p>
  
  <p>Quickstart:</p>
  
  <pre><code>&gt;&gt;&gt; import plotly.plotly as py
  &gt;&gt;&gt; import matplotlib.pyplot as plt
  &gt;&gt;&gt; # auto sign-in with credentials or use py.sign_in()
  &gt;&gt;&gt; mpl_fig_obj= plt.figure()
  &gt;&gt;&gt; # ... make a matplotlib figure ...
  &gt;&gt;&gt; py.plot_mpl(mpl_fig1)                                  # &lt;== ValueError
  </code></pre>
  
  <p>Or Tutorial at Section 6.1:</p>
  
  <pre><code># Convert a matplotlib figure object to a Plotly figure object
  help(tls.mpl_to_plotly)
  py_fig1 = tls.mpl_to_plotly(mpl_fig1, verbose=True)         # &lt;== ValueError
  print(py_fig1.to_string())
  # Plot a matplotlib figure in Plotly
  help(py.iplot_mpl) 
  py.iplot_mpl(mpl_fig1, filename='s6_damped_oscillation')    # &lt;== ValueError
  </code></pre>
  
  <p>Anytime I call <code>plot_mpl</code>, <code>mpl_to_plotly</code>, or <code>iplot_mpl</code> I get the <code>ValueError: min() arg is an empty sequence</code>. I think it might have to do with the NaNs, but I don't know how to work around that. Any suggestions?</p>