Skip to content
Prev 314069 / 398503 Next

ggplot2: setting martin

Well, the margin is being set large enough to accommodate  the labels.
So if you want narrower margins just shorten the labels:

library(stringr)
P + scale_x_discrete(labels = function(x) str_wrap(x, width=12))


HTH,
Ista
On Fri, Dec 21, 2012 at 5:35 PM, Frans Marcelissen
<frans.marcelissen at digipsy.nl> wrote: