diff --git a/src/axes.jl b/src/axes.jl index e2f031ad..2f6c4beb 100644 --- a/src/axes.jl +++ b/src/axes.jl @@ -756,7 +756,7 @@ function axis_drawing_info_3d(sp, letter) # don't show the 0 tick label for the origin framestyle if sp[:framestyle] == :origin && !(ticks in (:none, nothing, false)) && length(ticks) > 1 i0 = findfirst(==(0), ticks[1]) - if ind !== nothing + if i0 !== nothing deleteat!(ticks[1], i0) deleteat!(ticks[2], i0) end diff --git a/test/test_recipes.jl b/test/test_recipes.jl index d2dcfdf4..a228d2a6 100644 --- a/test/test_recipes.jl +++ b/test/test_recipes.jl @@ -31,3 +31,19 @@ end # testset sticks = plot(tri, seriestype = :sticks) @test length(sticks) == 1 end + +@testset "framestyle axes" begin + pl = plot(-1:1, -1:1, -1:1) + sp = pl.subplots[1] + defaultret = Plots.axis_drawing_info_3d(sp, :x) + for letter in [:x, :y, :z] + for fr in [:box :semi :origin :zerolines :grid :none] + prevha = UInt64(0) + push!(sp.attr, :framestyle => fr) + ret = Plots.axis_drawing_info_3d(sp, letter) + ha = hash(string(ret)) + @test ha != prevha + prevha = ha + end + end +end \ No newline at end of file