Changing the x-axis in ggseqlogo in R
1
0
Entering edit mode
20 months ago
margo ▴ 40

I have a sequence logo of 21 bases. I have generated a sequence logo using ggseqlogo and the x-axis goes from 1-21. I would like to be able to change the x-axis to read -10-+10. Does anyone know how to do this?

R sequence ggseqlogo • 1.2k views
ADD COMMENT
3
Entering edit mode
20 months ago

Untested but adding + scale_x_continuous(breaks=1:21, labels=-10:10) to the returned ggplot2 object should work.

ADD COMMENT
0
Entering edit mode

Thank you! That works!

ADD REPLY
0
Entering edit mode

I've moved the comment to an answer. Please accept it to mark the post as solved.

ADD REPLY

Login before adding your answer.

Traffic: 2438 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6