draw cor scatter plot with density plot by ggplot2
corscatterplot(
dat,
x,
y,
color_cor = "blue",
fill_cor = "lightgray",
fill_x = "#ff820e",
fill_y = "#0000fe",
type = "density",
...
)a ggplot object
plot data
x
y
color for cor reg.line
fill for cor reg.line
fill for top density plot
fill for right density plot
whether to use a density plot or a histogram plot for the side panel.
other parameters for ggscatter
Xiaojie Sun