In the pyplot document for scatter plot:

```
matplotlib.pyplot.scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None,
vmin=None, vmax=None, alpha=None, linewidths=None,
faceted=True, verts=None, hold=None, **kwargs)
```

The marker size

s:

size in points^2. It is a scalar or an array of the same length as x and y.

What kind of unit is `points^2`

? What does it mean? Does `s=100`

mean `10 pixel x 10 pixel`

?

Basically I'm trying to make scatter plots with different marker sizes, and I want to figure out what does the `s`

number mean.

## Best Solution

This can be a somewhat confusing way of defining the size but you are basically specifying the

areaof the marker. This means, to double the width (or height) of the marker you need to increase`s`

by a factor of 4. [because A = WH => (2W)(2H)=4A]There is a reason, however, that the size of markers is defined in this way. Because of the scaling of area as the square of width, doubling the width actually appears to increase the size by more than a factor 2 (in fact it increases it by a factor of 4). To see this consider the following two examples and the output they produce.

gives

Notice how the size increases very quickly. If instead we have

gives

Now the apparent size of the markers increases roughly linearly in an intuitive fashion.

As for the exact meaning of what a 'point' is, it is fairly arbitrary for plotting purposes, you can just scale all of your sizes by a constant until they look reasonable.

Hope this helps!

Edit:(In response to comment from @Emma)It's probably confusing wording on my part. The question asked about doubling the width of a circle so in the first picture for each circle (as we move from left to right) it's width is double the previous one so for the area this is an exponential with base 4. Similarly the second example each circle has

areadouble the last one which gives an exponential with base 2.However it is the second example (where we are scaling area) that doubling area appears to make the circle twice as big to the eye. Thus if we want a circle to appear a factor of

`n`

bigger we would increase the area by a factor`n`

not the radius so the apparent size scales linearly with the area.Editto visualize the comment by @TomaszGandor:This is what it looks like for different functions of the marker size: