From ba9a8d52cc32ae7a7e6e8ffb98dab7053cb5b7bf Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sat, 5 May 2018 17:44:13 +0200 Subject: [PATCH] pgfplots markercolors --- src/backends/pgfplots.jl | 7 ++----- src/utils.jl | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index 5493cfd3..e07daa5d 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -173,11 +173,8 @@ end function pgf_marker(d, i = 1) shape = _cycle(d[:markershape], i) - cstr, a = pgf_color(_cycle(d[:markercolor], i)) - if d[:markeralpha] != nothing - a = _cycle(d[:markeralpha], i) - end - cstr_stroke, a_stroke = pgf_color(_cycle(d[:markerstrokecolor], i)) + cstr, a = pgf_color(plot_color(get_markercolor(d, i), get_markeralpha(d, i))) + cstr_stroke, a_stroke = pgf_color(plot_color(get_markerstrokecolor(d, i), get_markerstrokealpha(d, i))) if d[:markerstrokealpha] != nothing a_stroke = _cycle(d[:markerstrokealpha], i) end diff --git a/src/utils.jl b/src/utils.jl index 08c85797..d6c217c0 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -691,7 +691,7 @@ function has_attribute_segments(series::Series) end series[:seriestype] == :shape && return false # ... else we check relevant attributes if they have multiple inputs - return any((typeof(series[attr]) <: AbstractVector && length(series[attr]) > 1) for attr in [:seriescolor, :seriesalpha, :linecolor, :linealpha, :linewidth, :fillcolor, :fillalpha]) || any(typeof(series[attr]) <: AbstractArray{<:Real} for attr in (:line_z, :fill_z)) + return any((typeof(series[attr]) <: AbstractVector && length(series[attr]) > 1) for attr in [:seriescolor, :seriesalpha, :linecolor, :linealpha, :linewidth, :fillcolor, :fillalpha, :markercolor, :markeralpha, :markerstrokecolor, :markerstrokealpha]) || any(typeof(series[attr]) <: AbstractArray{<:Real} for attr in (:line_z, :fill_z, :marker_z)) end # ---------------------------------------------------------------