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

0 votes
May 30, 2018 in Data Analytics by shams
• 3,670 points
4,340 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,670 points
1,274 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 22, 2018 in Data Analytics by zombie
• 3,790 points
1,116 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
6,739 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 12, 2018 in Data Analytics by Abhi
• 3,720 points
602 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
• 33,030 points
1,151 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
560 views
0 votes
1 answer

How can I make a list of lists in R?

Lists of lists are simple to create. list1 ...READ MORE

answered Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
611 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,770 points
122,283 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
1,072 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP