From da9b65118237ce39a278e51cc9791714f7706664 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 1 Jul 2018 19:44:44 +0200 Subject: [PATCH] 0.7 fixes --- .travis.yml | 2 +- REQUIRE | 4 ++-- src/dark.jl | 3 +-- src/juno.jl | 10 ++++------ src/wong.jl | 4 ++-- test/runtests.jl | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ed8cea..73559ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ os: - linux - osx julia: - - 0.6 + - 0.7 - nightly matrix: allow_failures: diff --git a/REQUIRE b/REQUIRE index 62163e8..2417a5e 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,3 @@ -julia 0.6 -PlotUtils 0.4 +julia 0.7-alpha +PlotUtils 0.5 Requires diff --git a/src/dark.jl b/src/dark.jl index f34e74c..55caef6 100644 --- a/src/dark.jl +++ b/src/dark.jl @@ -14,7 +14,6 @@ _themes[:dark] = PlotTheme( fgtext = colorant"#FFFFFF", fgguide = colorant"#FFFFFF", fglegend = colorant"#FFFFFF", - palette = expand_palette(dark_bg, dark_palette; lchoices=linspace(57,57,1), - cchoices=linspace(100,100,1)), + palette = expand_palette(dark_bg, dark_palette; lchoices = [57], cchoices = [100]), gradient = cgrad(:fire).colors ) diff --git a/src/juno.jl b/src/juno.jl index 1c9c1d1..6faef07 100644 --- a/src/juno.jl +++ b/src/juno.jl @@ -15,12 +15,11 @@ _themes[:juno] = PlotTheme( fgtext = colorant"#9EB1BE", fgguide = colorant"#9EB1BE", fglegend = colorant"#9EB1BE", - palette = expand_palette(juno_bg, juno_palette; lchoices=linspace(57,57,1), - cchoices=linspace(100,100,1)), + palette = expand_palette(juno_bg, juno_palette; lchoices = [57], cchoices = [100]), gradient = cgrad(:fire).colors ) -@require Juno begin +@require Juno = "e5e0dc1b-0480-54bc-9374-aad01c23163d" begin if Juno.isactive() colors = Juno.syntaxcolors() colors = Dict(k => parse(Colorant, "#"*hex(colors[k], 6)) for (k, v) in colors) @@ -31,7 +30,7 @@ _themes[:juno] = PlotTheme( filter!(c -> c.s > 0.5*mean(c -> c.s, colvec), colvec) grad = Vector{eltype(colvec)}(0) for i = 1:length(colvec)-1 - append!(grad, linspace(colvec[i], colvec[i+1])) + append!(grad, range(colvec[i], stop = colvec[i+1])) end _themes[:juno] = PlotTheme( @@ -41,8 +40,7 @@ _themes[:juno] = PlotTheme( fgtext = colors["variable"], fgguide = colors["variable"], fglegend = colors["variable"], - palette = expand_palette(colors["background"], juno_palette; lchoices=linspace(57,57,1), - cchoices=linspace(100,100,1)), + palette = expand_palette(colors["background"], juno_palette; lchoices = [57], cchoices = [100]), gradient = grad ) end diff --git a/src/wong.jl b/src/wong.jl index 3105cfb..033ce31 100644 --- a/src/wong.jl +++ b/src/wong.jl @@ -11,11 +11,11 @@ const wong_palette = [ ] _themes[:wong] = PlotTheme( - palette = expand_palette(colorant"white", wong_palette; lchoices=linspace(57,57,1), cchoices=linspace(100,100,1)), + palette = expand_palette(colorant"white", wong_palette; lchoices = [57], cchoices = [100]), gradient = cgrad(:viridis).colors, ) _themes[:wong2] = PlotTheme( - palette = expand_palette(colorant"white", [RGB(0,0,0); wong_palette]; lchoices=linspace(57,57,1), cchoices=linspace(100,100,1)), + palette = expand_palette(colorant"white", [RGB(0,0,0); wong_palette]; lchoices = [57], cchoices = [100]), gradient = cgrad(:viridis).colors, ) diff --git a/test/runtests.jl b/test/runtests.jl index 82cdb4b..674b965 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,5 @@ using PlotThemes -using Base.Test +using Test, PlotUtils @test in(:sand, keys(PlotThemes._themes)) @test in(:sand_grad, PlotUtils.cgradients(:misc))