Apply suggestions from code review [skip ci]

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Simon Christ 2022-03-29 16:16:02 +02:00 committed by GitHub
parent da002e34ac
commit 4298be63e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -404,9 +404,7 @@ function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, o
), ),
) )
if opt[:label] == "" if opt[:label] == ""
push!(arrow_opt, push!(arrow_opt, "forget plot" => nothing)
"forget plot" => nothing,
)
end end
if arrow.side == :head if arrow.side == :head
x_arrow = opt[:x][rng][(end - 1):end] x_arrow = opt[:x][rng][(end - 1):end]
@ -431,9 +429,7 @@ function pgfx_add_series!(::Val{:path}, axis, series_opt, series, series_func, o
:v => [y_arrow[i] - y_arrow[i - 1] for i in 2:2:lastindex(y_arrow)], :v => [y_arrow[i] - y_arrow[i - 1] for i in 2:2:lastindex(y_arrow)],
]) ])
arrow_plot = series_func(merge(series_opt, arrow_opt), coordinates) arrow_plot = series_func(merge(series_opt, arrow_opt), coordinates)
push!(series_opt, push!(series_opt, "forget plot" => nothing)
"forget plot" => nothing,
)
push!(axis, arrow_plot) push!(axis, arrow_plot)
coordinates = PGFPlotsX.Table(x_path, y_path) coordinates = PGFPlotsX.Table(x_path, y_path)
segment_plot = series_func(merge(series_opt, segment_opt), coordinates) segment_plot = series_func(merge(series_opt, segment_opt), coordinates)