Merge pull request #3398 from hustf/fix#3397
Bugfix and test, issue #3397
This commit is contained in:
commit
d2c85bdff9
@ -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
|
||||
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user