Fix showaxis (#2733)
* also replace axis syms * include test_axes [skip ci] * Create test_axes.jl * process showaxis
This commit is contained in:
parent
02e6d729c1
commit
42e2266530
@ -946,7 +946,8 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
|
|||||||
|
|
||||||
# handle axis args common to all axis
|
# handle axis args common to all axis
|
||||||
args = RecipesPipeline.pop_kw!(plotattributes, :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)
|
for letter in (:x, :y, :z)
|
||||||
process_axis_arg!(plotattributes, arg, letter)
|
process_axis_arg!(plotattributes, arg, letter)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -35,7 +35,6 @@ end
|
|||||||
function process_axis_arg!(plotattributes::AKW, arg, letter = "")
|
function process_axis_arg!(plotattributes::AKW, arg, letter = "")
|
||||||
T = typeof(arg)
|
T = typeof(arg)
|
||||||
arg = get(_scaleAliases, arg, arg)
|
arg = get(_scaleAliases, arg, arg)
|
||||||
|
|
||||||
if typeof(arg) <: Font
|
if typeof(arg) <: Font
|
||||||
plotattributes[Symbol(letter,:tickfont)] = arg
|
plotattributes[Symbol(letter,:tickfont)] = arg
|
||||||
plotattributes[Symbol(letter,:guidefont)] = arg
|
plotattributes[Symbol(letter,:guidefont)] = arg
|
||||||
|
|||||||
@ -9,6 +9,7 @@ using LibGit2
|
|||||||
using GeometryTypes
|
using GeometryTypes
|
||||||
using Dates
|
using Dates
|
||||||
|
|
||||||
|
include("test_axes.jl")
|
||||||
include("test_hdf5plots.jl")
|
include("test_hdf5plots.jl")
|
||||||
include("test_pgfplotsx.jl")
|
include("test_pgfplotsx.jl")
|
||||||
|
|
||||||
|
|||||||
6
test/test_axes.jl
Normal file
6
test/test_axes.jl
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
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