如何在Julia中叠加两个图形

6

我希望将这两个图形叠加在一起。在我的代码中,我只能将它们并排绘制。

using PyPlot
x = [μ, μ]
y = histogram(walks[end, :], bins=20, legend=nothing)

plot(plot(x), y)

enter image description here


为什么这个被标记为Python? - Sam Ireland
1个回答

6

只需使用带有!版本的绘图函数。

例如:

x = randn(100).*10 .+ 100;
using Plots
histogram(x, bins=10)
plot!(80:120, rand(1:25,41))

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接