How can I change font type in an histogram legend in R?

520 views Asked by At

I have used "text.font = 4", but that did not work. Any ideas on how to do this in base R?

Thanks!

1

There are 1 answers

1
G5W On

It is not clear what part of the text you want to change, so I will just demonstrate how to change the various kinds of text.

You can change the labels on the axis tick marks with font.axis

hist(iris[,4], font.axis=4)

Changed tick marks

You can change the labels on the axis with font.lab

hist(iris[,4], font.lab=4)

Changed axis labels

You can change the main title with font.main

hist(iris[,4], font.main=4)

changed main title