additional fixes

This commit is contained in:
Fredrik Ekre 2018-07-05 08:27:41 +02:00
parent 9e412555bb
commit c785d1509b
5 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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)

View File

@ -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()

View File

@ -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)]

View File

@ -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