diff --git a/src/series.jl b/src/series.jl index 32982d13..ac5f9213 100644 --- a/src/series.jl +++ b/src/series.jl @@ -224,6 +224,24 @@ end # don't do anything for ints or floats _apply_type_recipe(plotattributes, v::AbstractArray{T}, letter) where {T<:Union{Integer,AbstractFloat}} = v +# axis args before type recipes should still be mapped to all axes +function _preprocess_axis_args!(plotattributes) + replaceAliases!(plotattributes, _keyAliases) + for (k, v) in plotattributes + if haskey(_axis_defaults, k) + pop!(plotattributes, k) + for l in (:x, :y, :z) + lk = Symbol(l, k) + haskey(plotattributes, lk) || (plotattributes[lk] = v) + end + end + end +end +function _preprocess_axis_args!(plotattributes, letter) + plotattributes[:letter] = letter + _preprocess_axis_args!(plotattributes) +end + # axis args in type recipes should only be applied to the current axis function _postprocess_axis_args!(plotattributes, letter) pop!(plotattributes, :letter) @@ -239,21 +257,6 @@ function _postprocess_axis_args!(plotattributes, letter) end end -# axis args before type recipes should still be mapped to all axes -function _preprocess_axis_args!(plotattributes, letter) - replaceAliases!(plotattributes, _keyAliases) - plotattributes[:letter] = letter - for (k, v) in plotattributes - if haskey(_axis_defaults, k) - pop!(plotattributes, k) - for l in (:x, :y, :z) - lk = Symbol(l, k) - haskey(plotattributes, lk) || (plotattributes[lk] = v) - end - end - end -end - # handle "type recipes" by converting inputs, and then either re-calling or slicing @recipe function f(x, y, z) did_replace = false