title: How to set amount of hue levels in seaborn?
body: <p>With the following code, I can use seaborn's scatterplot to plot data with certain colors assigned to data values.</p>
  <p>How can I set the amount of colors that get used in this example? (e.g. if I want to have only two colors used or more than the 6 shown in the example)</p>
  <pre><code>import seaborn as sns
  import matplotlib.pyplot as plt
  tips = sns.load_dataset('tips')
  
  print(&quot;tips.columns=&quot;, tips.columns) # tips.columns= Index(['total_bill', 'tip', 'sex', 'smoker', 'day', 'time', 'size'], dtype='object')
  
  
  sns.scatterplot(data=tips, x=&quot;total_bill&quot;, y=&quot;tip&quot;, hue=&quot;total_bill&quot;, )
  </code></pre>
  <p><a href="https://i.stack.imgur.com/x6Qko.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x6Qko.png" alt="enter image description here" /></a></p>