knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(corrplot)

We will use the datasets::iris dataset for example.

head(iris)

Create a scatter plot showing the relationship between Sepal.Length and Sepal.Length, grouped by the factor Species. Note the correlation coefficients are annotated.

p = correlation_scatter(datasets::iris, x='Sepal.Length', y='Sepal.Width', group='Species')
p


wu-2018/corrplot documentation built on Jan. 1, 2021, 12:52 p.m.