julia - Julia 中使用 Plots.jl 的多个直方图

标签 julia plots.jl

我正在处理大量观察结果,为了真正了解它,我想使用 Plots.jl 绘制直方图 我的问题是如何在一个图中绘制多个直方图,因为这真的很方便。我已经尝试了多种方法,但我对 julia 中的不同绘图源(plots.jl、pyplot、gadfly 等)有点困惑。

我不知道发布一些代码是否对我有帮助,因为这是一个更笼统的问题。但如果需要,我很乐意发布它。

最佳答案

an example就是这样做的:

using Plots
pyplot()

n = 100
x1, x2 = rand(n), 3rand(n)

# see issue #186... this is the standard histogram call
# our goal is to use the same edges for both series
histogram(Any[x1, x2], line=(3,0.2,:green), fillcolor=[:red :black], fillalpha=0.2)

我在 the Plots.jl repo 中寻找“直方图” , 发现 this related issue并关注 the links示例。

关于julia - Julia 中使用 Plots.jl 的多个直方图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42204051/

相关文章:

julia - 为什么 2 ^ 3 ^ 4 = 0 在 Julia 中?

integer - 我们如何理解 Julia 中十六进制数与十进制数的加法?

julia - 如何在 Julia 中绘制 'proportion graph'?

julia - 手动设置 DataFrame Julia 中分组直方图 bin 的 bin 大小

julia - 在牛虻图表中操作标签 Julia

julia - 如何在 Julia 中定义空 IndexedTable?

julia - 使用 Plots.jl 显示多个图

julia - 如何将图例移动到 Plots.jl (GR) 中的绘图区域之外?

julia - 将全局标题添加到 Plots.jl 子图

arrays - Julia 初始化数组/向量不是零而是随机