ggplot barplot knitted with R Markdown


ggplot barplot knitted with R Markdown



Problem: The labels of the y-axis of this plot are too close too each other.



Question: How can I increase the spacing between labels?



enter image description here





Make the plot bigger, make the font smaller, show fewer labels. Not rotating your xaxis labels will give you a smidgeon more space.
– Richard Telford
Jun 29 at 10:37






@RichardTelford, how can I make the plot bigger? Ideally I can make the plot vertically longer, do you know how?
– delcast
Jun 29 at 10:41





you can set the fig.height in the chunk options
– Richard Telford
Jun 29 at 10:54





@RichardTelford! Thanks!
– delcast
Jun 29 at 11:24




1 Answer
1



Set the fig.height in your rmd chunck.
Sample


```{r, warning=FALSE,message=FALSE, fig.height=12, fig.width=12}
# Your ggplot code goes over here

```






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

how to run turtle graphics in Colaboratory

Export result set on Dbeaver to CSV