This is fixed in the development version.
> 2. When I use grid.arrange to plot 4 plots on the same page, the
> output text for labels and title is different than what I see on the
> screen (in general much larger). Why? Output is PDF. The result does
> not produce publication quality plots.
Please provide a reproducible example.
> 5. Finally, some perhaps silly question: once I find a package, like
> gridExtra, what is the best place to find how to use it properly?
> Detailed examples of its functions?
In theory, you should get such documentation from package?gridExtra,
but not everyone has written a package documentation page. You can
always get a list of functions in the package with help(package =
ggExtra)
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
> 1. Labels
> When I make a plot the x-axis and y-axis label is not centered. This
> does not produce publication quality plots.
> How do I center it by default (and forever?)
This is fixed in the development version.
> 2. When I use grid.arrange to plot 4 plots on the same page, the
> output text for labels and title is different than what I see on the
> screen (in general much larger). Why? Output is PDF. The result does
> not produce publication quality plots.
Please provide a reproducible example.
> 5. Finally, some perhaps silly question: once I find a package, like
> gridExtra, what is the best place to find how to use it properly?
> Detailed examples of its functions?
In theory, you should get such documentation from package?gridExtra,
but not everyone has written a package documentation page. You can
always get a list of functions in the package with help(package =
ggExtra)
That's not a reproducible example, please see http://gist.github.com/270442
In your screenshot Rstudio uses its own output device; I suspect this
is the reason you see a different font size with pdf. Note that this
issue is not related to ggplot2 so it may not be the best place to ask
for help.
For your other layout issues, I think your best option is to use a
dummy facetting variable; that will take care of the spacing between
panels, as well as aligning the axes. See
https://github.com/hadley/ggplot2/wiki/Align-two-plots-on-a-page for
an example.
>
> http://dl.dropbox.com/u/473509/R_examples.zip
>
>>
>>
>> > 5. Finally, some perhaps silly question: once I find a package, like
>> > gridExtra, what is the best place to find how to use it properly?
>> > Detailed examples of its functions?
>>
>> In theory, you should get such documentation from package?gridExtra,
>> but not everyone has written a package documentation page. You can
>> always get a list of functions in the package with help(package =
>> ggExtra)
>
>
> very useful, thanks!
>
> -Alberto
>
>
>
>>
>>
>> Hadley
>>
>> --
>> Assistant Professor / Dobelman Family Junior Chair
>> Department of Statistics / Rice University
>> http://had.co.nz/
>
>
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
> For your other layout issues, I think your best option is to use a
> dummy facetting variable; that will take care of the spacing between
> panels, as well as aligning the axes. See
> https://github.com/hadley/ggplot2/wiki/Align-two-plots-on-a-page for
> an example.
I've just run this example in the dev version of ggplot2 and it has
changed colour from red/blue to blue - is this intentional?
I'm also getting error messages at the end when I try to print the
graph. i.e. this is what I did...
library(devtools)
dev_mode()
library(ggplot2)
x <- seq(1992, 2002, by=2)
d1 <- data.frame(x=x, y=rnorm(length(x)))
xy <- expand.grid(x=x, y=x)
d2 <- data.frame(x=xy$x, y=xy$y, z= jitter(xy$x + xy$y))
d1$panel <- "a"
d2$panel <- "b"
d1$z <- d1$x
d <- rbind(d1, d2)
p <- ggplot(data = d, mapping = aes(x = x, y = y))
p <- p + facet_grid(panel~., scale="free")
p <- p + layer(data= d1, geom = c( "line"), stat = "identity")
p <- p + layer(data=d2, mapping=aes(colour=z, fill=z), geom
=c("tile"), stat = "identity")
p
Then I get...
> p
Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
Kind regards,
Sean
Yes, I've been meaning to change that for a while - the colour scale
should now look clearly ordered.
> I'm also getting error messages at the end when I try to print the
> graph. i.e. this is what I did...
Those are warning messages, and have just been fixed.