Skip to content

Commit dcab5a1

Browse files
committed
fix(vignette): use ggpath x0/y0 aesthetics for geom_median_lines
ggpath's geom_mean_lines()/geom_median_lines() (now re-exported) use the x0/y0 aesthetics, not cfbplotR's former v_var/h_var, which broke the tutorial vignette's epa_plot chunk during the pkgdown build. Updated the vignette and documented the aesthetic change in NEWS.
1 parent 1d6c503 commit dcab5a1

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

NEWS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
# cfbplotR 0.1.0
1111

1212
* **Rebuilt on the [ggpath](https://mrcaseb.github.io/ggpath/) foundation** (the nflplotR/nbaplotR pattern). cfbplotR now resolves a CFB identifier to an image path and delegates all rendering — caching, aspect ratio, alpha, colorization — to ggpath.
13-
* Dropped the `magick`, `RCurl`, `base64enc`, and `purrr` dependencies; added `ggpath (>= 1.0.0)`. Raised the R requirement to `R (>= 4.1.0)`.
14-
* The public API is preserved: `geom_from_path()`, `element_path()`, `geom_mean_lines()`/`geom_median_lines()`, and related generics are now re-exported from ggpath.
13+
* Dropped the `magick`, `RCurl`, `base64enc`, and `purrr` dependencies; added `ggpath (>= 1.1.0)`. Raised the requirements to `R (>= 4.1.0)` and `ggplot2 (>= 4.0.0)` (matching ggpath's S7 theme elements).
14+
* The public API is preserved: `geom_from_path()`, `element_path()`, `ggpreview()`, and related generics remain available (`geom_from_path()` and friends are now re-exported from ggpath).
15+
* **Breaking (minor):** `geom_mean_lines()` / `geom_median_lines()` are now re-exported from ggpath and use ggpath's aesthetics `x0` / `y0` (a vertical line at `x0`, a horizontal line at `y0`) instead of cfbplotR's former `v_var` / `h_var`. Update calls accordingly, e.g. `geom_median_lines(aes(x0 = pass_epa, y0 = rush_epa))`.
1516
* gt image helpers (`gt_fmt_cfb_logo()`/`gt_fmt_cfb_headshot()`/`gt_fmt_cfb_wordmark()`) now embed via `gt::web_image()`.
1617
* New family-parity conveniences: `gt_cfb_cols_label()`, `cfb_team_factor()`, `clean_team_abbrs()`, and `.cfbplotR_clear_cache()`.
1718
* Added repository community-health files (CLAUDE.md, Copilot instructions, issue/PR templates, CONTRIBUTING, Code of Conduct), normalized badges, a standard SportsDataverse README, a `bibentry()` citation, and a richer pkgdown reference.

vignettes/tutorial.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Now that the data is prepped, we can being to use `cfbplotR`. First we'll plot a
6969

7070
```{r epa_plot}
7171
ggplot(team_plot_data, aes(x = pass_epa, y = rush_epa)) +
72-
geom_median_lines(aes(v_var = pass_epa, h_var = rush_epa)) +
72+
geom_median_lines(aes(x0 = pass_epa, y0 = rush_epa)) +
7373
geom_cfb_logos(aes(team = team), width = 0.075) +
7474
labs(x = "EPA per Pass",y = "EPA per Rush") +
7575
theme_bw()
@@ -82,7 +82,7 @@ team_plot_data %>%
8282
dplyr::mutate(color = if_else(conference == "Pac-12",NA_character_,"b/w"),
8383
alpha = if_else(conference == "Pac-12",1,.6)) %>%
8484
ggplot(aes(x = pass_epa, y = rush_epa)) +
85-
geom_median_lines(aes(v_var = pass_epa, h_var = rush_epa)) +
85+
geom_median_lines(aes(x0 = pass_epa, y0 = rush_epa)) +
8686
geom_cfb_logos(aes(team = team, alpha = alpha, color = color), width = 0.075) +
8787
scale_alpha_identity() +
8888
scale_color_identity() +

0 commit comments

Comments
 (0)