From fd05acff58111f4f5ac14278320532932187fec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Metehan=20G=C3=9CNG=C3=96R?= <102655648+gungorMetehan@users.noreply.github.com> Date: Fri, 16 Jan 2026 11:08:55 +0300 Subject: [PATCH] Update annotations.qmd Minor typos have been fixed. --- annotations.qmd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/annotations.qmd b/annotations.qmd index fd36a4f8..18d8c25f 100644 --- a/annotations.qmd +++ b/annotations.qmd @@ -100,7 +100,7 @@ The main tool for labelling plots is `geom_text()`, which adds `label` text at t - extrafont, , by Winston Chang, converts fonts to a standard format that all devices can use. - Both approaches have pros and cons, so you will to need to try both of them and see which works best for your needs. + Both approaches have pros and cons, so you will need to try both of them and see which works best for your needs. \index{Font!family} - The `fontface` aesthetic specifies the face, and can take three values: "plain" (the default), "bold" or "italic". @@ -114,7 +114,7 @@ The main tool for labelling plots is `geom_text()`, which adds `label` text at t ``` - You can adjust the alignment of the text with the `hjust` ("left", "center", "right", "inward", "outward") and `vjust` ("bottom", "middle", "top", "inward", "outward") aesthetics. - The aligment is centered by default, but there are often good reasons to override this. + The alignment is centered by default, but there are often good reasons to override this. One of the most useful alignments is "inward". It aligns text towards the middle of the plot, which ensures that labels remain within the plot limits: \index{Font!justification} @@ -139,7 +139,7 @@ The main tool for labelling plots is `geom_text()`, which adds `label` text at t - The font size is controlled by the `size` aesthetic. Unlike most tools, ggplot2 specifies the size in millimeters (mm), rather than the usual points (pts). The reason for this choice is that it makes it the units for font sizes consistent with how other sizes are specified in ggplot2. - (There are 72.27 pts in a inch, so to convert from points to mm, just multiply by 25.4 / 72.27). + (There are 72.27 pts in an inch, so to convert from points to mm, just multiply by 25.4 / 72.27). \index{Font!size} - `angle` specifies the rotation of the text in degrees. @@ -405,7 +405,7 @@ ggplot(mpg, aes(displ, hwy)) + ``` A third approach to direct labelling is provided in the gghighlight package by Hiroaki Yutani . -In many situations is useful for highlighting points or lines (or indeed a variety of different geoms) within a plot, particularly for longitudinal data: +In many situations it is useful for highlighting points or lines (or indeed a variety of different geoms) within a plot, particularly for longitudinal data: ```{r} #| label: gghighlight @@ -441,8 +441,8 @@ ggplot(diamonds, aes(log10(carat), log10(price))) + facet_wrap(vars(cut), nrow = 1) ``` -In this plot, each facet displays the data for one category agains the same regression line. -This makes it easier to compare the facets to each other because there is shared reference line to assist the visual comparison. +In this plot, each facet displays the data for one category against the same regression line. +This makes it easier to compare the facets to each other because there is a shared reference line to assist the visual comparison. A variation on this theme arises when you want each facet of a plot to display data from a single group, with the complete data set plotted unobtrusively in each panel to aid visual comparison. The gghighlight package is particularly useful in this context: