drawScatter | R Documentation |
Draw scatter plot
drawScatter(
xvalue,
yvalue,
xlab = "X",
ylab = "Y",
group = NA,
color = "jco",
title = "",
remove.legend = FALSE,
margin = TRUE,
xlim = NULL,
ylim = NULL,
add = "none",
label = NULL,
cor.coef = F,
cor.method = "pearson"
)
xvalue |
Vector of values |
yvalue |
The same length wtih x value |
color |
Default jco |
remove.legend |
Default FALSE |
margin |
Default TRUE, show margin plot |
add |
c("none", "reg.line", "loess") |
label |
Default NULL |
cor.coef |
TRUE/FALSE to show coefficient |
cor.method |
method for computing correlation coefficient. Allowed values are one of "pearson", "kendall", or "spearman" |
show.sample.name |
Default FALSE |
ggplot2 object
library(ggpubr)
data("mtcars")
loonR::drawScatter(mtcars$wt, mtcars$mpg, xlab = "wt", ylab = "mpg", remove.legend = T, cor.coef = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.