Use theme()
:
d <- data.frame(x=gl(10, 1, 10, labels=paste("long text label ", letters[1:10])), y=rnorm(10)) ggplot(d, aes(x=x, y=y)) + geom_point() + theme(text = element_text(size=20), axis.text.x = element_text(angle=90, hjust=1)) #vjust adjust the vertical justification of the labels, which is often useful
![](https://readforlearn.com/wp-content/uploads/2021/11/Ydn6G.png)
There’s lots of good information about how to format your ggplots here. You can see a full list of parameters you can modify (basically, all of them) using ?theme
.
Related Posts:
- Replace a value in a data frame based on a conditional (`if`) statement
- How to read in .HTM into R as a data frame?
- How to randomize ggplot factor color scheme, keeping same default distances on color wheel?
- Count number of occurences for each unique value
- Warning message: line appears to contain embedded nulls [duplicate]
- How to change line width in ggplot?
- Error in library(ggplot2) : There is no package called ‘ggplot2’
- Transpose a data frame
- How to drop columns by name in a data frame
- How to reshape data from long to wide format
- Change size of axes title and labels in ggplot2
- Multiple If Statements in R
- ggplot2, change title size
- Combine two or more columns in a dataframe into a new column with a new name
- Insert picture/table in R Markdown
- Test if a vector contains a given element
- R “Error: unexpected ‘}’ in “}”
- Insert a blank column in dataframe
- “length of ‘dimnames’ [2] not equal to array extent” on one of two very similar sets
- Mean per group in a data.frame
- How to install RHadoop packages (Rmr, Rhdfs, Rhbase)?
- Error in dev.off() : cannot shut down device 1 (the null device)
- How to create an empty matrix in R?
- standard deviation on dataframe does not work
- Warning message: In `…` : invalid factor level, NA generated
- How to increase font size in a plot in R?
- Merge r brings error “‘by’ must specify uniquely valid columns”
- Subscripts in plots in R
- What does the error “arguments imply differing number of rows: x, y” mean?
- Aggregate multiple columns at once
- Error in model.frame.default: variable lengths differ
- Non-numeric argument to mathematical function
- Position-dodge warning with ggplot boxplot?
- Plot two graphs in same plot in R
- data.table vs dplyr: can one do something well the other can’t or does poorly?
- KNN in R: ‘train and class have different lengths’?
- Error in rep(1, n.ahead) : invalid ‘times’ argument in R
- Producing subscripts in R markdown
- ggplot geom_text font size control
- lme4::lmer reports “fixed-effect model matrix is rank deficient”, do I need a fix and how to?
- R multiple conditions in if statement
- Remove quotes from a character vector in R
- Convert data.frame columns from factors to characters
- Re-ordering factor levels in data frame
- Is it possible to have a multi-line comments in R?
- R – error “variable lengths differ”
- Select rows from a data frame based on values in a vector
- how to increase the limit for max.print in R
- how to increase the limit for max.print in R
- backward elimination in R
- Error in eval(expr, envir, enclos) : object not found
- Replace NA with 0 in a data frame column [duplicate]
- How to plot 3D scatter diagram using ggplot?
- How do I convert a factor into date format?
- Plot multiple boxplot in one graph
- R will plot but won’t draw abline
- scale_fill_discrete and scale_fill_manual – legend options confusion
- R – argument is of length zero in if statement
- How to solve ‘protection stack overflow’ issue in R Studio
- Merging data – Error in fix.by(by.x, x)
- Error in generating boxplot two variable data frame: adding class “factor” to an invalid object
- Error : Unable to start png() device
- Remove NA values from a vector
- “no function to return from, jumping to top level”
- r random forest error – type of predictors in new data do not match
- env=baseenv() in R
- How to set axis range R
- Simple for loop in R producing “replacement has length zero” in R
- Removing punctuations from text using R
- How to find out which package version is loaded in R?
- How to melt and cast dataframes using dplyr?
- What does Continuous x aesthetic — did you forget aes(group=…) mean?
- How to unload a package without restarting R
- What does the error “object not interpretable as a factor” mean?
- How to declare a vector of zeros in R
- R Sweave: NO TeX installation detected
- Plotting legend outside plot in R
- Boolean operators && and ||
- Reset par to the default values at startup
- R avoiding “restarting interrupted promise evaluation” warning
- How to increase the font size of ggtitle in ggplot2
- do-while loop in R
- ERROR: [on_request_read] connection reset by peer in R shiny
- Error in as.vector(x, mode) : cannot coerce type ‘closure’ to vector of type ‘any’
- Suppress output of a function
- Error in G * t(hat) : non-conformable arrays
- How to counter the ‘non-numeric matrix extent’ error in R?
- What does is.na() applied to non-(list or vector) of type ‘NULL’ mean?
- error r: invalid subscript type “closure” in a simple regression
- Colour points in a plot differently depending on a vector of values
- increase legend font size ggplot2
- Mask output of `The following objects are masked from….:` after calling attach() function
- How To Create Vector of Vector In R
- Round down a numeric
- Construct a manual legend for a complicated plot
- Code to clear all plots in RStudio
- Installing R on Android
- Convert data.frame column to a vector?
- Error in summary.connection(connection) : invalid connection
- When trying to replace values, “missing values are not allowed in subscripted assignments of data frames”