Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve default marker scaling in pointplot #142

Open
ResidentMario opened this issue Jul 5, 2019 · 0 comments
Open

Improve default marker scaling in pointplot #142

ResidentMario opened this issue Jul 5, 2019 · 0 comments

Comments

@ResidentMario
Copy link
Owner

The scale parameter in geoplot takes a scale and applies it to a marker. In the case of sankey (linewidth) and cartogram (xfact scaling) the manner and effect of the scaling is obvious. With pointplot, which uses ax.scatter, it is less so.

The ax.scatter function used by pointplot manages the size of the points plotted using the s parameter. If you marker is a circle, the s parameter is the area of the circle plotted; if it is some other marker, it is proportional to the bounding box on the shape. There is an StackOverflow thread on this subject that is a helpful reference on this subject.

The current implementation takes the dscale value of the point and squares it, e.g. uses the scale to determine the radius of the point. This is unsatisfactory because it has the effect of creating a perceptively exponential curve:

foo

Notice how even though 8 mil is only 4x 2 mil, it appears to be an order of magnitude larger instead. That's because its area is actually 16x higher. And it's area, not radius, which matters to the viewer.

We should move to a different scaling for pointplot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant