diff --git a/test/test_axes.jl b/test/test_axes.jl index 67ede0a4ba..5c6fc69afe 100644 --- a/test/test_axes.jl +++ b/test/test_axes.jl @@ -65,15 +65,26 @@ end end @testset "aliases" begin - plot(1:2, xl = "x label") - plot(1:2, xrange = (1, 2)) - plot(1:2, xtick = :auto) - plot(1:2, xlabelfontsize = 10) - plot(1:2, xgα = .1) - plot(1:2, xgridls = :solid) - plot(1:2, xgridcolor = :red) - plot(1:2, xminorgridcolor = :red) - plot(1:2, xgrid_lw = .1) - plot(1:2, xminorgrid_lw = .1) - plot(1:2, xtickor = :out) + p = plot(1:2, xl = "x label") + @test p[1][:xaxis][:guide] === "x label" + p = plot(1:2, xrange = (0, 3)) + @test xlims(p) === (0, 3) + p = plot(1:2, xtick = [1.25, 1.5, 1.75]) + @test p[1][:xaxis][:ticks] == [1.25, 1.5, 1.75] + p = plot(1:2, xlabelfontsize = 4) + @test p[1][:xaxis][:guidefontsize] == 4 + p = plot(1:2, gridalpha = .07) + @test p[1][:xaxis][:gridalpha] ≈ .07 + p = plot(1:2, xgridls = :dashdot) + @test p[1][:xaxis][:gridstyle] === :dashdot + p = plot(1:2, xgridcolor = :red) + @test p[1][:xaxis][:foreground_color_grid] === RGBA{Float64}(1.,0.,0.,1.) + p = plot(1:2, xminorgridcolor = :red) + @test p[1][:xaxis][:foreground_color_minor_grid] === RGBA{Float64}(1.,0.,0.,1.) + p = plot(1:2, xgrid_lw = .01) + @test p[1][:xaxis][:gridlinewidth] ≈ .01 + p = plot(1:2, xminorgrid_lw = .01) + @test p[1][:xaxis][:minorgridlinewidth] ≈ .01 + p = plot(1:2, xtickor = :out) + @test p[1][:xaxis][:tick_direction] === :out end