Skip to content

Commit 34c0a8c

Browse files
committed
Simplify intro Readme
1 parent 2ab3317 commit 34c0a8c

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

README.Rmd

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,13 @@ teams_colors_logos <- mlbplotR::load_mlb_teams() |>
5353
dplyr::filter(!team_abbr %in% c("AL", "NL", "MLB")) |>
5454
dplyr::mutate(
5555
a = rep(1:6, 5),
56-
b = sort(rep(1:5, 6), decreasing = TRUE),
57-
alpha = ifelse(grepl("A", team_abbr), 1, 0.75), # Keep alpha == 1 for teams that have an "A"
58-
color = ifelse(grepl("E", team_abbr), "b/w", NA) # Set teams that have an "E" to black & white
56+
b = sort(rep(1:5, 6), decreasing = TRUE)
5957
)
6058
6159
6260
ggplot2::ggplot(teams_colors_logos, aes(x = a, y = b)) +
63-
mlbplotR::geom_mlb_logos(aes(team_abbr = team_abbr, color = color, alpha = alpha), width = 0.075) +
61+
mlbplotR::geom_mlb_logos(aes(team_abbr = team_abbr), width = 0.075) +
6462
ggplot2::geom_label(aes(label = team_abbr), nudge_y = -0.35, alpha = 0.5) +
65-
ggplot2::scale_color_identity() +
66-
ggplot2::scale_alpha_identity() +
6763
ggplot2::theme_void()
6864
```
6965

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,13 @@ teams_colors_logos <- mlbplotR::load_mlb_teams() |>
4949
dplyr::filter(!team_abbr %in% c("AL", "NL", "MLB")) |>
5050
dplyr::mutate(
5151
a = rep(1:6, 5),
52-
b = sort(rep(1:5, 6), decreasing = TRUE),
53-
alpha = ifelse(grepl("A", team_abbr), 1, 0.75), # Keep alpha == 1 for teams that have an "A"
54-
color = ifelse(grepl("E", team_abbr), "b/w", NA) # Set teams that have an "E" to black & white
52+
b = sort(rep(1:5, 6), decreasing = TRUE)
5553
)
5654

5755

5856
ggplot2::ggplot(teams_colors_logos, aes(x = a, y = b)) +
59-
mlbplotR::geom_mlb_logos(aes(team_abbr = team_abbr, color = color, alpha = alpha), width = 0.075) +
57+
mlbplotR::geom_mlb_logos(aes(team_abbr = team_abbr), width = 0.075) +
6058
ggplot2::geom_label(aes(label = team_abbr), nudge_y = -0.35, alpha = 0.5) +
61-
ggplot2::scale_color_identity() +
62-
ggplot2::scale_alpha_identity() +
6359
ggplot2::theme_void()
6460
```
6561

man/figures/README-every-team-1.png

27.2 KB
Loading

0 commit comments

Comments
 (0)