move replaceAliases! back to preprocessArgs!

This commit is contained in:
Daniel Schwabeneder 2020-03-27 16:31:06 +01:00
parent 0c2d80841c
commit 8594926b67
2 changed files with 5 additions and 5 deletions

View File

@ -934,8 +934,8 @@ function _add_markershape(plotattributes::AKW)
end end
"Handle all preprocessing of args... break out colors/sizes/etc and replace aliases." "Handle all preprocessing of args... break out colors/sizes/etc and replace aliases."
function preprocessArgs!(plotattributes::AKW, replace_aliases = true) function preprocessArgs!(plotattributes::AKW)
replace_aliases && replaceAliases!(plotattributes, _keyAliases) replaceAliases!(plotattributes, _keyAliases)
# clear all axis stuff # clear all axis stuff
# if haskey(plotattributes, :axis) && plotattributes[:axis] in (:none, nothing, false) # if haskey(plotattributes, :axis) && plotattributes[:axis] in (:none, nothing, false)

View File

@ -122,7 +122,7 @@ function _process_userrecipe(plt::Plot, kw_list::Vector{KW}, recipedata::RecipeD
# when the arg tuple is empty, that means there's nothing left to recursively # when the arg tuple is empty, that means there's nothing left to recursively
# process... finish up and add to the kw_list # process... finish up and add to the kw_list
kw = recipedata.plotattributes kw = recipedata.plotattributes
preprocessArgs!(kw, false) preprocessArgs!(kw)
_preprocess_userrecipe(kw) _preprocess_userrecipe(kw)
warnOnUnsupported_scales(plt.backend, kw) warnOnUnsupported_scales(plt.backend, kw)
@ -212,7 +212,7 @@ function _process_plotrecipe(plt::Plot, kw::AKW, kw_list::Vector{KW}, still_to_p
datalist = RecipesBase.apply_recipe(kw, Val{st}, plt) datalist = RecipesBase.apply_recipe(kw, Val{st}, plt)
warn_on_recipe_aliases!(datalist, :plot, st) warn_on_recipe_aliases!(datalist, :plot, st)
for data in datalist for data in datalist
preprocessArgs!(data.plotattributes, false) preprocessArgs!(data.plotattributes)
if data.plotattributes[:seriestype] == st if data.plotattributes[:seriestype] == st
error("Plot recipe $st returned the same seriestype: $(data.plotattributes)") error("Plot recipe $st returned the same seriestype: $(data.plotattributes)")
end end
@ -442,7 +442,7 @@ function _process_seriesrecipe(plt::Plot, plotattributes::AKW)
# assuming there was no error, recursively apply the series recipes # assuming there was no error, recursively apply the series recipes
for data in datalist for data in datalist
if isa(data, RecipeData) if isa(data, RecipeData)
preprocessArgs!(data.plotattributes, false) preprocessArgs!(data.plotattributes)
if data.plotattributes[:seriestype] == st if data.plotattributes[:seriestype] == st
error("The seriestype didn't change in series recipe $st. This will cause a StackOverflow.") error("The seriestype didn't change in series recipe $st. This will cause a StackOverflow.")
end end