Skip to content

Instantly share code, notes, and snippets.

@gtgrthrst
Created May 8, 2021 15:51
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/a96a07e2b0f65265e48b60eba9abbb9f to your computer and use it in GitHub Desktop.
Save gtgrthrst/a96a07e2b0f65265e48b60eba9abbb9f to your computer and use it in GitHub Desktop.
install.packages("ggplot2")
library(ggplot2)
data1 <- data.frame(width = c(1:10),height = seq(1,1000,100)+rnorm(10)*100)
ggplot(data1, mapping = aes(x = width,y = height)) +
geom_line(color = "blue") +
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