keep no-letter version of _preprocess_axis_args!

This commit is contained in:
Daniel Schwabeneder 2020-03-25 12:51:49 +01:00
parent b0548ffc14
commit 17db6c01b4

View File

@ -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