diff --git a/vignettes/introduction.qmd b/vignettes/introduction.qmd index 4f9821e5..3159337f 100644 --- a/vignettes/introduction.qmd +++ b/vignettes/introduction.qmd @@ -63,21 +63,19 @@ earlier. tinyplot(Temp ~ Day, data = aq) # formula method ``` -### Aside: `plt` shorthand +::: {.callout-tip} +## Tip: `plt()` shorthand alias -If you'd prefer to save on a few keystrokes, you can use the shorthand `plt` -alias instead of typing out `tinyplot`. +Use the `plt()` alias instead of `tinyplot()` to save yourself a few keystrokes. +For example: ```{r plt_simple} -plt(Temp ~ Day, data = aq) # `plt` = shorthand alias for `tinyplot` +#| eval: false +plt(Temp ~ Day, data = aq) ``` -Please note that the `plt` shorthand would work for all of the remaining -plot calls below. But we'll stick to `tinyplot` to avoid any potential -confusion. - -::: {.callout-tip} -Use the `plt()` alias instead of `tinyplot()` to save yourself a few keystrokes. +Feel free to try this shorthand with any of the plots that follow; `tinyplot()` +and `plt()` should produce identical results. ::: ## Grouped data @@ -443,7 +441,7 @@ become verbose since it requires users to make very similar successive calls, with many shared arguments. For this reason, the **tinyplot** package provides a special -`tinyplot_add()` (alias `plt_add()`) convenience function for adding layers to +`tinyplot_add()` convenience function for adding layers to an existing tinyplot. The idea is that users need simply pass the _specific_ arguments that they want to add or modify relative to the base layer, and all arguments will be inherited from the original. @@ -469,6 +467,18 @@ tinyplot( tinyplot_add(type = "lm") ``` +::: {.callout-tip} +## Tip: `plt_add()` shorthand alias + +Much like `plt()` is an alias for `tinyplot()`, you can save yourself a few +keystrokes by typing `plt_add()` instead of `tinyplot_add()`: + +```{r plt_add} +#| eval: false +plt_add(type = "lm") +``` +::: + A related---but distinct---concept to adding plot layers is _drawing_ on a plot. The canonical use case is annotating your plot with text or some other function-based (rather than data-based) logic. For example, you may want to