在多个朱莉娅图上绘制垂直/水平线
我试图用水平/垂直线的不同排列制作几个朱莉娅图:
using Plots
plot_array = Any[]
v_array = [1, 3]
h_array = [9, 10]
push!(variogram_array, plot([1, 2, 3, 4, 5], [1, 4, 9, 16, 25]))
push!(variogram_array, plot([1, 2, 3, 4, 5], [1, 16, 10, 15, 23]))
for i in 1:length(plot_array)
display(plot(variogram_array..., size = (1000,1000)))
plot!([v_array[i]], seriestype="vline",label= "rand",line=(:dot, 7))
plot!([h_array[i]], seriestype="hline",label= "rand",line=(:dot, 7))
end
此代码输出主图,但不包括我需要的水平和垂直线。
有什么方法可以解决这个问题吗?我应该使用情节吗?
I was trying to make several Julia graphs with different arrangements of horizontal/vertical lines:
using Plots
plot_array = Any[]
v_array = [1, 3]
h_array = [9, 10]
push!(variogram_array, plot([1, 2, 3, 4, 5], [1, 4, 9, 16, 25]))
push!(variogram_array, plot([1, 2, 3, 4, 5], [1, 16, 10, 15, 23]))
for i in 1:length(plot_array)
display(plot(variogram_array..., size = (1000,1000)))
plot!([v_array[i]], seriestype="vline",label= "rand",line=(:dot, 7))
plot!([h_array[i]], seriestype="hline",label= "rand",line=(:dot, 7))
end
This code outputs the main graphs, but doesn't include the horizontal and vertical lines as I need it to.
Is there any way to remedy this? Should I be using Plotly instead?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
改变情节!功能到Vline!和Hline!并在添加线路后显示显示两条图:
Changing the plot! function to vline! and hline! and displaying after the lines are added shows the two plots with lines: