Skip to content

Commit

Permalink
customizations
Browse files Browse the repository at this point in the history
  • Loading branch information
mdancho84 committed Oct 4, 2022
1 parent 3608827 commit 7c74ee2
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions 055_ggradar/055_ggradar.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,24 @@ vehicle_summary_tbl
# * Single Radar ----
vehicle_summary_tbl %>% ggradar()

vehicle_summary_tbl %>% ggradar(
group.colours = palette_light() %>% unname(),
plot.title = "MPG Comparison By Vehicle Class"
)
vehicle_summary_tbl %>%
ggradar(
group.colours = palette_light() %>% unname(),
group.point.size = 0,
group.line.width = 1,
plot.title = "MPG Comparison By Vehicle Class",
fill = TRUE,
fill.alpha = 0.25
)


# * Faceted Radar ----
vehicle_summary_tbl %>%
ggradar() +
ggradar(
group.colours = palette_light() %>% unname(),
fill = TRUE,
fill.alpha = 0.25
) +

# Facet
facet_wrap(~ group, ncol = 3) +
Expand All @@ -62,12 +71,13 @@ vehicle_summary_tbl %>%
scale_color_tq() +
theme(
strip.text = element_text(
size = 12,
size = 12,
colour = "white",
margin = margin(t = 5, b = 5)
),
strip.background = element_rect(fill = "#2C3E50"),
legend.position = "none"
legend.position = "none",
plot.margin = margin(10, 10, 10, 10)
) +

# Title
Expand Down Expand Up @@ -98,7 +108,14 @@ vehicle_summary_tbl %>%

mutate(group = factor(group, levels = vehicle_similarity_tbl$term)) %>%

ggradar() +
ggradar(
group.colours = palette_light() %>% unname(),
group.point.size = 0,
group.line.width = 1,
fill = TRUE,
fill.alpha = 0.25,
grid.label.size = 4
) +
facet_wrap(~ group, ncol = 3) +
scale_color_tq() +
labs(title = "Vehicle Classes Arranged By Similarity") +
Expand Down

0 comments on commit 7c74ee2

Please sign in to comment.