How can I add a scale (diameter) legend for the circles in a scatter plotting?
The code below produces some circles, whose diameters are relevant to a parameter.
I'd like to add a legend, similar to legends for maps, in which distances are reported as a horizontal bar with scale or the way around.
import numpy as np
import matplotlib.pyplot as plt
x = np.random.rand(5)
y = np.random.rand(5)
some_relevant_data = [np.random.rand(3) for i in np.random.rand(5)]
some_meaningful_data = np.random.random_integers(100,1000,5)
plt.scatter(x, y, s=some_meaningful_data, c=some_relevant_data, alpha=1)
plt.show()