From c785d1509b39e0c00cbc982f25f167537a65e8d2 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 5 Jul 2018 08:27:41 +0200 Subject: [PATCH 1/2] additional fixes --- src/args.jl | 8 ++++---- src/backends/gr.jl | 4 ++-- src/backends/web.jl | 2 +- src/deprecated/backends/gadfly.jl | 4 ++-- test/runtests.jl | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/args.jl b/src/args.jl index e9bfa36c..dde4fefa 100644 --- a/src/args.jl +++ b/src/args.jl @@ -1504,7 +1504,7 @@ function _update_series_attributes!(d::KW, plt::Plot, sp::Subplot) end # update series color - d[:seriescolor] = getSeriesRGBColor.(d[:seriescolor], sp, plotIndex) + d[:seriescolor] = getSeriesRGBColor.(d[:seriescolor], Ref(sp), plotIndex) # update other colors for s in (:line, :marker, :fill) @@ -1518,7 +1518,7 @@ function _update_series_attributes!(d::KW, plt::Plot, sp::Subplot) elseif d[csym] == :match plot_color.(d[:seriescolor]) else - getSeriesRGBColor.(d[csym], sp, plotIndex) + getSeriesRGBColor.(d[csym], Ref(sp), plotIndex) end end @@ -1526,9 +1526,9 @@ function _update_series_attributes!(d::KW, plt::Plot, sp::Subplot) d[:markerstrokecolor] = if d[:markerstrokecolor] == :match plot_color(sp[:foreground_color_subplot]) elseif d[:markerstrokecolor] == :auto - getSeriesRGBColor.(d[:markercolor], sp, plotIndex) + getSeriesRGBColor.(d[:markercolor], Ref(sp), plotIndex) else - getSeriesRGBColor.(d[:markerstrokecolor], sp, plotIndex) + getSeriesRGBColor.(d[:markerstrokecolor], Ref(sp), plotIndex) end # if marker_z, fill_z or line_z are set, ensure we have a gradient diff --git a/src/backends/gr.jl b/src/backends/gr.jl index e94b69c1..4ef4e7c6 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -196,7 +196,7 @@ gr_inqtext(x, y, s::Symbol) = gr_inqtext(x, y, string(s)) function gr_inqtext(x, y, s) if length(s) >= 2 && s[1] == '$' && s[end] == '$' GR.inqtextext(x, y, s[2:end-1]) - elseif something(findfirst(isequal('\\'), s), 0) != 0 || occursin("10^{", s) + elseif findfirst(isequal('\\'), s) != nothing || occursin("10^{", s) GR.inqtextext(x, y, s) else GR.inqtext(x, y, s) @@ -208,7 +208,7 @@ gr_text(x, y, s::Symbol) = gr_text(x, y, string(s)) function gr_text(x, y, s) if length(s) >= 2 && s[1] == '$' && s[end] == '$' GR.mathtex(x, y, s[2:end-1]) - elseif something(findfirst(isequal('\\'), s), 0) != 0 || occursin("10^{", s) + elseif findfirst(isequal('\\'), s) != nothing || occursin("10^{", s) GR.textext(x, y, s) else GR.text(x, y, s) diff --git a/src/backends/web.jl b/src/backends/web.jl index bb39a91d..75a3a8ed 100644 --- a/src/backends/web.jl +++ b/src/backends/web.jl @@ -26,7 +26,7 @@ function open_browser_window(filename::AbstractString) @static if Sys.isapple() return run(`open $(filename)`) end - @static if Sys.islinux() || is_bsd() # is_bsd() addition is as yet untested, but based on suggestion in https://github.com/JuliaPlots/Plots.jl/issues/681 + @static if Sys.islinux() || Sys.isbsd() # Sys.isbsd() addition is as yet untested, but based on suggestion in https://github.com/JuliaPlots/Plots.jl/issues/681 return run(`xdg-open $(filename)`) end @static if Sys.iswindows() diff --git a/src/deprecated/backends/gadfly.jl b/src/deprecated/backends/gadfly.jl index 906532a1..90072a94 100644 --- a/src/deprecated/backends/gadfly.jl +++ b/src/deprecated/backends/gadfly.jl @@ -334,8 +334,8 @@ end # # create a list of vertices that go: [x1,x2,x2,x3,x3, ... ,xi,xi, ... xn,xn] (same for y) # # then the vector passed to the "color" keyword should be a vector: [1,1,2,2,3,3,4,4, ..., i,i, ... , n,n] # csindices = Int[mod1(i,length(cscheme.v)) for i in 1:length(d[:y])] -# cs = collect(repmat(csindices', 2, 1))[1:end-1] -# grp = collect(repmat((1:length(d[:y]))', 2, 1))[1:end-1] +# cs = collect(repeat(csindices', 2, 1))[1:end-1] +# grp = collect(repeat((1:length(d[:y]))', 2, 1))[1:end-1] # d[:x], d[:y] = map(createSegments, (d[:x], d[:y])) # colorgroup = [(:linecolor, cs), (:group, grp)] diff --git a/test/runtests.jl b/test/runtests.jl index c64f5754..280c698f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -39,7 +39,7 @@ end # @test plotlyjs() == Plots.PlotlyJSBackend() # @test backend() == Plots.PlotlyJSBackend() # -# if is_linux() && isinteractive() +# if Sys.islinux() && isinteractive() # image_comparison_facts(:plotlyjs, # skip=[ # 2, # animation (skipped for speed) @@ -79,7 +79,7 @@ end # @test backend() == Plots.PlotlyBackend() # # # # until png generation is reliable on OSX, just test on linux -# # @static is_linux() && image_comparison_facts(:plotly, only=[1,3,4,7,8,9,10,11,12,14,15,20,22,23,27], eps=img_eps) +# # @static Sys.islinux() && image_comparison_facts(:plotly, only=[1,3,4,7,8,9,10,11,12,14,15,20,22,23,27], eps=img_eps) # end From 89ae23974399046f76908340c8822a5fd265ac1e Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 5 Jul 2018 08:46:17 +0200 Subject: [PATCH 2/2] adjust CI scripts --- .travis.yml | 9 +++++---- appveyor.yml | 13 ++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 63017e49..89328b76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,11 @@ os: - linux # - osx julia: - - 0.7 -matrix: - allow_failures: - - julia: nightly + # - 0.7 + - nightly +# matrix: +# allow_failures: +# - julia: nightly # # before install: # # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi diff --git a/appveyor.yml b/appveyor.yml index 81d2e51f..a626cae5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,15 +1,14 @@ environment: matrix: - - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe" - - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe" + # - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe" + # - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe" - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe" - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe" -matrix: - allow_failures: - - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe" #check and address - - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe" - - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe" +# matrix: +# allow_failures: +# - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe" +# - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe" notifications: - provider: Email