diff --git a/man/theme.Rd b/man/theme.Rd index 2591925f4a..3d5af33dbf 100644 --- a/man/theme.Rd +++ b/man/theme.Rd @@ -251,15 +251,20 @@ p1 + theme( ) # Axes ---------------------------------------------------------------------- +# Change styles of axes texts and lines p1 + theme(axis.line = element_line(size = 3, colour = "grey80")) p1 + theme(axis.text = element_text(colour = "blue")) p1 + theme(axis.ticks = element_line(size = 2)) + +# Change the appearance of the y-axis title +p1 + theme(axis.title.y = element_text(size = rel(1.5), angle = 90)) + +# Make ticks point outwards on y-axis and inwards on x-axis p1 + theme( - axis.ticks.length.y = unit(.25, "cm"), - axis.ticks.length.x = unit(-.25, "cm"), - axis.text.x=element_text(margin=margin(t=.3, unit="cm")) + axis.ticks.length.y = unit(.25, "cm"), + axis.ticks.length.x = unit(-.25, "cm"), + axis.text.x = element_text(margin = margin(t = .3, unit = "cm")) ) -p1 + theme(axis.title.y = element_text(size = rel(1.5), angle = 90)) \donttest{ # Legend -------------------------------------------------------------------- diff --git a/tests/figs/themes/ticks-length.svg b/tests/figs/themes/ticks-length.svg new file mode 100644 index 0000000000..58e713674f --- /dev/null +++ b/tests/figs/themes/ticks-length.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +2.5 +5.0 +7.5 +10.0 + + + + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +2.5 +5.0 +7.5 +10.0 +1:10 +1:10 +1:10 +1:10 +ticks_length +