Skip to content

how to scale point size by area #1452

Description

@Zaf4

Hi,

I have a case where I need to generate a scatter plot (via geom_point(aes(..., size="value")), where the areas (instead of the radii) of the points should scale by the given value.

For example, a point with the value of 40 should have area twice as a point with value of 20, not twice the radius. I tried setting it by playing with some parameters in scale_size and usingscale_size_area but could not get what I expected. Honestly, the name scale_size_area felt like I found what I was looking for, but did not work as I expected and scaled by the radius (verified via inspecting in the browser).

Is there a way or a workaround to do so or is there a possible implementation error in the scale_size_area()?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions