Skip to content

Map_data() documentation has what seems like a typo #4278

Closed
@ericopatto

Description

@ericopatto

This is not a complicated problem. In the reference page for the function map_data() (here), the example has the following call:

ggplot(choro, aes(long, lat)) +
  geom_polygon(aes(group = group, fill = assault)) +
  coord_map("albers",  at0 = 45.5, lat1 = 29.5)
}

And then later, there is something slightly different.

However, the call coord_map() should have lat0 instead of at0 as an argument (in both examples):

ggplot(choro, aes(long, lat)) +
  geom_polygon(aes(group = group, fill = assault)) +
  coord_map("albers",  lat0 = 45.5, lat1 = 29.5)
}

It works either way, since the name doesn't seem to matter here, but it's rather confusing.

I hope I'm doing this right. I've never used GitHub before, so maybe I'm wrong about something (maybe I'm filing it in the wrong place)... I just think this should be pointed out somewhere.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions