You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/ggplot2/2019-07-30-geom_text.Rmd
+19-11Lines changed: 19 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -42,10 +42,10 @@ packageVersion('plotly')
42
42
Sources: [International IDEA](https://www.idea.int/data-tools/continent-view/Europe/40?st=par#rep) for national turnout and [European Parliament](https://election-results.eu/turnout/) for European turnout, while regional classifications are based on [EuroVoc](https://publications.europa.eu/en/web/eu-vocabularies/th-concept-scheme/-/resource/eurovoc/100277?target=Browse).
Colour-coding the text itself might present readability issues. Another possible use of geom_text is to keep the text grey, but overlay it on a coloured point graph.
68
+
Colour-coding the text itself might present readability issues. Another possible use of geom\_text is to keep the text grey, but overlay it on a coloured point graph.
69
69
70
70
Adding the *text* option within aes() allows us to control the text that appears when hovering over a point.
Let's use the LaCroixColoR package to spruce up the colour scheme. In addition, by using scale_size_continuous, we can make sure that none of the text is too small.
97
+
Let's use the LaCroixColoR package to spruce up the colour scheme. In addition, by using scale\_size\_continuous, we can make sure that none of the text is too small.
Adding a regression line as well as a label. geom_smooth does not allow for adjusting the transparency of the line (using alpha), which is why stat_smooth is used here. annotate is used to include a single text label (geom_text would create one label for every data point, all overlapped with each other).
127
+
Adding a regression line as well as a label. geom\_smooth does not allow for adjusting the transparency of the line (using alpha), which is why stat\_smooth is used here. annotate is used to include a single text label (geom\_text would create one label for every data point, all overlapped with each other).
0 commit comments