Merge pull request #1671 from mkborregaard/getrgb_patch

Add vector function for rgb
This commit is contained in:
Michael Krabbe Borregaard 2018-08-17 11:21:01 +02:00 committed by GitHub
commit b30ff9b41b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1521,6 +1521,11 @@ function getSeriesRGBColor(c, sp::Subplot, n::Int)
plot_color(c)
end
function getSeriesRGBColor(c::AbstractArray, sp::Subplot, n::Int)
@info "it is surprising that this function is called - please report a use case as a Plots issue"
map(x->getSeriesRGBColor(x, sp, n), c)
end
function ensure_gradient!(d::KW, csym::Symbol, asym::Symbol)
if !isa(d[csym], ColorGradient)
d[csym] = typeof(d[asym]) <: AbstractVector ? cgrad() : cgrad(alpha = d[asym])