(minor) feature request: Clipping by longitude/latitude
- Dominant language
- R
- Stars
- 778
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Feature request rather than bug.
The following is an example taken from Stack Overflow, which is a minimal example of some similar code I'm working with:
island = get_map(location = c(lon = -63.247593, lat = 17.631598), zoom = 13, maptype = "satellite")
```
RL <- read.table(text = "1 17.6328 -63.27462
2 17.64614 -63.26499
3 17.64755 -63.25658
4 17.64632 -63.2519
5 17.64888 -63.2311
6 17.63113 -63.2175
7 17.61252 -63.23623
8 17.62463 -63.25958", header = F)
RL <- setNames(RL, c("ID", "Latitude", "Longitude"))
ggmap(island, extent = "panel", legend = "bottomright") +
geom_point(aes(x = Longitude, y = Latitude), data = RL, size = 4, color = "#ff0000") +
scale_x_continuous(limits = c(-63.280, -63.20), expand = c(0, 0)) +
scale_y_continuous(limits = c(17.60, 17.66), expand = c(0, 0))
```
This achieves exactly the desired effect on this map (and works in my own code too for my purposes) but generates warnings about redefining the X/Y scales.
Would it be possible to incorporate the xlimits and ylimits as ggmap parameters so this is done without a warning rather than having to use scale_x_continuous and scale_y_continuous?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.