Skip to content

Commit

Permalink
fixes for julia 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarthur committed Sep 8, 2018
1 parent 57728d3 commit 2e0d0da
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Gadfly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import IterTools
import IterTools: distinct, drop, chain
import Compose: draw, hstack, vstack, gridstack, parse_colorant
import Base: +, -, /, *,
copy, push!, start, next, done, show, getindex, cat,
copy, push!, show, getindex, cat,
show, isfinite, display
import Distributions: Distribution

Expand Down
3 changes: 2 additions & 1 deletion src/aesthetics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ function show(io::IO, data::Aesthetics)
maxlen = 0
print(io, "Aesthetics(")
for name in fieldnames(Aesthetics)
if getfield(data, name) != nothing
val = getfield(data, name)
if !ismissing(val) && val != nothing
print(io, "\n ", string(name), "=")
show(io, getfield(data, name))
end
Expand Down
2 changes: 1 addition & 1 deletion src/geom/subplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function render(geom::SubplotGrid, theme::Gadfly.Theme,
Gadfly.inherit!(col_aes, geom_aes)
Stat.apply_statistic(Stat.xticks(), scales, coord, col_aes)

aes_grid[:, j] .= col_aes
aes_grid[:, j] .= [col_aes]
end
end

Expand Down
1 change: 1 addition & 0 deletions test/REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
RDatasets
Cairo
Fontconfig
CSV
12 changes: 6 additions & 6 deletions test/testscripts/density_dark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ end
# prevent these tests from running more than once
if ! @isdefined density_dark_tested
svg_str_dark = stringmime(MIME("image/svg+xml"), p)
@test occursin(hex(Gadfly.dark_theme.default_color), svg_str_dark)
@test occursin(hex(Gadfly.dark_theme.background_color), svg_str_dark)
@test occursin(hex(Gadfly.dark_theme.panel_fill), svg_str_dark)
@test occursin(Base.hex(Gadfly.dark_theme.default_color), svg_str_dark)
@test occursin(Base.hex(Gadfly.dark_theme.background_color), svg_str_dark)
@test occursin(Base.hex(Gadfly.dark_theme.panel_fill), svg_str_dark)

# Test reset.
p2 = plot(dataset("ggplot2", "diamonds"), x="Price", color="Cut", Geom.density)
svg_str_light = stringmime(MIME("image/svg+xml"), p2)
@test !occursin(hex(Gadfly.dark_theme.default_color), svg_str_light)
@test !occursin(hex(Gadfly.dark_theme.background_color), svg_str_light)
@test !occursin(hex(Gadfly.dark_theme.panel_fill), svg_str_light)
@test !occursin(Base.hex(Gadfly.dark_theme.default_color), svg_str_light)
@test !occursin(Base.hex(Gadfly.dark_theme.background_color), svg_str_light)
@test !occursin(Base.hex(Gadfly.dark_theme.panel_fill), svg_str_light)

density_dark_tested=true
end
Expand Down

0 comments on commit 2e0d0da

Please sign in to comment.