Update gaston.jl

This commit is contained in:
t-bltg 2021-07-31 20:46:03 +02:00 committed by GitHub
parent 2938950bda
commit 7863ab9b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,15 +215,18 @@ function gaston_add_series(plt::Plot{GastonBackend}, series::Series)
end end
function gaston_hvline!(sp, series, curveconf, pt, dt, lw, lc, command) function gaston_hvline!(sp, series, curveconf, pt, dt, lw, lc, command)
if pt == :hline if pt (:hline, :vline)
lo, hi = axis_limits(sp, :x) xs, ys = straightline_data(series)
for y series[:y] if pt == :hline
sp.o.axesconf *= "\nset arrow from graph $lo,$y to $hi,$y nohead lc $lc lw $lw dt $dt" lo, hi = axis_limits(sp, :x)
end for y ys
elseif pt == :vline sp.o.axesconf *= "\nset arrow from $lo,$y to $hi,$y nohead lc $lc lw $lw dt $dt"
lo, hi = axis_limits(sp, :y) end
for x series[:x] elseif pt == :vline
sp.o.axesconf *= "\nset arrow from $x,$lo to $x,$hi nohead lc $lc lw $lw dt $dt" lo, hi = axis_limits(sp, :y)
for x xs
sp.o.axesconf *= "\nset arrow from $x,$lo to $x,$hi nohead lc $lc lw $lw dt $dt"
end
end end
else else
push!(curveconf, command) push!(curveconf, command)