Julia 使用plots.jl将一组图绘制为子图

Julia 使用plots.jl将一组图绘制为子图,julia,subplot,plots.jl,Julia,Subplot,Plots.jl,此线程的延续: 当我试着 using Plots plot_array = Any[] for i in 1:5 push!(plot_array, plot(rand(10))) # make a plot and add it to the plot_array end plot(plot_array) 我收到错误: MethodError: no method matching Plots.Plot{Plots.PlotlyBackend}(::Char, ::Char, ::

此线程的延续:

当我试着

using Plots
plot_array = Any[] 
for i in 1:5
    push!(plot_array, plot(rand(10))) # make a plot and add it to the plot_array
end
plot(plot_array)
我收到错误:

MethodError: no method matching Plots.Plot{Plots.PlotlyBackend}(::Char, ::Char, ::Char, ::Char, ...) 
Closest candidates are: Plots.Plot{Plots.PlotlyBackend}(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)
我遗漏了什么?

您需要使用
..
在上一次
绘图
调用中“splat”子地块数组:

using Plots
plot_array = [] 
for i in 1:5
    push!(plot_array, plot(rand(10)))
end
plot(plot_array...) # note the "..." 
将产生类似于