Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot convert MDS{Float64} to series data for plotting #272

Closed
kescobo opened this issue Nov 26, 2019 · 2 comments
Closed

Cannot convert MDS{Float64} to series data for plotting #272

kescobo opened this issue Nov 26, 2019 · 2 comments

Comments

@kescobo
Copy link
Contributor

kescobo commented Nov 26, 2019

In a brand new environment, using the same code I used in #230, I'm now getting an error

julia> using MultivariateStats, RDatasets, StatsPlots

julia> iris = dataset("datasets", "iris");

julia> X = convert(Matrix, iris[:, 1:4]);

julia> M = fit(MDS, X'; maxoutdim=2);

julia> plot(M, group=iris.Species)
ERROR: Cannot convert MDS{Float64} to series data for plotting
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] prepareSeriesData(::MDS{Float64}) at /Users/ksb/.julia/packages/Plots/WwFyB/src/series.jl:14
 [3] convertToAnyVector(::MDS{Float64}, ::Dict{Symbol,Any}) at /Users/ksb/.julia/packages/Plots/WwFyB/src/series.jl:26
 [4] macro expansion at /Users/ksb/.julia/packages/Plots/WwFyB/src/series.jl:130 [inlined]
 [5] apply_recipe(::Dict{Symbol,Any}, ::Type{Plots.SliceIt}, ::Nothing, ::MDS{Float64}, ::Nothing) at /Users/ksb/.julia/packages/RecipesBase/zBoFG/src/RecipesBase.jl:275
 [6] _process_userrecipes(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{MDS{Float64}}) at /Users/ksb/.julia/packages/Plots/WwFyB/src/pipeline.jl:83
 [7] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{MDS{Float64}}) at /Users/ksb/.julia/packages/Plots/WwFyB/src/plot.jl:178
 [8] #plot#137(::Base.Iterators.Pairs{Symbol,CategoricalArray{String,1,UInt8,String,CategoricalString{UInt8},Union{}},Tuple{Symbol},NamedTuple{(:group,),Tuple{CategoricalArray{String,1,UInt8,String,CategoricalString{UInt8},Union{}}}}}, ::typeof(plot), ::MDS{Float64}) at /Users/ksb/.julia/packages/Plots/WwFyB/src/plot.jl:57
 [9] (::getfield(RecipesBase, Symbol("#kw##plot")))(::NamedTuple{(:group,),Tuple{CategoricalArray{String,1,UInt8,String,CategoricalString{UInt8},Union{}}}}, ::typeof(plot), ::MDS{Float64}) at ./none:0
 [10] top-level scope at REPL[7]:1

But, if I just copy and paste this recipe from ordinations.jl into the REPL, it works fine. Not really sure how to debug this...

@mkborregaard
Copy link
Member

I cannot reproduce this

@kescobo
Copy link
Contributor Author

kescobo commented Dec 11, 2019

Hmm - I can no longer reproduce in new environment, and adding Plots#master fixed it 🤷‍♂

@kescobo kescobo closed this as completed Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants