YinLiLin / CMplot

📊 Circular and Rectangular Manhattan Plot
499 stars 111 forks source link

Track-specific highlighting not possible anymore after update #89

Open erikstricker opened 1 year ago

erikstricker commented 1 year ago

This is a great package I use frequently. I noticed that highlighting the markers for each track differently in a multitrack display is not working any more.

This was a plot I made on 04/01/2021: image

And this was the result when I tried again last week: image

This was the code, I used in both cases: CMplot(CRGHERV.ID.plot.without.na, plot.type="m",multracks=TRUE,threshold=c(p_cutoff),threshold.lty=c(1), threshold.lwd=c(1,1), amplify=TRUE, ylim=c(0,25), threshold.col=c("black","grey"), col=c("grey30","grey60"), signal.col=c("coral","green","cornflowerblue","orange"), signal.cex=1, file="jpg",memo="",dpi=300,file.output=TRUE,verbose=TRUE) Best, Erik

YinLiLin commented 1 year ago

Thank you for the feedback. Please refer to this issue #82. The first plot you attached above is actually incorrect because the colors used for different traits is not consistent between the legend and the bottom points. Please use the following script and try again:

CMplot(CRGHERV.ID.plot.without.na, plot.type="m", multracks=TRUE, threshold=c(p_cutoff), threshold.lty=c(1),
threshold.lwd=c(1,1), amplify=FALSE, ylim=c(0,25), col=c("coral","green","cornflowerblue","orange"), 
file="jpg", dpi=300, file.output=TRUE, trait.legend.pos="middle", verbose=TRUE)

Best, Lilin