From c13ecc06b413774dcaba9b0b511b68b33e6575a5 Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Tue, 28 Feb 2017 21:36:58 +0100 Subject: [PATCH] change name to pu_or --- src/gradients/colorbrewer.jl | 14 ++++++++++++++ src/gradients/matplotlib.jl | 24 ++++++++++++------------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/gradients/colorbrewer.jl b/src/gradients/colorbrewer.jl index a90783f..6b7919f 100644 --- a/src/gradients/colorbrewer.jl +++ b/src/gradients/colorbrewer.jl @@ -224,6 +224,20 @@ register_gradient_colors(:RdGy, [ # RGB(253/255, 218/255, 236/255), # RGB(242/255, 242/255, 242/255)], :colorbrewer) +register_gradient_colors(:PuOr, [ + RGB(127/255, 59/255, 8/255), + RGB(179/255, 88/255, 6/255), + RGB(224/255, 130/255, 20/255), + RGB(253/255, 184/255, 99/255), + RGB(254/255, 224/255, 182/255), + RGB(247/255, 247/255, 247/255), + RGB(216/255, 218/255, 235/255), + RGB(178/255, 171/255, 210/255), + RGB(128/255, 115/255, 172/255), + RGB(84/255, 39/255, 136/255), + RGB(45/255, 0/255, 75/255)], :colorbrewer) + + register_gradient_colors(:OrRd, [ RGB(255/255, 247/255, 236/255), RGB(254/255, 232/255, 200/255), diff --git a/src/gradients/matplotlib.jl b/src/gradients/matplotlib.jl index 7dc0f93..3afa161 100644 --- a/src/gradients/matplotlib.jl +++ b/src/gradients/matplotlib.jl @@ -21,7 +21,7 @@ # note: to use the full arrays, just take out the second param (n) from the sample_evenly calls -register_color_library(:Plots, ColorLibrary(Dict(:default => :sequential, :sequential => :inferno, :diverging => :PuOr))) +register_color_library(:Plots, ColorLibrary(Dict(:default => :sequential, :sequential => :inferno, :diverging => :pu_or))) register_gradient_colors(:magma, sample_evenly([ RGB(0.001462, 0.000466, 0.013866), @@ -1061,18 +1061,18 @@ register_gradient_colors(:viridis, sample_evenly([ -register_gradient_colors(:PuOr, [ - RGB(127/255, 59/255, 8/255), - RGB(179/255, 88/255, 6/255), - RGB(224/255, 130/255, 20/255), - RGB(253/255, 184/255, 99/255), - RGB(254/255, 224/255, 182/255), - RGB(247/255, 247/255, 247/255), - RGB(216/255, 218/255, 235/255), - RGB(178/255, 171/255, 210/255), - RGB(128/255, 115/255, 172/255), +register_gradient_colors(:pu_or, [ + RGB(45/255, 0/255, 75/255), RGB(84/255, 39/255, 136/255), - RGB(45/255, 0/255, 75/255)], :Plots) + RGB(128/255, 115/255, 172/255), + RGB(178/255, 171/255, 210/255), + RGB(216/255, 218/255, 235/255), + RGB(247/255, 247/255, 247/255), + RGB(254/255, 224/255, 182/255), + RGB(253/255, 184/255, 99/255), + RGB(224/255, 130/255, 20/255), + RGB(179/255, 88/255, 6/255), + RGB(127/255, 59/255, 8/255)], :Plots) # end of Plots colormaps # ----------------------------------------------------------------------