title: Combining colored scatter plot and separate line plot
body: <p>I am trying to combine a scatter plot and a line plot using the <code>seaborn</code>-package (as it seems to be a neat way of using colormaps across categories).</p>
  
  <p>Currently I have two data sets stored as pandas DataFrames: <code>linear_data</code> for the linear case, and <code>scatter_data</code> for the scatter data. I am able to create two separate plots as such:</p>
  
  <pre><code>import seaborn as sns
  import numpy as np
  import matplotlib.pyplot as plt
  
  # creating a nice color palette with 10 different colors
  color_palette=sns.diverging_palette(10, 130, sep=100, n=10)
  
  N=300
  scatter_data = pd.DataFrame({'x' : np.random.random(N)*10, 'y' : 
  np.random.random(N)*100, 'score' : np.random.randint(1,10,N)})
  
  # create linear plot for linear_data
  
  lin_dict = {0.1: 51.98384470434041,
   0.25: 69.9192341826548,
   0.5: 83.48683256238559,
   1.0: 97.05443094211638,
   2.0: 110.62202932184718,
   3.0: 118.5585655988348,
   4.0: 124.18962770157796,
   5.0: 128.55741880016157,
   6.0: 132.1261639785656,
   7.0: 135.1434950339544,
   8.0: 137.75722608130874,
   9.0: 140.06270025555324,
   10.0: 142.12501717989235}
  
  linear_data = pd.DataFrame.from_dict(lin_dict, orient='index').sort_index(); 
  linear_data.index.name='x'; linear_data.columns = ['y']
  ax = sns.pointplot(x=linear_data.index, y=linear_data['y'], data=linear_data)
  
  # create scatter plot for scatter_data, having color scheme
  #    as in color_palette mapped onto the column 'score' (ranging from 1-10)
  
  fg = sns.FacetGrid(data=scatter_data, hue='score', palette=color_palette, size=5, aspect=1.5)
  fg.map(pyplot.scatter, 'x', 'y').add_legend()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6yAd5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6yAd5.png" alt="scatter and line plots"></a></p>
  
  <p>So, instead of having these two separately, I would obviously want to have them in the same plot! I can't find that <code>FacetGrid</code> takes any <code>ax</code>-variable, so not really sure on how to connect the two...</p>
  
  <p><strong>NEW:</strong> As mentioned in the comments, I would like the points in <code>linear_data</code> to be in the lower scatter plot, but <em>with lines interconnecting these points</em> (and obviously in a different color than the those used in the scatter-one, e.g. black) </p>
  
  <p>Any clue on solution for this?</p>