% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/1_plots.R
\name{corscatterplot}
\alias{corscatterplot}
\title{corscatterplot}
\usage{
corscatterplot(
  dat,
  x,
  y,
  color_cor = "blue",
  fill_cor = "lightgray",
  fill_x = "#ff820e",
  fill_y = "#0000fe",
  type = "density",
  ...
)
}
\arguments{
\item{dat}{plot data}

\item{x}{x}

\item{y}{y}

\item{color_cor}{color for cor reg.line}

\item{fill_cor}{fill for cor reg.line}

\item{fill_x}{fill for top density plot}

\item{fill_y}{fill for right density plot}

\item{type}{whether to use a density plot or a histogram plot for the side panel.}

\item{...}{other parameters for ggscatter}
}
\value{
a ggplot object
}
\description{
draw cor scatter plot with density plot by ggplot2
}
\examples{
\dontshow{if (requireNamespace("ggpubr", quietly = TRUE) && requireNamespace("patchwork", quietly = TRUE)) withAutoprint(\{ # examplesIf}
corscatterplot(iris,"Sepal.Length","Sepal.Width")
\dontshow{\}) # examplesIf}
}
\author{
Xiaojie Sun
}
