My x-axis labels are pretty long, so they or overlap or they are not shown competely in the plot (las=2).
I would like to rotate them to 35° or 45°, so they are not cut off anymore.
Adding par(srt=45)and theme(axis.text.x=element_text(angle=45)) was not successful and I run out of ideas now.
How is it possible to or rotate the labels or to tell R to show them completely?
I used las=2 before. Results were vertical labels, which are too long and cut off in the output. Therefore I need to know or how to make 35-45° labels or how to show the whole text of the x-axis labels in the output.
And theme just won't work.
I can't run ggplot either:
**Error:data must be a data frame, or other object coercible by fortify(), not an S3 object with class uneval
Did you accidentally pass aes() to the data argument?```
You have to pass the data to ggplot2. That is what is causing the error.
Here is an example of rotating the x axis text by 45 degrees. The text spacing is not quite right.
I tried to convert my data into a data frame by dis <- as.data.frame(disprt)
** Error in as.data.frame.default(disprt) :
cannot coerce class ‘"betadisper"’ to a data.frame**