Data Science Desktop Survival Guide
by Graham Williams |
|||||
Labels |
20200422 The x-axis and y-axis labels can be specified using ggplot2::xlab() and ggplot2::ylab():
...
xlab("Minimum Temperature") + ylab("Maximum Temperature") + ...
The labels can alternatively be specified using ggplot2::labs() which also accepts many other label options too:
|
...
labs(x="Minimum Temperature", y="Maximum Temperature", colour="Rain") ...
A quick way to remove a label is to specify NULL:
|
...
xlab(NULL) + ...
See Section 10.24 to remove the label, ticks, and text.
|