3

How can I control the size of labels and legend text?

This example is taken right of the HH documentation:

require(HH)
data(ProfChal)  ## ProfChal is a data.frame.
likert(Question ~ . , ProfChal[ProfChal$Subtable=="Employment sector",],
   main='Is your job professionally challenging?', ylab=NULL)

enter image description here

To be more specifically, I would like to increase the size of the five labels on the left side of the figure.

ZygD
  • 22,092
  • 39
  • 79
  • 102
moabit21
  • 639
  • 8
  • 20

1 Answers1

4

HH generates lattice plots, so lattice commands should work. To change the text size for the y-axis labels, add this line to your code: scales = list(y = list(cex = 1.2)), where cex in the multiplier to control the text size.

    library(HH)

    data(ProfChal)  ## ProfChal is a data.frame.

    likert(Question ~ . , ProfChal[ProfChal$Subtable=="Employment sector",],
       main='Is your job professionally challenging?', 
       ylab=NULL, 
       scales = list(y = list(cex = 1.2)))
Sandy Muspratt
  • 31,719
  • 12
  • 116
  • 122
  • Perfect, thank you! Could you add the option that specifies the font size in the legend? – moabit21 Mar 04 '16 at 02:11
  • My apologies, but I can't, not in a hurry anyway. You might want to ask the question again using the Lattice tag. Or write directly to the HH package author. Or consult the [Heiberger and Robbins](https://www.jstatsoft.org/article/view/v057i05) paper on the likert function. Or move to the [likert package](http://jason.bryer.org/likert/.) which is based on ggplot2. – Sandy Muspratt Mar 04 '16 at 19:58
  • I found it: It's "auto.key=list(cex.1.2)" – moabit21 Mar 05 '16 at 01:48