How can I change font size and direction of axes text in ggplot2 ?

0 votes
May 30, 2018 in Data Analytics by shams
• 3,580 points
407 views

1 answer to this question.

0 votes

You can try theme():

Library(ggplot2)
a <- data.frame(x=gl(10, 1, 10, labels=paste("long text label ", letters[1:10])), y=rnorm(10))
ggplot(a, aes(x=x, y=y)) + geom_point() + theme(text = element_text(size=20),
axis.text.x = element_text(angle=90, hjust=1))
//vjust will adjust the vertical justification of the labels

answered May 30, 2018 by zombie
• 3,690 points

Related Questions In Data Analytics

0 votes
1 answer

How can I control the size of points in an R scatterplot?

plot(variable, type='o' , pch=5, cex=.3) The pch argument ...READ MORE

answered May 3, 2018 in Data Analytics by shams
• 3,580 points
34 views
0 votes
2 answers
0 votes
1 answer

How can I get type of all variables in R?

It is a easy task and one ...READ MORE

answered May 21, 2018 in Data Analytics by zombie
• 3,690 points
43 views
0 votes
1 answer

How can I increase the number of axis ticks in R ?

You can try to override ggplots default ...READ MORE

answered May 30, 2018 in Data Analytics by zombie
• 3,690 points
243 views
0 votes
1 answer

How can I find number of columns in a dataframe

To know the number of columns in ...READ MORE

answered Oct 11, 2018 in Data Analytics by Anmol
• 3,620 points
31 views
0 votes
1 answer
0 votes
1 answer

How can I use parallel so that it preserves the list of data frames

You can use pmap as follows: nc <- ...READ MORE

answered Apr 4, 2018 in Data Analytics by kappa3010
• 2,020 points
34 views
0 votes
1 answer

How can I drop columns by name in a data frame ?

We can Drop Columns by name in ...READ MORE

answered Apr 13, 2018 in Data Analytics by zombie
• 3,690 points
36 views
0 votes
1 answer

How to change font size of text and axes on R plots ?

To change the font size of text, ...READ MORE

answered Apr 20, 2018 in Data Analytics by zombie
• 3,690 points
64 views
0 votes
1 answer

How can I add x and y axis labels in ggplot2 ?

# Load a dataset(to work with) # We’ll ...READ MORE

answered May 16, 2018 in Data Analytics by zombie
• 3,690 points
116 views