2
Plots.jl
을 사용하여 figure을 복제하고 싶습니다.Plots.jl을 사용하여 여러 개의 음영으로 음영 처리
그러나, 나는이 두 가지 문제
- 이 나는
- 내가
가 어떻게 할 수있는 예로서 여러 플롯을 그릴하는 방법에 그늘 특정 그림의 기간 모른다 그?
Plots.jl
을 사용하여 figure을 복제하고 싶습니다.Plots.jl을 사용하여 여러 개의 음영으로 음영 처리
그러나, 나는이 두 가지 문제
가 어떻게 할 수있는 예로서 여러 플롯을 그릴하는 방법에 그늘 특정 그림의 기간 모른다 그?
어쩌면 이것은 당신이 시작할 수 있습니다 :
using Plots
subplots = 3
time = 250
shade_xlims = [125,140]
data_matrix = Plots.fakedata(time, subplots)
p = plot(data_matrix, layout=(subplots,1), xlabel = "time");
for i in 1:subplots
ymin,ymax = extrema(data_matrix[:,i]) # determine ylims for shade
plot!(p[i], # apply shade to each subplot
shade_xlims, # xlims for shade
[0,0], # dummy y coordinates
fillrange = (ymin,ymax), # apply ylims
fillalpha = 0.5, # set transparency
fillcolor=:gray, # set shade color
label = "") # avoid shade labels
end
p # show the final graph
건배!