How to change the marker size and the respective label in the legend to meaningful values like [20,40,60,80] ? Do I need to derive handles and labels from an additional dummy dataset and how to plot it, so that it will not be visible (alpha=0.0 will not work?)?
import matplotlib.pyplot as plt
import numpy as np
x = [1,2,3,4,5]
y = [1,2,3,4,5]
size = np.asarray([0.84,0.53,0.24,0.47,0.18]) * 100
s1 = plt.scatter(x, y, s=size)
handles, labels = s1.legend_elements(prop="sizes")
legend2 = plt.legend(handles, labels, frameon=False, title="Sizes")
plt.show()