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

0 votes
May 30, 2018 in Data Analytics by shams
• 3,630 points
2,556 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,750 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,630 points
228 views
+1 vote
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,750 points
215 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,750 points
2,188 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 Abhi
• 3,680 points
70 views
0 votes
1 answer

Shiny r ,I'm doing a dashboard and I can not replace in the table below the name of the column by choosing the selectinput.

Hi, When you want to change any input ...READ MORE

answered Aug 19, 2019 in Data Analytics by anonymous
• 32,490 points
114 views
0 votes
0 answers

How can i change elements in r programming language

If A=1,2,3 and B=1,2,3,4 and C=20,44,39 in ...READ MORE

Jul 23 in Data Analytics by Arpita
• 120 points
62 views
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,090 points
121 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,750 points
5,407 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,750 points
312 views