How to wrap text automatically in ggplot
If you've ever spent time in ggplot trying to get the width of text elements just right, this tip is for you! I recently learned from Nicola Rennie about the element_textbox_simple()
function from the ggtext
package. This function will automatically wrap your title, subtitle, or other text so that it fits perfectly with your plot.
Sign up for the newsletter
Get blog posts like this delivered straight to your inbox.
You need to be signed-in to comment on this post. Login.