All Questions
13
questions
1
vote
1
answer
197
views
ggmap legend not showing
I have two dataframes both recording the top 10 stations riders went. One is for casual rider, the other one is for member rider. Both dataframes contain column 'station','freq','latitude','longitude'....
0
votes
1
answer
54
views
Add legend for every point on ggmap instead of a group variable
I've got the following data frame:
df1 <- structure(list(City = c("Ahmadnagar", "Ahmedabad", "Akola", "Amaravati",
"Aurangabad", "Belgaum&...
0
votes
1
answer
134
views
Issues with plotting multiple data frames in ggplot/ggmap & creating a unified legend
library(sp)
library(sf)
library(ggplot2)
library(ggmap)
Format the bounding boxes for the NYC area
region.bb = c(left=-75,bottom=40,right=-72.5,top=42)
metro.bb = c(left=-74.23,bottom=40.58,right=-...
1
vote
1
answer
118
views
Adding legend when mapping residuals in ggplot
I have been trying to add a legend for the residuals but don't know where to place the code to make it work.
Here is the map of residuals but with no legend:
ggplot(lat_long, aes(lat_long$...
0
votes
0
answers
108
views
Need helping changing legend title in ggmap using scale_color_gradient2 [duplicate]
I have created a ggmap with points sized and color coded by "count". Therefore, the legend displays "count" as the title when I would like it to be "Visitors". Here is the code:
ggmap(sites_map) +
...
1
vote
1
answer
4k
views
Add legend to ggmap
I am trying to add a legend to a plot generated by ggmap package in R. The dataset I am working with is
Latitude Longitude amount
61.37072 -152.40442 436774
32.80667 -86.79113 3921030
...
0
votes
2
answers
3k
views
ggplot2 ggmap, R legend editing
Here is
code sample:
require(rgdal)
require(ggmap)
require(maptools)
library(RColorBrewer)
polska <- get_map(
location=c(lon=20.9589934, lat=53.5149404),
zoom=7,
maptype="roadmap"
)
...
2
votes
1
answer
532
views
Adding a second legend with ggmap
I am trying to build a map which includes points of different color and size. I managed to add a legend for the color, but I cannot figure why the size scale doesn't show up. I made 3 attempts, each ...
2
votes
1
answer
330
views
ggmap and ggplot2 map putting lines across point legend symbols
My code works perfectly fine for making this heat map, but in the legend there are lines through the symbols for "First" and "Second." Has anyone encountered this before and know how to remove the ...
2
votes
0
answers
1k
views
R ggmap legend/guide issues with multiple layers
I have been trying to create a map of membership locations from postcodes across the UK as a project in learning R. I have achieved nearly the result I wanted, but it's proving very frustrating ...
-2
votes
1
answer
430
views
ploting ggmap with geom Points (lat_long) annotated 1 to19. Points data is in CSVfile
I am plotting with ggmap and ggplot2 using geom_point. I want to add annotation text (i.e., 1 to 19) close to the points as well.
Here is my code:
setwd("../Documents/MAPS")
library(ggplot2)
library(...
0
votes
1
answer
507
views
fix minimum and maximum of the colourbar legend in ggmap
This is supposed to be a super easy question, but I am still learning ggplot and can't make it work.
I would like to fix the minimum and maximum value of the colourbar in this plot, to compare the ...
3
votes
1
answer
6k
views
R - adding legend to ggmap (ggplot2) while using annotate
FYI: I'm fairly new to ggplot2 and ggmap so I apologize for the sloppy code but it is the only way I've been able to plot sets of groups of points where each group has it's own color. Also my os is ...