Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Commit

Permalink
change tuples to Vec3f0/Vec4f0 for <v1.5 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jan 17, 2021
1 parent c5984f3 commit 2b70bcc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/basic_recipes/error_and_rangebars.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,62 +57,62 @@ end

function AbstractPlotting.convert_arguments(::Type{<:Errorbars}, x, y, error_both)
xyerr = broadcast(x, y, error_both) do x, y, e
(x, y, e, e)
Vec4f0(x, y, e, e)
end
(xyerr,)
end

function AbstractPlotting.convert_arguments(::Type{<:Errorbars}, x, y, error_low, error_high)
xyerr = broadcast(tuple, x, y, error_low, error_high)
xyerr = broadcast(Vec4f0, x, y, error_low, error_high)
(xyerr,)
end


function AbstractPlotting.convert_arguments(::Type{<:Errorbars}, x, y, error_low_high::AbstractVector{<:VecTypes{2}})
xyerr = broadcast(x, y, error_low_high) do x, y, (el, eh)
(x, y, el, eh)
Vec4f0(x, y, el, eh)
end
(xyerr,)
end

function AbstractPlotting.convert_arguments(::Type{<:Errorbars}, xy::AbstractVector{<:VecTypes{2}}, error_both)
xyerr = broadcast(xy, error_both) do (x, y), e
(x, y, e, e)
Vec4f0(x, y, e, e)
end
(xyerr,)
end

function AbstractPlotting.convert_arguments(::Type{<:Errorbars}, xy::AbstractVector{<:VecTypes{2}}, error_low, error_high)
xyerr = broadcast(xy, error_low, error_high) do (x, y), el, eh
(x, y, el, eh)
Vec4f0(x, y, el, eh)
end
(xyerr,)
end

function AbstractPlotting.convert_arguments(::Type{<:Errorbars}, xy::AbstractVector{<:VecTypes{2}}, error_low_high::AbstractVector{<:VecTypes{2}})
xyerr = broadcast(xy, error_low_high) do (x, y), (el, eh)
(x, y, el, eh)
Vec4f0(x, y, el, eh)
end
(xyerr,)
end

function AbstractPlotting.convert_arguments(::Type{<:Errorbars}, xy_error_both::AbstractVector{<:VecTypes{3}})
xyerr = broadcast(xy_error_both) do (x, y, e)
(x, y, e, e)
Vec4f0(x, y, e, e)
end
(xyerr,)
end

### conversions for rangebars

function AbstractPlotting.convert_arguments(::Type{<:Rangebars}, val, low, high)
val_low_high = broadcast(tuple, val, low, high)
val_low_high = broadcast(Vec3f0, val, low, high)
(val_low_high,)
end

function AbstractPlotting.convert_arguments(::Type{<:Rangebars}, val, low_high)
val_low_high = broadcast(val, low_high) do val, (low, high)
(val, low, high)
Vec3f0(val, low, high)
end
(val_low_high,)
end
Expand Down

0 comments on commit 2b70bcc

Please sign in to comment.