How can I make my vertical labels fit within my plotting window?

后端 未结 4 1183
一生所求
一生所求 2021-02-02 13:01

I\'m creating a histogram in R which displays the frequency of several events in a vector. Each event is represented by an integer in the range [1, 9]. I\'m displaying the label

4条回答
  •  终归单人心
    2021-02-02 13:23

    Look at help(par), in particular fields mar (for the margin) and oma (for outer margin). It may be as simple as

    par(mar=c(5,3,1,1))   # extra large bottom margin
    hist(vector, axes = FALSE, breaks = chartBreaks)
    axis(1, at = tickMarks, labels = eventTypes, las = 2, tick = FALSE) 
    

提交回复
热议问题