From 871b1a07076e4039e1fd3c16e2dcf14e76d15b86 Mon Sep 17 00:00:00 2001 From: gungorMetehan <102655648+gungorMetehan@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:18:26 +0300 Subject: [PATCH] Update scales-position.qmd Punctuation --- scales-position.qmd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scales-position.qmd b/scales-position.qmd index e9c9c720..fe7cedd7 100644 --- a/scales-position.qmd +++ b/scales-position.qmd @@ -689,7 +689,7 @@ This can often produce clearer plots: in the example above each year is labelled ## Discrete position scales {#sec-discrete-position} It is also possible to map discrete variables to position scales, with the default scales being `scale_x_discrete()` and `scale_y_discrete()`. -For example, the following two plot specifications are equivalent +For example, the following two plot specifications are equivalent: ```{r} #| label: default-scales-discrete @@ -735,8 +735,7 @@ ggplot(mpg, aes(x = drv, y = hwy)) + geom_boxplot(width = .4) \index{Axis!labels} \index{Legend!keys} -The limits, breaks. -and labels for a discrete position scale can be set using the `limits`, `breaks`, and `labels` arguments. +The limits, breaks, and labels for a discrete position scale can be set using the `limits`, `breaks`, and `labels` arguments. For the most part these behave identically to the corresponding arguments for numeric scales (@sec-numeric-position-scales), though there are some differences. For example, the limits of a discrete scale are not defined in terms of endpoints, but instead correspond to the set of allowable values for that variable. Accordingly, ggplot2 expects that the `limits` of a discrete scale should be a character vector that enumerates all possible values in the order they should appear: