title: tsplot out of bounds error in Python seaborn
body: <p>i'm trying to plot time series data as points in seaborn, colored by condition. i tried the following:</p>
  
  <pre><code>import matplotlib
  import matplotlib.pylab as plt
  import seaborn as sns
  import pandas
  
  df = pandas.DataFrame({"t": [0, 1],
                         "y": [1, 1],
                         "c": ["A", "B"]})
  colors = {"A": "r", "B": "g"}
  fig = plt.figure()
  # this fails
  sns.tsplot(time="t", value="y", condition="c", unit="c",
             data=df, err_style="unit_points", interpolate=False,
             color=colors)
  plt.show()
  </code></pre>
  
  <p>the error is:</p>
  
  <pre><code>x_diff = x[1] - x[0]
  IndexError: index 1 is out of bounds for axis 0 with size 1
  </code></pre>
  
  <p>however if i plot the data as:</p>
  
  <pre><code># this works
  sns.pointplot(x="t", y="y", hue="c", join=False, data=df)
  </code></pre>
  
  <p>then it works. <code>pointplot</code> treats time as categorical data though which is not right for this. how can this be done with <code>tsplot</code>? it should give the same result as <code>pointplot</code> except the x-axis (<code>t</code>) should scale quantitatively like time and not as categorical.</p>
  
  <p><strong>update</strong></p>
  
  <p>here's a revised example that shows <code>tsplot</code> fails even when there are multiple observations for most of the labels. in this df 2 out of 3 conditions have multiple observations, but 1 condition that doesn't is enough to cause the error:</p>
  
  <pre><code>df = pandas.DataFrame({"t": [0, 1.1, 2.9, 3.5, 4.5, 5.9],
                         "y": [1, 1, 1, 1, 1, 1],
                         "c": ["A", "A", "B", "B", "B", "C"]})
  colors = {"A": "r", "B": "g", "C": "k"}
  print df
  fig = plt.figure()
  # this works but time axis is wrong
  #sns.pointplot(x="t", y="y", hue="c", join=False, data=df)
  
  # this fails
  sns.tsplot(time="t", value="y", condition="c", unit="c",
             data=df, err_style="unit_points", interpolate=False,
             color=colors)
  plt.show()
  </code></pre>
  
  <p>@mwaskom suggested making ordinary plot. doing that manually is difficult is error prone and duplicates work that seaborn already does. seaborn already has a way to plot and facet data by various features in dataframes and i don't want to reproduce this code. here's a way to do manually which is cumbersome:</p>
  
  <pre><code># solution using plt.subplot
  # cumbersome and error prone solution
  # the use of 'set' makes the order non-deterministic
  for l in set(df["c"]):
      subset = df[df["c"] == l] 
      plt.plot(subset["t"], subset["y"], "o", color=colors[l], label=l)
  </code></pre>
  
  <p>basically i am looking for something like <code>sns.pointplot</code> that uses numeric, rather than categorical x-axis. does seaborn have something like this? another way to think of it is as a dataframe aware version of <code>plt.scatter</code> or <code>plt.plot</code>.</p>