JuliaML / MLPlots.jl

Plotting recipes for statistics and machine learning using Plots.jl
Other
24 stars 5 forks source link

corrplot doesn't support DataFrames #10

Closed diegozea closed 8 years ago

diegozea commented 8 years ago

LoadError: MethodError:corrplothas no method matching corrplot(::DataFrames.DataFrame)

tbreloff commented 8 years ago

This should probably be a Plots issue... passing in a DataFrame to any plotting command, but without any column labels, should plot one series per column.

scls19fr commented 8 years ago

I'm also facing same issue

julia> using RDatasets
julia> using MLPlots
julia> iris=dataset("datasets", "iris")
julia> corrplot(iris)
ERROR: MethodError: `corrplot` has no method matching corrplot(::DataFrames.DataFrame)

Maybe you should add Requires.jl https://github.com/MikeInnes/Requires.jl to help to fix that

tbreloff commented 8 years ago

This should probably be a Plots issue... passing in a DataFrame to any plotting command, but without any column labels, should plot one series per column.

To be clear... this isn't a bug... it's a not-yet-implemented feature. I should note that I plan on rewriting corrplot as a "user recipe" and moving it to PlotRecipes.jl.

Maybe you should add Requires.jl https://github.com/MikeInnes/Requires.jl to help to fix that

I'm not sure what you think that would accomplish...

scls19fr commented 8 years ago

To my understanding if you add Requires.jl as requirement, you will be able to have code that can take DataFrame as input (even if DataFrames.jl is not installed). So it's a good way to have optional dependencies.

tbreloff commented 8 years ago

Yeah I know about Requires (btw DataFrames is already an optional dependency). It just doesn't make any sense as a solution. We're just missing a dataframe-specific feature.

On Thursday, June 9, 2016, scls19fr notifications@github.com wrote:

To my understanding if you add Requires.jl as requirement, you will be able to have code that can take DataFrame as input (even if DataFrames.jl is not installed). So it's a good way to have optional dependencies.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JuliaML/MLPlots.jl/issues/10#issuecomment-224827551, or mute the thread https://github.com/notifications/unsubscribe/AA492nT5-QXb3w2EKaO_a1RKab3ZbV3Eks5qJ8ohgaJpZM4ISBjO .

Evizero commented 8 years ago

To me Requires seems like an unclean solution nowadays

scls19fr commented 8 years ago
a=Array(iris[[:SepalLength,:SepalWidth,:PetalLength,:PetalWidth]])
corrplot(a)

capture d ecran 2016-06-09 a 15 50 53

Unfortunatelly I haven't found a way to define points color by Species.

Setting axes name will also be a great feature to have.

A similar issue can be found here

tbreloff commented 8 years ago

See: https://github.com/JuliaPlots/PlotRecipes.jl/issues/1

Any feature requests for the corrplot recipe should be made there.