Graphics Reference
In-Depth Information
Figure 8-23. Left: y-axis label with angle=0; right: with angle=90
See Also
See
Changing the Appearance of Text
for more about controlling the appearance of the text.
Showing Lines Along the Axes
Problem
You want to display lines along the x- and y-axes, but not on the other sides of the graph.
Solution
library(gcookbook)
# For the data set
p
<-
ggplot(heightweight, aes(x
=
ageYear, y
=
heightIn))
+
geom_point()
p
+
theme(axis.line
=
element_line(colour
=
"black"
))