Quantcast

ggplot - axis labels angle

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ggplot - axis labels angle

Bernd Ebersberger
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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ggplot - axis labels angle

hadley wickham
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
<[hidden email]> 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]]
>
>  ______________________________________________
>  [hidden email] 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/

______________________________________________
[hidden email] 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.
Loading...