Moving R-Graph Header

I tried to create a graph in R Plot and just wondered if there was a way to move the caption on the side closer to the graph.

I reduced the font and placed the label in two lines, but when I put it on two lines, the top line falls off the screen and the bottom line is quite far from the numbered Y-axis of the graph, In any case, to move the label closer to the y-axis so that Was all this visible?

+3
source share
1 answer

Try to configure mar:

mar.old <- par('mar')
print(mar.old)

par(mar=rep(10, 4)) # some ridiculous values
plot(density(rnorm(1000)), ylab='foo\nbar\nbaz\nquux')

par(mar=mar.old) # restore original

For more information marsee ?par:

c (, , , ), , . - c (5, 4, 4, 2) + 0,1.

+4

Source: https://habr.com/ru/post/1712566/


All Articles