| ggxy | R Documentation |
Create basic XY scatter plot for quick data exploration.
Default to show Pearson correlation coefficient with p-value using ggpubr::stat_cor().
For more complex plots, it is recommended to use ggplot2::ggplot2 directly.
ggxy(
d,
x,
y,
...,
lm = TRUE,
se = TRUE,
cor = TRUE,
pv = 0.001,
nsub = TRUE,
legend = TRUE,
asp = 1
)
d |
|
x, y |
|
... |
Arguments to pass to |
lm |
|
se |
|
cor |
|
pv |
|
nsub |
|
legend |
|
asp |
|
A ggplot object.
ggpubr::stat_cor()
mtcars |> ggxy(wt,hp)
mtcars |> ggxy(wt,hp,col=factor(gear))
mtcars |> ggxy(wt,hp,col=factor(gear),legend=FALSE)
mtcars |> ggxy(wt,hp,col=factor(gear),pch=factor(am))
mtcars |> ggxy(wt,hp,nsub=FALSE)
mtcars |> ggxy(wt,hp,pv=NULL)
mtcars |> ggxy(wt,hp,lm=FALSE)
mtcars |> ggxy(wt,hp,se=FALSE)
mtcars |> ggxy(wt,hp,cor=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.