Skip to content

Instantly share code, notes, and snippets.

@gtgrthrst
Created June 14, 2021 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtgrthrst/c0a20182c22dcf312ed9b72b46bc7efe to your computer and use it in GitHub Desktop.
Save gtgrthrst/c0a20182c22dcf312ed9b72b46bc7efe to your computer and use it in GitHub Desktop.
library(ggplot2)
ggplot(data = diamonds, aes(x = price, y = carat))+
geom_point(aes(colour = clarity), alpha = 0.2)+
geom_smooth(aes(x = price, y = carat))+
theme(axis.title=element_blank(),
axis.text=element_blank(),
axis.ticks=element_blank()
) + #刪除XY軸
guides(fill = FALSE, color = FALSE, linetype = FALSE, shape = FALSE) #刪除圖例
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment