ggalt
ggalt copied to clipboard
geom_trans() doesn't work with geom_dumbbell()
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