scatter_data = [];
for col in names(国家财政收入)[2:3]
国家财政收入[!, col] .= (国家财政收入[!, col] ./ 财政收入合计)
push!(scatter_data, scatter(国家财政收入, x = :年份, y = :col, name = col))
end
scatter_data
returns
2-element Vector{Any}
while the wanted type is
2-element Vector{GenericTrace{Dict{Symbol, Any}}}
since when execute
plot(
scatter_data,
Layout(
title = "各项税收",
xaxis = attr(dtick = "M12", tickangle = -45, tickformat="%b\n%Y")
))
gives
ERROR: MethodError: no method matching Plot(::Vector{Any}, ::Layout{Dict{Symbol, Any}})
how should my code be modified to plot them properly