Skip to content

Commit

Permalink
removed depwarns
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Aug 27, 2015
1 parent 1c43e5b commit bd0cbdb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/colormaps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,19 @@ function diverging_palette(h1,
else
n=N
end
N1 = int(max(ceil(mid*n), 1))
N2 = int(max(n-N1, 1))
N1 = round(Int, max(ceil(mid*n), 1))

This comment has been minimized.

Copy link
@timholy

timholy Aug 27, 2015

Member

This could be max(ceil(Int, mid*n), 1)

This comment has been minimized.

Copy link
@SimonDanisch

SimonDanisch Aug 27, 2015

Author Member

makes sense!

N2 = @compat 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 = flipud(pal1)
pal1 = flipdim(pal1, 1)

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

if isodd(N)
midcol = weighted_color_mean(0.5, pal1[end], pal2[1])
return [pal1[1:end-1], midcol, pal2[2:end]]
return [pal1[1:end-1]; midcol; pal2[2:end]]
else
return [pal1[1:end-1], pal2[2:end]]
return [pal1[1:end-1]; pal2[2:end]]
end
end

Expand Down

0 comments on commit bd0cbdb

Please sign in to comment.