YinLiLin / CMplot

đź“Š Circular and Rectangular Manhattan Plot
511 stars 112 forks source link

Move the group legend #9

Open sureman opened 5 years ago

sureman commented 5 years ago

Thank you for the great tool. I apologize if I missed it, but can the location of the legend be changed? My SNPs of interest fall in the same location as the legend. Thanks.

YinLiLin commented 5 years ago

hi,

I am not clear what type of Manhattan plot you point, could you please attach the figure here, I am happy to debug the code with you problem. thanks.

Lilin

sureman commented 5 years ago

Hi Lilin. Thank you for the quick response. Please see the example below. Multraits Rectangular-Manhattan

sureman commented 5 years ago

I sourced the latest code and it seems that the legend is repositioned in a good location for me thanks. Is there a way to add a title, change the phenotype colors, and remove the density? Thanks again for the great tool. Multraits Rectangular-Manhattan

YinLiLin commented 5 years ago

hi Thanks for using CMplot, also your feedbacks. I have discarded the function of modifying the title in the new version of CMplot following some users' suggestions, I am sorry about that. For change the colours, you can add a parameter 'col=c(your prefer color vector)' in CMplot. For remove the density, you should set 'chr.den.col=NULL' in CMplot Best, Lilin

YantingHuang commented 5 years ago

Hi Lilin,

Thank you so much for providing such a great plotting tool. I have similar question as mentioned above.

1) I do not know how to move the legend. I used install.packages("CMplot") and it seems that it does not affect the recent change mentioned above.

2) I do not know how to change the font size of the axis.

Multraits Rectangular-Manhattan log_rank_score_amyloid log_rank_score_braak log_rank_score_cerad log_rank_score_ceradaf log_rank_score_cogdec log_rank_score_gpath log_rank_score_tangles

YinLiLin commented 5 years ago

Hi yanting,

Thanks for using CMplot. I haven’t gotten a chance to update CMplot on CRAN. But the codes on github are the latest. So you need to source it instead of “library(CMplot)”. Please see the link on the README of CMplot. There are two parameters to control the size of labels: “cex.labs” and “cex.axis”. One is for the title of axis, another is for the number of axis.

Best,

Lilin

YantingHuang commented 5 years ago

Hi Lilin,

Thanks for the help! Really enjoy the package you provided for us.

GMBog commented 1 month ago

Hi Lilin,

How can we remove the legend in a multi-traits plot? legend.sex = 0 didn't work, and neither did legend.pos = "none.

CMplot(combined_data1, plot.type="m", multraits = TRUE, LOG10 = FALSE, legend.cex = 0.6, threshold = 4.40, threshold.col = c("grey"), amplify = T, signal.cex = 1.8, ylim = c(0,12), file="tiff", file.name = "colocGWAS", dpi = 300, file.output=TRUE, width = 16, height = 6, axis.cex = 0.9, verbose=TRUE)

Thanks!

YinLiLin commented 1 month ago

Hi @GMBog,

Thank you for the question, sorry that the legend is added compulsively, it can not be removed by arguments.