Modifying the appearance of text in an R figure with ggplot2's theme function (CC147)

preview_player
Показать описание
Ever wonder how to change the text appearance in an R figure? This is your video! Pat will use the labs and theme functions from ggplot2 and show you everything you'd ever want to know about formatting the titles and axis labels of your figures using element_text, element_markdown, and element_textbox_simple. The data depict the percentage of people in 15 countries who would be willing to receive the COVID-19 vaccine as of August and October of 2020.

You can also find complete tutorials for learning R with the tidyverse using...

0:00 Introduction
1:23 Using labs to add titles and axis labels
7:49 Formatting text using element_text in theme
12:59 Formatting text using element_markdown
15:51 Formatting text using element_textbox_simple
18:35 Modifying the line height of titles
19:36 Modifying margins around text in titles
21:26 Recap
Рекомендации по теме
Комментарии
Автор

I picked up some good tricks from this. “Color=null” is much cleaner than my old way of putting element_blank() in the theme . I never knew you could hover over the ❌ to get a tooltip.

Since you’re doing a follow up, you can add the r to “pecent ” for us OCD types

russtin
Автор

I think the only thing I left out of this video was how to change the angle of text. See if you can't figure that out on your own. What are some possible problems with putting text on an angle?

Riffomonas
Автор

I have been wrestling with my figure quality for a couple days and this has solved a few of my problem so thanks for that!!
One question is how would you go about editing the text that isn't an additional layer to the figure? I'm creating a taxonomic tree from the package MetabaR and it automatically gives my species names, unfortunately these are overlapping, on an angle and run out of the boundaries and fixing them is proving challenging.

frankiesimpson
welcome to shbcf.ru