Skip to content

Commit

Permalink
fix direction param
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-connelly-cmap committed Aug 7, 2024
1 parent 98243ce commit 8f65dec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
12 changes: 6 additions & 6 deletions R/geom_text_lastonly_new.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,13 @@ geom_text_lastonly <- function(mapping = NULL, data = NULL,
max.overlaps = getOption("ggrepel.max.overlaps", default = 10),
nudge_x = 0.25,
nudge_y = 0,
xlim = c(NA, NA),
ylim = c(NA, NA),
show.legend = FALSE,
check_overlap = FALSE,
na.rm = FALSE,
direction = c("both","y","x"),
seed = NA,
verbose = FALSE,
show.legend = FALSE,
inherit.aes = TRUE,
add_points = FALSE,
Expand Down Expand Up @@ -797,11 +802,6 @@ GeomPointLast <- ggproto(
)

# GeomPointLast helper functions
ggname <- function(prefix, grob) {
grob$name <- grobName(grob, prefix)
grob
}

translate_shape_string <- function(shape_string) {
# strings of length 0 or 1 are interpreted as symbols by grid
if (nchar(shape_string[1]) <= 1) {
Expand Down
10 changes: 9 additions & 1 deletion R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,15 @@ fetch_pal <- function(pal,
}
}

## GGrepel utility functions


# ggrepel utility functions -----------------------------------------------

ggname <- function(prefix, grob) {
grob$name <- grobName(grob, prefix)
grob
}

with_seed_null <- function(seed, code) {
if (is.null(seed)) {
code
Expand Down

0 comments on commit 8f65dec

Please sign in to comment.