From 0a7ac18dd3ada1ee13a9fb14a57fc99574362e1a Mon Sep 17 00:00:00 2001 From: t-bltg Date: Thu, 8 Dec 2022 11:52:47 +0100 Subject: [PATCH] start adding tests --- ReferenceTests/src/tests/examples2d.jl | 19 +++++++++++++++++++ src/makielayout/types.jl | 2 ++ 2 files changed, 21 insertions(+) diff --git a/ReferenceTests/src/tests/examples2d.jl b/ReferenceTests/src/tests/examples2d.jl index 757eadde6ae..bffefeb7ddf 100644 --- a/ReferenceTests/src/tests/examples2d.jl +++ b/ReferenceTests/src/tests/examples2d.jl @@ -271,6 +271,25 @@ end st end +@reference_test "Label rotations" begin + N = 18 # number of rotations + fig, ax, _ = scatter(0:1; axis = (; xlabel = "a nice and long x label for this axis", ylabel = "a nice and long y label for this axis")) + st = Stepper(fig) + + #= + record(fig, "rot.gif") do io + for rot in LinRange(0, 2π, N) + ax.xlabelrotation[] = rot + ax.ylabelrotation[] = rot + recordframe!(io) + end + end + =# + + Makie.step!(st) + st +end + @reference_test "Errorbars x y low high" begin x = 1:10 y = sin.(x) diff --git a/src/makielayout/types.jl b/src/makielayout/types.jl index 2f5633968f6..62507a062ae 100644 --- a/src/makielayout/types.jl +++ b/src/makielayout/types.jl @@ -503,6 +503,8 @@ end labelvisible = true "The gap between the label and the ticks." labelpadding = 5f0 + "The label rotation in radians." + labelrotation = 0f0 "The font family of the tick labels." ticklabelfont = :regular "The font size of the tick labels."