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
1,232 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,580 points
54 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,750 points
71 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
514 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,680 points
45 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,440 points
67 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,080 points
53 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,750 points
99 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
132 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
167 views