Skip to content

Commit

Permalink
Merge pull request #315 from JuliaGraphics/teh/flipdim
Browse files Browse the repository at this point in the history
Fix depwarn in colormap and add tests for colormap
  • Loading branch information
timholy authored Aug 11, 2018
2 parents bb8a22d + 14a53c7 commit c415d28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/colormaps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function diverging_palette(h1,
N2 = Int(max(n-N1, 1))

pal1 = sequential_palette(h1, N1+1, w=w, d=d1, c=c, s=s, b=b, wcolor=wcolor, dcolor=dcolor1, logscale=logscale)
pal1 = flipdim(pal1, 1)
pal1 = reverse(pal1; dims=1)

pal2 = sequential_palette(h2, N2+1, w=w, d=d2, c=c, s=s, b=b, wcolor=wcolor, dcolor=dcolor2, logscale=logscale)

Expand Down
3 changes: 3 additions & 0 deletions test/colormaps.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@testset "Colormaps" begin
@test length(colormap("RdBu", 100)) == 100
end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using Colors, Test

include("algorithms.jl")
include("conversion.jl")
include("colormaps.jl")
include("colordiff.jl")
include("din99.jl")
include("utilities.jl")

0 comments on commit c415d28

Please sign in to comment.