From e7f79e91441725d7608d3eb615a37696c6853e18 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Fri, 24 Apr 2020 21:32:25 +0200 Subject: [PATCH] fix vector of colors as gradient --- src/utils.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils.jl b/src/utils.jl index 46b40e32..add74fa9 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -134,6 +134,7 @@ _cycle(cl::PlotUtils.AbstractColorList, idx::Int) = cl[mod1(idx, end)] _cycle(cl::PlotUtils.AbstractColorList, idx::AVec{Int}) = cl[mod1.(idx, end)] _as_gradient(grad) = grad +_as_gradient(v::AbstractVector{<:Colorant}) = cgrad(v) _as_gradient(cp::ColorPalette) = cgrad(cp, categorical = true) _as_gradient(c::Colorant) = ColorGradient([c,c])