[R] ggplot - axis labels angle

hadley wickham h.wickham at gmail.com
Fri Mar 21 16:12:54 CET 2008


Hi Bernd,

Something like:

qplot(mpg, wt, data=mtcars)
grid.gedit("xaxis::label::text", rot=45)

should do the trick.  The only problem is that the automatic sizing is
set up to work with one orientation of labels.  You might be able to
fudge a solution by experimenting with hjust and vjust, and
xlab="\n\nMy label"

Hadley

On Thu, Mar 20, 2008 at 2:29 PM, Bernd Ebersberger
<Bernd.Ebersberger at mci.edu> wrote:
> dear R-tists,
>
>  im an struggling with labeling ticks of the axis in a ggplot.
>  i would like to print the text associated with the ticks being ploted
>  with a 90 degree angle.
>  how can i possibly do this?
>
>  cheers.
>
>  bernd.
>
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  Bernd Ebersberger
>  Management Center Innsbruck, Austria
>
>
>
>
>
>         [[alternative HTML version deleted]]
>
>  ______________________________________________
>  R-help at r-project.org mailing list
>  https://stat.ethz.ch/mailman/listinfo/r-help
>  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>  and provide commented, minimal, self-contained, reproducible code.
>



-- 
http://had.co.nz/



More information about the R-help mailing list