Skip to content
Advertisement

How to relate size parameter of .scatter() with radius?

I want to draw some circles using `ax3.scatter(x1, y1, s=r1 , facecolors=’none’, edgecolors=’r’), where:

  • x1 and y1 are the coordinates of these circles
  • r1 is the radius of these circles

I thought typing s = r1 I would get the correct radius, but that’s not the case.

How can I fix this?

Advertisement

Answer

If you change the value of ‘r’ (now 5) to your desired radius, it works. This is adapted from the matplotlib.org website, “Scatter Plots With a Legend”. Should be scatter plots with attitude!

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement