process showaxis
This commit is contained in:
parent
209cf66acc
commit
4217a54f6b
@ -946,7 +946,8 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
|
||||
|
||||
# handle axis args common to all axis
|
||||
args = RecipesPipeline.pop_kw!(plotattributes, :axis, ())
|
||||
for arg in wraptuple(args)
|
||||
showarg = wraptuple(RecipesPipeline.pop_kw!(plotattributes, :showaxis, ()))
|
||||
for arg in wraptuple((args..., showarg...))
|
||||
for letter in (:x, :y, :z)
|
||||
process_axis_arg!(plotattributes, arg, letter)
|
||||
end
|
||||
|
||||
@ -35,7 +35,6 @@ end
|
||||
function process_axis_arg!(plotattributes::AKW, arg, letter = "")
|
||||
T = typeof(arg)
|
||||
arg = get(_scaleAliases, arg, arg)
|
||||
|
||||
if typeof(arg) <: Font
|
||||
plotattributes[Symbol(letter,:tickfont)] = arg
|
||||
plotattributes[Symbol(letter,:guidefont)] = arg
|
||||
@ -61,7 +60,7 @@ function process_axis_arg!(plotattributes::AKW, arg, letter = "")
|
||||
elseif arg === nothing
|
||||
plotattributes[Symbol(letter,:ticks)] = []
|
||||
|
||||
elseif T <: Bool || arg in _allShowaxisArgs || arg in _allShowaxisSyms
|
||||
elseif T <: Bool || arg in _allShowaxisArgs
|
||||
plotattributes[Symbol(letter,:showaxis)] = showaxis(arg, letter)
|
||||
|
||||
elseif typeof(arg) <: Number
|
||||
|
||||
@ -2,4 +2,5 @@ using Plots, Test
|
||||
|
||||
@testset "Showaxis" begin
|
||||
@test plot(1:5, showaxis = :y)[1][:yaxis][:showaxis] == true
|
||||
@test plot(1:5, showaxis = :y)[1][:xaxis][:showaxis] == false
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user