Skip to content

Commit

Permalink
Nevermind about ggrepel versions
Browse files Browse the repository at this point in the history
  • Loading branch information
camille-s committed Feb 7, 2024
1 parent 3802f6e commit 240b78a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Suggests:
knitr,
rmarkdown,
testthat (>= 3.0.0),
ggrepel (<= 0.9.4),
ggrepel,
ragg,
withr
URL: https://github.com/CT-Data-Haven/stylehaven,
Expand Down
10 changes: 5 additions & 5 deletions vignettes/dcws_example_plots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,19 @@ Fixing those overlapping points, plus adding a logo:
```

```{r dots3, fig.width=plot_params$cohesion$w, fig.height=plot_params$cohesion$h, eval=require("ggrepel")}
cohesion_dots <- ggplot(cohesion, aes(x = question, y = value, color = group)) +
cohesion_dots <- ggplot(cohesion, aes(x = value, y = question, color = group)) +
geom_point(size = 9) +
geom_text(aes(label = percent100(value)),
data = ~anti_join(., to_dodge, by = c("question", "group")),
size = 3, color = "white") +
ggrepel::geom_text_repel(aes(label = percent100(value)),
data = ~semi_join(., to_dodge, by = c("question", "group")),
size = 3, fontface = "bold", family = "Barlow Semi Condensed",
direction = "x", nudge_x = 0.25, min.segment.length = 2, seed = 1,
direction = "x", nudge_y = 0.25, min.segment.length = 2, seed = 1,
segment.color = tf_pal[["TRUE"]], box.padding = 0.5, show.legend = FALSE) +
coord_flip() +
scale_x_discrete(labels = camiller::clean_titles) +
scale_y_continuous(breaks = NULL) +
# coord_flip() +
scale_y_discrete(labels = camiller::clean_titles) +
scale_x_continuous(breaks = NULL) +
scale_color_manual(values = pal4,
guide = guide_legend(nrow = 2, byrow = TRUE, override.aes = list(size = 4))) +
theme(legend.position = "bottom",
Expand Down

0 comments on commit 240b78a

Please sign in to comment.