Description Usage Arguments Examples
Return Element Text Object in pecific angles
1 | rotatedAxisElementText(angle, position = "x")
|
angle |
angle in which to turn element [0;360] |
position |
axis position, Default: 'x' |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.