Frans Marcelissen
>
>CC: R-help@r-project.org
>
>Onderwerp: Re: [R] 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
Frans
-Oorspronkelijk bericht-
Van: Ista Zahn [mailto:istaz...@gmail.com]
Verzonden: zaterdag 22 december 2012 0:47
Aan: Frans Marcelissen
CC: R-help@r-project.org
Onderwerp: Re: [R] ggplot2: setting martin
Well, the margin
is being set large enough to accommodate
the labels.
So if you
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
wrote:
> Is it possible
Is it possible to set the margin in ggplot2 to a fixed size? I create many
plots, and I want them to look the same.
Especially I want them to have the same left margin.
But
P<-ggplot()+geom_bar(aes(c("short label1","short
label2"),runif(2)))+coord_flip()
P<-creates a plot with another margin as
4 matches
Mail list logo