jokergoo / circlize

Circular visualization in R
http://jokergoo.github.io/circlize_book/book/
Other
959 stars 141 forks source link

Problems with colors in circlize #374

Open hellebaa opened 1 year ago

hellebaa commented 1 year ago

I have managed to make a plot, but when I try to make the colors conditional I get the following error. Any advice?

Error: The length of col (309) should be equal to 1 or the number of your data column (2).

code: circos.par(gap.degree = c(rep(1,22),20)) circos.genomicInitialize(cod_chromInfo) circos.genomicTrackPlotRegion(densDUP, ylim = c(1, max(densDUP$DUP_count)), panel.fun = function(region, value, ...) { circos.genomicPoints(region, value, col = ifelse(value[[1]] < 22, "#FFD92F", "#377EB8"), cex = 0.5, pch = 16) }) circos.yaxis(side = "right", at = seq(0, 750, by = 100))