YinLiLin / CMplot

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

width and height - unit? #48

Closed complexgenome closed 3 years ago

complexgenome commented 3 years ago

May I please know the default unit of width and height in the CMplot function?

CMplot(df_plots_filtered,type="p",plot.type="m",LOG10=TRUE,threshold=5E-08,file="jpg",memo="",dpi=300,
    file.output=TRUE,verbose=TRUE,width=17,height=12,chr.labels.angle=45, cex.axis=2)

I would like to make width as 170mm

YinLiLin commented 3 years ago

the default width and height are 14 and 6 respectively, please refer to https://github.com/YinLiLin/CMplot/blob/d253dbf6b39e1083b9130356f4086f796220c71e/R/CMplot.r#L1412

complexgenome commented 3 years ago

Thank you. What is the unit: pixels, cm, mm?

hatre0 commented 2 years ago

Is there any way to specify dimensions (cm) and dpi?

I can see in the code that dimensions are automatically calculated in (I assume) pixels based on dpi if(file=="jpg") jpeg(paste("Rectangular-Manhattan.",taxa[i],".jpg",sep=""), width = whdpi,height=htdpi,res=dpi,quality = 100

Does this imply the base unit for the width and height cmplot parameters is inches (R default)?

YinLiLin commented 2 years ago

yes, it's the same with the R default, in the main function of CMplot, the relevant parameters "height" and "width" can be used to resize the dimension, and the parameter "dpi" controls the resolution.