YinLiLin / CMplot

📊 Circular and Rectangular Manhattan Plot
520 stars 112 forks source link

title isn't being added || angle with CHR label not working || osx || R 3.6 #28

Closed complexgenome closed 4 years ago

complexgenome commented 4 years ago

hi dr yin,

Thank you very much for this amazing plot. it is fantastic. I'd like to improve on what I'm creating plot. I'm running into two issues at the moment while creating Circular plot. 1) Main title isn't being added 2) Angle with chr doesn't work

I'd like to improve on following things:

1) Increase only font size of Y-axis (P-values) 2) Decrease font of x-axis (chromosome label)

I believe both these either increase and/or increase together

I'm creating plot as:

 CMplot(df,type="p",plot.type="c",chr.labels=paste("Chr",c(1:22),sep=""),
 r=0.4, ##radius
 cir.legend=TRUE,
        outward=FALSE,
        cir.legend.col="black",
        cir.chr.h=1.3,
        chr.den.col="black",
        file="jpg",
        memo="",
        dpi=300,
        file.output=TRUE,
        verbose=TRUE,
        width=20,
        LOG10=TRUE,
        threshold=(0.05/400),
        amplify=FALSE, ## don't amplify significant SNP 
        signal.line=1.2, 
        box=TRUE,
        H=6,
         threshold.col="red", 
        height=15,
        cex.axis=1,
        threshold.lwd=1.8,
        chr.labels.angle=45,
        main="Model 1",
         main.cex=1.5, main.font=2 )

Session info are below:

R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin18.2.0 (64-bit)
Running under: macOS Mojave 10.14.1

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] CMplot_3.6.0  Cairo_1.5-11  ggplot2_3.3.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3       digest_0.6.25    withr_2.1.2      crayon_1.3.4    
 [5] dplyr_0.8.5      assertthat_0.2.1 MASS_7.3-51.5    grid_3.6.3      
 [9] R6_2.4.1         lifecycle_0.2.0  gtable_0.3.0     magrittr_1.5    
[13] scales_1.1.0     pillar_1.4.3     rlang_0.4.5      farver_2.0.3    
[17] labeling_0.3     tools_3.6.3      glue_1.3.1       purrr_0.3.3     
[21] munsell_0.5.0    compiler_3.6.3   pkgconfig_2.0.3  colorspace_1.4-1
[25] tcltk_3.6.3      tidyselect_1.0.0 tibble_2.1.3    

thanks

YinLiLin commented 4 years ago

Hi sariya,

Thank you for using CMplot. You are right. The parameters of controlling the 'Main' and 'angle' are only limited on Rectangular-Manhattan plot. And the size of labels for both x-axis and y-axis are controlled by the same parameter 'cex.axis'. Sorry about that.

Best, Lilin

complexgenome commented 4 years ago

thank you for your lightening fast reply :)