Skip to content

Commit

Permalink
fix issue 155
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Dec 25, 2023
1 parent 68aa9fa commit 3ce0f7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
always_for_in = true
always_for_in = false
import_to_using = false
align_pair_arrow = true
align_assignment = true
Expand Down
2 changes: 1 addition & 1 deletion src/colorschemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ end

## Utils

get_range(n::Int) = range(0, stop = 1, length = n)
get_range(n::Int) = range(0, stop = n == 1 ? 0 : 1, length = n)
get_range(cs) = get_range(length(cs))

get_colorscheme(v::AbstractVector{<:Colorant}) = ColorScheme(v)
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ end
end
end

@testset "PlotUtils.jl/issues/155" begin
palette(:tab10, 1)
end

@testset "PlotUtils.jl/issues/156" begin
for c cgrad([:black, RGBA{Float64}(1,1,1,1)], 5; categorical=true)
@test 0 alpha(c) 1
Expand Down

0 comments on commit 3ce0f7b

Please sign in to comment.