title: How to add edge line to markers on the legend using matplotlib/seabornn
body: <p>I have a bubble chart with the legend showing two categories differentiated by color and size, the markers on the scatter have black edge color and I like the markers shown in the legend to have it too, anyone know how can I do it?</p>
  <p>I'm using seaborn scatterplot to generate the graph</p>
  <pre><code>Summary = pd.read_csv(&quot;Summary.csv&quot;)
  
  ####################################################################################
  # Plot the scatterplot
  ####################################################################################
  
  f, (ax1, ax2) = plt.subplots(ncols=2, nrows=1, sharey=True, figsize=(8.27,5.8))
  #----------------------------------------------------------------------------------------
  # add a big axes, hide frame, common axis labels
  #----------------------------------------------------------------------------------------
  f.add_subplot(111, frameon=False)
  # hide tick and tick label of the big axes
  plt.tick_params(labelcolor='none', top=False, bottom=False, left=False, right=False)
  plt.grid(False)
  plt.xlabel('T$_{s}$ - T$_{sat}$ [$^{\circ}$C]', fontsize=14)
  plt.ylabel('Heat Flux [W$\cdot$cm$^{-2}$]', fontsize=14)
  #----------------------------------------------------------------------------------------
  
  # Change the minimum and maximum point size
  ax=sns.scatterplot(x='T_surf - T_sat [C]', y='Heat Flux [W/cm2]', data=Summary, # Choose the x and y values and the dataframe 
                       size='Mass flux [kg$\cdot$m$^{-2}$$\cdot$s$^{-1}$]', # Size of markers
                       hue='Enhanced Surface', # Color by surface type
                       #color='Greys',
                       alpha=1.0,
                       #style='Enhanced Surface', # Marker by surface type
                       sizes=(20, 700), # minimum and maximum marker size
                       palette = 'Blues',
                       #markers=[&quot;X&quot;,&quot;d&quot;, &quot;*&quot;,&quot;s&quot;], # Change the markers' style
                       markers='o',
                       edgecolor= &quot;Black&quot;, # Change the edge color of the markers
                       linewidth=0.5, # Change the edge linewidth of the markers
                       legend=False,
                       ax=ax1
                      )
  
  ax=sns.scatterplot(x='T_surf - T_sat [C]', y='Heat Flux [W/cm2]', data=Summary, # Choose the x and y values and the dataframe 
                       size='Mass flux [kg$\cdot$m$^{-2}$$\cdot$s$^{-1}$]', # Size of markers by population
                       hue='Enhanced Surface', # Color by surface type
                       #cmap='Greys',
                       alpha=1.0,
                       #style='Enhanced Surface', # Marker by surface type
                       sizes=(20, 700), # minimum and maximum marker size
                       palette = 'Blues',
                       #markers=[&quot;X&quot;,&quot;d&quot;, &quot;*&quot;,&quot;s&quot;], # Change the markers' style
                       markers='o',
                       edgecolor= &quot;Black&quot;, # Change the edge color of the markers
                       linewidth=0.5, # Change the edge linewidth of the markers
                       legend='auto',
                       ax=ax2
                      )
  
  
  ax1.set_xlim(-60, 120)
  ax2.set_xlim(790, 810)
  
  # labels = ax1.get_legend_handles_labels()
  ####################################################################################
  # Use the matplotlib library to edit the plot
  ####################################################################################
  
  #Legend
  lgd = ax2.legend(loc=&quot;upper right&quot;, frameon = 0.5, framealpha=0.8, # Create a legend and define its location, frame and frame alpha
                    edgecolor='white', facecolor='white', ncol=2, # Edgecolor, facecolor and the number of columns
                    title='', fontsize=10, # the title and the font size
                    handlelength=1, handleheight=2, columnspacing = 1.0, labelspacing=1.5,
                    markerscale=1.0, markerfirst = False)
  
  
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/hG7Z6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hG7Z6.png" alt="BubbleChart" /></a></p>