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

Custom x-scale - separate scale_x_logo from geom_logo? #8

Open
ewallace opened this issue Feb 9, 2018 · 1 comment
Open

Custom x-scale - separate scale_x_logo from geom_logo? #8

ewallace opened this issue Feb 9, 2018 · 1 comment

Comments

@ewallace
Copy link

ewallace commented Feb 9, 2018

It would be wonderful to be able to pass in custom x-axis labels. For example, if I am making a consensus sequence around a start codon, we want the "A" of "ATG" to be position 1.

Currently this is challenging in ggseqlogo because geom_logo includes a scale function, which is inconsistent with ggplot2's separation of concerns. I don't think that it is necessary, as in my hands that scale argument does not change the resulting plot.

Could we remove scale from geom_logo, and then if necessary create a scale_logo function with start position as an argument?

Edward

@karl616
Copy link

karl616 commented Sep 7, 2018

I would also appreciate the possibility of manipulating the x-axis scale. It is probably already known, but this work-around works:

fig<-ggplot() + geom_logo(data)
fig$scales$scales[[1]] <- scale_x_continuous(breaks= seq(2,10,by=2),labels=c("A", "B", "C", "D", "E"))

with some reservation for how to construct the scale in any particular case.

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

2 participants