Skip to content

problem with test for monotonous transformation (secondary axis)? #2008

Closed
@hansvancalster

Description

@hansvancalster
testdat <- data.frame(x = runif(11),
                      y = seq(0,1,0.1))

# NOT OK
ggplot(data = testdat, aes(x = x, y = y)) + 
  geom_point() + 
  scale_y_continuous(sec.axis = sec_axis(trans = ~ .^0.5))

#  OK
ggplot(data = testdat[testdat$y > 0, ], aes(x = x, y = y)) + 
  geom_point() + 
  scale_y_continuous(sec.axis = sec_axis(trans = ~ .^0.5))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorscales 🐍

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions