StatsPlots.jl icon indicating copy to clipboard operation
StatsPlots.jl copied to clipboard

MethodError: no method matching zero(::Type{Vector{Float64}}) on corrplot

Open naccib opened this issue 4 years ago • 4 comments
trafficstars

Using Pluto.jl, and trying to corrplot a two DataFrame columns.

pyplot()
@df filtered_df corrplot([:AGE, :SEX])

Both :AGE and :SEX columns are Float64, no missing values. Using latest stable release of StatsPlots.jl, Plots.jl and Julia.

naccib avatar Apr 01 '21 20:04 naccib

I'm getting this too, did you manage to find a solution?

Also I've just tried the README's example in the REPL and it throws the same error with the iris dataset.

GregorySech avatar Apr 18 '21 10:04 GregorySech

Hello Gregory. I have not.

naccib avatar Apr 18 '21 21:04 naccib

The vector of variable names should not be comma-separated. Note the example in the corrplot docstring:

  @df iris corrplot([:SepalLength :SepalWidth :PetalLength :PetalWidth])

Can you verify that @df filtered_df corrplot([:AGE :SEX]) works?

sethaxen avatar Jul 07 '21 23:07 sethaxen

I've just tried and it works as you said @sethaxen. I missed the commas when re-writing the example.

Do you know if there is a reason why a Matrix{Symbol} is used as a parameter instead of a Vector{Symbol}?

GregorySech avatar Jul 08 '21 06:07 GregorySech