Skip to content

Error when using axis_logticks with pseudo_log transformation #6121

Closed
@bkohrn

Description

@bkohrn

I just updated to the latest versions of R and tidyverse (R 4.4.1, ggplot2 3.5.1), and decided to test out the new axis_logticks with a pseudo_log plot that I find myself doing fairly frequently. However, when I tried to run it, I ended up with an error message:

Error in seq.default(start, end, by = 1) : wrong sign in 'by' argument

Minimal example:

tibble("Y_val" = c(0, 1e-6, 1e-5, 1e-4),
       "X_val" = c(10, 20, 30, 40)) %>% 
  ggplot(
    aes(
      x = X_val,
      y = Y_val
    )
  ) + 
  geom_point() + 
  scale_y_continuous(
    transform = pseudo_log_trans(sigma = 1e-7, base = 10),
    guide = "axis_logticks"
  ) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorguides 📏

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions