Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions vignettes/introduction.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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(<args>)`
and `plt(<args>)` should produce identical results.
:::

## Grouped data
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down
Loading