Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geom_trans() doesn't work with geom_dumbbell() #73

Open
morrisseyj opened this issue Jan 7, 2021 · 0 comments
Open

geom_trans() doesn't work with geom_dumbbell() #73

morrisseyj opened this issue Jan 7, 2021 · 0 comments

Comments

@morrisseyj
Copy link

Trying to use geom_dumbbell() on plot with log transformed x and y axes. Throws error:

Error in [.data.frame(df, , c("alpha", "colour", "size", "linetype")) :
undefined columns selected

Here is an example:

#create the data
df <- data.frame(x = c(1, 2, 3, 100),
                 xend = c(2, 4, 6, 110),
                 y = c(1, 2, 3, 100)) 

#Try the plot with coord_transform
library('ggalt')
ggplot(df, aes(x = x, xend = xend, y = y)) + 
  geom_dumbbell() + 
  coord_trans(x = 'log2', y = 'log2')

Error:

Error in [.data.frame(df, , c("alpha", "colour", "size", "linetype")) :
undefined columns selected

If i try coord_trans(x = 'log2', xend = 'log2', y = 'log2), I get the error:

Error in coord_trans(x = "log2", xend = "log2", y = "log2") :
unused argument (xend = "log2")

Question is more fully articulated here: https://stackoverflow.com/questions/65616356/geom-dumbbell-with-coord-trans?noredirect=1#comment116014912_65616356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant