From 247fe27f0300b5eae65bbf8c70a7319d709d8ebc Mon Sep 17 00:00:00 2001 From: Tom Breloff Date: Wed, 16 Nov 2016 09:23:39 -0500 Subject: [PATCH] limit subplot attr when setting subplot kw --- src/pipeline.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pipeline.jl b/src/pipeline.jl index 7f3cc00e..6c2e05c3 100644 --- a/src/pipeline.jl +++ b/src/pipeline.jl @@ -283,7 +283,11 @@ function _subplot_setup(plt::Plot, d::KW, kw_list::Vector{KW}) # override subplot/axis args. `sp_attrs` take precendence for (idx,sp) in enumerate(plt.subplots) - attr = merge(d, get(sp_attrs, sp, KW())) + attr = if !haskey(d, :subplot) || d[:subplot] == idx + merge(d, get(sp_attrs, sp, KW())) + else + get(sp_attrs, sp, KW()) + end _update_subplot_args(plt, sp, attr, idx, false) end