Method Signatures

#Array methods
corrplot(m::Matrix)

#DataFrame methods
corrplot(df::AbstractDataFrame)

Optional Arguments

bubblesize::Int = 40
layout::String = "lower"
labels::Bool = true
kwargs... #modifies top-level `EChart` fields

Missing Value Support

Examples

DataFrame

using ECharts, DataFrames, RDatasets
df = dataset("datasets", "mtcars")
cplot = corrplot(df)

Matrix

This method definition is useful if you have called cor() yourself in a different step or receive a correlation matrix from some other method. Since cor() from StatsBase returns a plain Matrix type, the corrplot function checks to see that the Matrix is symmetrical (as it is when a correlation matrix is calculated).

Note that since the columns of a matrix aren’t labeled, you will need to use xaxis! and yaxis! with the data keyword to set the axis labels (if desired).

using ECharts, DataFrames, RDatasets
df = dataset("datasets", "mtcars")

#get numeric columns from DataFrame, call cor()
df_num = df[[x <: Number for x in eltypes(df)]]
c = cor(convert(Matrix, df_num))

ccc = corrplot(c)