Re: [R] ggplot2 font size problem

2008-08-11 Thread hadley wickham
On Mon, Aug 11, 2008 at 1:24 PM, dhzdhz <[EMAIL PROTECTED]> wrote: > > x=c("abcdefghijklmn", "opqrstuvwxyz") > y=c(1, 2) > df=data.frame(name=x, value=y) > p=ggplot(df, aes(name, value))+geom_point() > grid.gedit(gPath("xaxis"), gp=gpar(fontsize=8)) > print(p) > > It doesn't work. I have to print(p

Re: [R] ggplot2 font size problem

2008-08-11 Thread dhzdhz
x=c("abcdefghijklmn", "opqrstuvwxyz") y=c(1, 2) df=data.frame(name=x, value=y) p=ggplot(df, aes(name, value))+geom_point() grid.gedit(gPath("xaxis"), gp=gpar(fontsize=8)) print(p) It doesn't work. I have to print(p) before I change the font size. Furthermore, this change will be overwritten by de

Re: [R] ggplot2 font size problem

2008-08-11 Thread hadley wickham
Hi dhzdhz, There's currently no particularly easy way to do this. It is possible to use grid to edit these labels directly (see http://had.co.nz/ggplot2/book/grid.pdf), but the next version of ggplot2 will have a more convenient theming system that will make it much easier to make these sorts of

Re: [R] ggplot2 font size problem

2008-08-11 Thread stephen sefick
I can't reproduced this (function aes), but have you looked at ?par cex cex.axis (and so on) On Mon, Aug 11, 2008 at 11:55 AM, dhzdhz <[EMAIL PROTECTED]> wrote: > > How do I change the font size of the label in ggplot. For example > > x=c("abcdefghijklmn", "opqrstuvwxyz") > y=c(1, 2) > df=data.fra

[R] ggplot2 font size problem

2008-08-11 Thread dhzdhz
How do I change the font size of the label in ggplot. For example x=c("abcdefghijklmn", "opqrstuvwxyz") y=c(1, 2) df=data.frame(name=x, value=y) p=ggplot(df, aes(name, y))+geom_point() Now the name of "abcdefghijklmn" and "opqrstuvwxyz" are too long. How can I change the font size of them. And