Skip to content

Instantly share code, notes, and snippets.

@malcolmbarrett
Last active August 18, 2021 21:20
Show Gist options
  • Save malcolmbarrett/b42101a975c83d885ce62123baaac38a to your computer and use it in GitHub Desktop.
Save malcolmbarrett/b42101a975c83d885ce62123baaac38a to your computer and use it in GitHub Desktop.
# Hello,
# Can anyone help me: I want just to have line plot but when I plot it looks like so as it is indicated in the picture. I am using the following code:
# Plot the 7th graph for Google mobility. Recreation & Retail
USAMobility <- USAMobility %>%
dplyr::mutate(date=dmy(j))
PLOT7 <- USAMobility %>%
ggplot(aes(x=date, y=retail_and_recreation_percent_change_from_baseline)) +
geom_line(aes(x=date,y=retail_and_recreation_percent_change_from_baseline, color="Google Mobility. Retail & Recreation"), size=0.75)+
labs(title="", x="", y="")+theme_classic()+theme(legend.position=c(0.79,0.89), legend.justification = c("left"),legend.key.width=unit(1.25, "lines"), legend.text=element_text(size=11),legend.title=element_blank(), legend.box = "vertical",
axis.text.x = element_text(size = 10), axis.text.y = element_text(size = 10), panel.border = element_rect(colour = "black", fill=NA, size=0.5))+
scale_color_manual(values = c("#fd0f27"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment