rotatedAxisElementText: Return Element Text Object

Description Usage Arguments Examples

Description

Return Element Text Object in pecific angles

Usage

1
rotatedAxisElementText(angle, position = "x")

Arguments

angle

angle in which to turn element [0;360]

position

axis position, Default: 'x'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
if(interactive()){
#Load Required Libraries
library(ggplot2)
library(gridExtra)
 #Demonstrate Usage for a Variety of Rotations
df    = data.frame(x=0.5,y=0.5)
plots = lapply(seq(0,90,length.out=4),function(a){
 ggplot(df,aes(x,y)) +
   geom_point() +
   theme(axis.text.x = rotatedAxisElementText(a,'x'),
         axis.text.y = rotatedAxisElementText(a,'y')) +
   labs(title = sprintf("Rotated %s",a))
})
grid.arrange(grobs=plots)
 }

## End(Not run)

JBrenn/Helper4me documentation built on May 7, 2019, 6:49 a.m.