title: MatPlotLib Scatter Plot Points All Have Same Color
body: <p>I'm creating a scatter plot in MatPlotLib and I'm trying to make the color of the points dependent on a third parameter (independent of X and Y). However, setting c=third_variable makes all of the dots the same color.</p>
  
  <p>My plot data is in a dictionary with a tuple of x and y data as the key and the third parameter (frequency, ranges from 1 to about 1000) as its value. Sample item: {[2 10]: 50}</p>
  
  <p>I want the colors of the points tied to frequency. As a starting place, I would like to make it such that dots with high frequency are darker and dots with low frequency are lighter.</p>
  
  <p>Here's my current output:<a href="https://i.stack.imgur.com/hY6C9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hY6C9.png" alt="current output"></a>
  And here's my code:</p>
  
  <pre><code>for key in pairs_hash:
      plt.scatter(key[0], key[1], c=pairs_hash[key], cmap=plt.cm.coolwarm)
  
  plt.show()
  </code></pre>
  
  <p>Thanks for the help!</p>