Skip to content

Commit

Permalink
Merge pull request #27 from daschw/julia07
Browse files Browse the repository at this point in the history
0.7 fixes
  • Loading branch information
daschw authored Jul 1, 2018
2 parents 380837d + da9b651 commit 9ce1c20
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ os:
- linux
- osx
julia:
- 0.6
- 0.7
- nightly
matrix:
allow_failures:
Expand Down
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
julia 0.6
PlotUtils 0.4
julia 0.7-alpha
PlotUtils 0.5
Requires
3 changes: 1 addition & 2 deletions src/dark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
10 changes: 4 additions & 6 deletions src/juno.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/wong.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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))

0 comments on commit 9ce1c20

Please sign in to comment.