From 4035c0bbe08c0fb2f3e368e31824bdd02eed213f Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Wed, 31 Aug 2016 22:34:41 -0400 Subject: [PATCH] allow integers for colors, maps to palette index --- src/args.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/args.jl b/src/args.jl index 34b73b01..9a494fd4 100644 --- a/src/args.jl +++ b/src/args.jl @@ -608,7 +608,7 @@ function processFillArg(d::KW, arg) d[:fillrange] = arg end # d[:fillrange] = fr - return + return end _replace_markershape(shape::Symbol) = get(_markerAliases, shape, shape) @@ -1112,6 +1112,8 @@ end function getSeriesRGBColor(c, α, sp::Subplot, n::Int) if c == :auto c = autopick(sp[:color_palette], n) + elseif isa(c, Int) + c = autopick(sp[:color_palette], c) end plot_color(c, α) end @@ -1205,4 +1207,3 @@ function _add_defaults!(d::KW, plt::Plot, sp::Subplot, commandIndex::Int) _replace_linewidth(d) d end -