Graphics Reference
In-Depth Information
Figure 8-17. X-axis tick labels rotated 0 (left), 90 (middle), and 30 degrees (right)
The hjust and vjust settings specify the horizontal alignment (left/center/right) and vertical
alignment (top/middle/bottom).
Discussion
Besides rotation, other text properties, such as size, style (bold/italic/normal), and the font family
(such as Times or Helvetica) can be set with element_text() , as shown in Figure 8-18 :
bp + theme(axis.text.x = element_text(family = "Times" , face = "italic" ,
colour = "darkred" , size = rel( 0.9 )))
Figure 8-18. X-axis tick labels with manually specified appearance
In this example, the size is set to rel(0.9) , which means that it is 0.9 times the size of the
base font size for the theme.
Search WWH ::




Custom Search