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

0 votes
May 30, 2018 in Data Analytics by shams
• 3,660 points
2,956 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,790 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,660 points
438 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,790 points
319 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,790 points
3,625 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,720 points
110 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,930 points
184 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, 2020 in Data Analytics by Arpita
• 120 points
113 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
168 views
0 votes
4 answers

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

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

answered Dec 16, 2020 in Data Analytics by Gitika
• 65,870 points
14,278 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,790 points
389 views