Skip to content

Smallest points are removed from plot #1022

Closed
@geotheory

Description

@geotheory

This stackoverflow question gives detail.

The smallest points are lost from the plot when data ranges across several orders of magnitude and scale_size_area is being used, I think due to rounding to zero somewhere. The example demonstrates (look for the 10 point):

d = data.frame(x=1:4, y=rep(1,4), v=10^(1:4))
ggplot(d, aes(x, y, size=v)) + geom_point(alpha=.5) + geom_text(aes(label = v), size=8, col='red') +
scale_size_area(max_size = 500) + theme(legend.position = "none")

Mostly not a problem, but can be for some plots - this map of commuter patterns loses points in neighbouring cities (white labels show where points should be).

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