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

changing axis labels #33

Open
melodysyue opened this issue Jan 21, 2022 · 2 comments
Open

changing axis labels #33

melodysyue opened this issue Jan 21, 2022 · 2 comments

Comments

@melodysyue
Copy link

For the dotplot function, how should I change the x/y axis labels. It seems like the regular ggplot functions (xlab, labs) don't work, the axis labels are still "query" and "target". I would like to label them with specific chromosome names. Thanks!

Here is my R code.
dotplot(ali1.pm, label_seqs=TRUE, order_by="provided", ordering=chr3)+
theme_bw(base_size=25)+
coord_cartesian(xlim=c(32e6, 34e6), ylim=c(45e6, 48e6))+
annotate("rect",xmin=chr3_start, xmax=chr3_end, ymin=-Inf, ymax=Inf, fill="purple", alpha=0.2)+
labs(x="NC_042537.1", y="NC_048567.1", title="Chromosome 3")

Here is the generated plot.
Screen Shot 2022-01-20 at 4 56 55 PM

@edexter
Copy link

edexter commented Jan 24, 2024

I'd like to bump this up as well. I'm running into the same problem.

@jayoung
Copy link

jayoung commented Oct 3, 2024

dotplot() has xlab/ylab arguments - it seems to work for me.

In your example I think it would be :

dotplot(ali1.pm, label_seqs=TRUE, 
    order_by="provided", ordering=chr3, 
    xlab="NC_042537.1", ylab="NC_048567.1") +
 (code for other layers)

does it work for you?

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

3 participants