Pippo
Pippo

Reputation: 1583

R - How to Remove Space between an Axis and Its Title?

I removed the ticks and the labels from the x-axis of a plot in R (produced with standard graphics). Now the space between the bottom side of the plot and the title of the x-axis is huge. How to reduce it?

I am not able to implement the solution proposed here. Thanks to anybody who can help.

Upvotes: 2

Views: 1877

Answers (1)

IRTFM
IRTFM

Reputation: 263311

The location of the "line"-argument to title() controls the spacing, so:

 # set xlab=""   the plot call and follow with....
 title(xlab="My X-Label", line= -1)   # or 1 if you wanted it outside

Upvotes: 7

Related Questions