View source: R/plt_identity_line.R
plt_identity_line | R Documentation |
Add a identity line to a ggplot2 scatter plot.
plt_identity_line(color = "black", linetype = "dashed", linewidth = 0.75)
color |
A character single value (default = 'black'), that will be the line color |
linetype |
A character single value (default = 'dashed'), that will be the line type |
linewidth |
A numeric single value (default = 0.75), that will be the line width |
A ggplot2 object.
library(ggplot2)
plot <-
ggplot(mtcars,aes(qsec,mpg))+
geom_point()
plot
plot + plt_identity_line()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.