-1

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

Thanks!

Nosshi
  • 1
  • 1
  • Check `?theme` for `ggplot2`. – hmhensen Jan 19 '19 at 20:43
  • Wellcome to StackOverflow. Please improve your question in way that it will comply to [mvce](https://stackoverflow.com/help/mcve) and also please check [How to Ask Guide](https://stackoverflow.com/help/how-to-ask) – BlackStork Jan 19 '19 at 21:13
  • When you say you want to change the legend, do you mean that you just want to change the axis labels or are you using the `legend` function to add a legend? Or perhaps you mean that you want to change the main title? – G5W Jan 19 '19 at 21:21

1 Answers1

0

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

G5W
  • 36,531
  • 10
  • 47
  • 80
  • Sorry, to clarify, I am interested in the Legend font type in a histogram. There does not seem to be an obvious way to change the font text type inside the legend of a histogram. – Nosshi Jan 20 '19 at 21:22