Format .jl files [skip ci]

This commit is contained in:
t-bltg 2021-12-19 00:12:26 +00:00 committed by GitHub
parent f784010c29
commit 27f1dfa9f8
2 changed files with 8 additions and 3 deletions

View File

@ -216,9 +216,11 @@ maketuple(x::Real) = (x, x)
maketuple(x::Tuple{T,S}) where {T,S} = x maketuple(x::Tuple{T,S}) where {T,S} = x
RecipesPipeline.unzip(v) = unzip(v) RecipesPipeline.unzip(v) = unzip(v)
RecipesPipeline.unzip(points::AbstractVector{<:GeometryBasics.Point}) = unzip(Tuple.(points)) RecipesPipeline.unzip(points::AbstractVector{<:GeometryBasics.Point}) =
unzip(Tuple.(points))
RecipesPipeline.unzip(points::AbstractVector{GeometryBasics.Point{N,T}}) where {N,T} = RecipesPipeline.unzip(points::AbstractVector{GeometryBasics.Point{N,T}}) where {N,T} =
isbitstype(T) && sizeof(T) > 0 ? unzip(reinterpret(NTuple{N,T}, points)) : unzip(Tuple.(points)) isbitstype(T) && sizeof(T) > 0 ? unzip(reinterpret(NTuple{N,T}, points)) :
unzip(Tuple.(points))
# given 2-element lims and a vector of data x, widen lims to account for the extrema of x # given 2-element lims and a vector of data x, widen lims to account for the extrema of x
function _expand_limits(lims, x) function _expand_limits(lims, x)

View File

@ -191,7 +191,10 @@ end
) )
for z in zipped for z in zipped
@test isequal(collect(zip(Plots.RecipesPipeline.unzip(z)...)), z) @test isequal(collect(zip(Plots.RecipesPipeline.unzip(z)...)), z)
@test isequal(collect(zip(Plots.RecipesPipeline.unzip(GeometryBasics.Point.(z))...)), z) @test isequal(
collect(zip(Plots.RecipesPipeline.unzip(GeometryBasics.Point.(z))...)),
z,
)
end end
op1 = Plots.process_clims((1.0, 2.0)) op1 = Plots.process_clims((1.0, 2.0))
op2 = Plots.process_clims((1, 2.0)) op2 = Plots.process_clims((1, 2.0))