corscatterplot: corscatterplot

corscatterplotR Documentation

corscatterplot

Description

draw cor scatter plot with density plot by ggplot2

Usage

corscatterplot(
  dat,
  x,
  y,
  color_cor = "blue",
  fill_cor = "lightgray",
  fill_x = "#ff820e",
  fill_y = "#0000fe",
  type = "density",
  ...
)

Arguments

dat

plot data

x

x

y

y

color_cor

color for cor reg.line

fill_cor

fill for cor reg.line

fill_x

fill for top density plot

fill_y

fill for right density plot

type

whether to use a density plot or a histogram plot for the side panel.

...

other parameters for ggscatter

Value

a ggplot object

Author(s)

Xiaojie Sun

Examples


corscatterplot(iris,"Sepal.Length","Sepal.Width")


tinyarray documentation built on Aug. 2, 2026, 9:07 a.m.