windows
using Pkg
Pkg.add("JuliaDB")
Pkg.add("StatsPlots")
using JuliaDB
using StatsPlots
t = table((x = randn(10), y = randn(10)))
println(t)
@df t scatter(:x, :y)
报错信息:
ERROR: LoadError: MethodError: no method matching get_color_palette(::Symbol, ::RGBA{Float64}, ::Int64)
Closest candidates are:
get_color_palette(::Any, ::Any) at C:\Users\ping.zhou.julia\packages\PlotUtils\nCtbM\src\colorschemes.jl:328
get_color_palette(::ColorGradient, ::Any) at C:\Users\ping.zhou.julia\packages\PlotUtils\nCtbM\src\colorschemes.jl:329
Stacktrace:
[1] _update_subplot_colors(::Plots.Subplot{Plots.GRBackend}) at C:\Users\ping.zhou.julia\packages\Plots\WwFyB\src\args.jl:1436
[2] _update_subplot_args(::Plots.Plot{Plots.GRBackend}, ::Plots.Subplot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Int64, ::Bool) at C:\Users\ping.zhou.julia\packages\Plots\WwFyB\src\args.jl:1523
[3] _subplot_setup(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Array{Dict{Symbol,Any},1}) at C:\Users\ping.zhou.julia\packages\Plots\WwFyB\src\pipeline.jl:297
[4] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{Array{Float64,1},Array{Float64,1}}) at C:\Users\ping.zhou.julia\packages\Plots\WwFyB\src\plot.jl:206
[5] plot(::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N; kw::Base.Iterators.Pairs{Symbol,Symbol,Tuple{Symbol},NamedTuple{(:seriestype,),Tuple{Symbol}}}) at C:\Users\ping.zhou.julia\packages\Plots\WwFyB\src\plot.jl:57
[6] scatter(::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N; kw::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\ping.zhou.julia\packages\RecipesBase\zBoFG\src\RecipesBase.jl:369
[7] scatter(::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N) at C:\Users\ping.zhou.julia\packages\RecipesBase\zBoFG\src\RecipesBase.jl:369
[8] add_label(::Array{String,1}, ::Function, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\ping.zhou.julia\packages\StatsPlots\Y1rGZ\src\df.jl:139
[9] add_label(::Array{String,1}, ::Function, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N) at C:\Users\ping.zhou.julia\packages\StatsPlots\Y1rGZ\src\df.jl:137
[10] (::var"#1#2")(::IndexedTable{StructArrays.StructArray{NamedTuple{(:x, :y),Tuple{Float64,Float64}},1,NamedTuple{(:x, :y),Tuple{Array{Float64,1},Array{Float64,1}}},Int64}}) at .\none:0
[11] top-level scope at C:\Users\ping.zhou\Desktop\julia_code\test.jl:19
[12] include(::Function, ::Module, ::String) at .\Base.jl:380
[13] include(::Module, ::String) at .\Base.jl:368
[14] exec_options(::Base.JLOptions) at .\client.jl:296
[15] _start() at .\client.jl:506
in expression starting at C:\Users\ping.zhou\Desktop\julia_code\test.jl:19
https://cleytonfar.github.io/posts/using-julia-for-data-science-part-03/
这个示例也是报同样的错