fastman icon indicating copy to clipboard operation
fastman copied to clipboard

How to set col with just one color?

Open michaelofrancis opened this issue 3 years ago • 3 comments

Hi, I want to color all points above the threshold as one color. I thought I could set a hex code for col, i.e. col="#DC7633", but that doesn't work. Any help would be appreciated. Thanks!

michaelofrancis avatar Sep 26 '22 15:09 michaelofrancis

Hi, If it is a single string, then it tries to match to one of the internal palette names, so you need a little hack: repeat the same color string twice, e.g. specify col=c("#DC7633","#DC7633"). Please let me know if this doesn't work for you.

kaustubhad avatar Sep 26 '22 23:09 kaustubhad

That gave me this error:

Error in if (col == "greys") { : the condition has length > 1

michaelofrancis avatar Sep 27 '22 18:09 michaelofrancis

Hi @michaelofrancis ,

I have fixed the problem now and have updated the package. You can try using the following code.

fastman(m,annotatePval = 2,colAbovePval = TRUE,col = c("#DC7633","#DC7633"))

You can find the output of this code snippet below.

check Please let me know if this works for you.

soumyasubhraparia avatar Sep 29 '22 13:09 soumyasubhraparia