jokergoo / circlize

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

error: could not find function "cm_y" #370

Open ShuqingL opened 1 year ago

ShuqingL commented 1 year ago

I just learn the example on https://jokergoo.github.io/circlize_book/book/introduction.html#principle-of-design, chapter 1.2.

my code: library(circlize); set.seed(999); n = 1000; df = data.frame(sectors = sample(letters[1:8], n, replace = TRUE), x = rnorm(n), y = runif(n)); pdf("test.001.pdf"); circos.par("track.height" = 0.1); circos.initialize(df$sectors, x = df$x); circos.track(df$sectors, y = df$y, panel.fun = function(x, y) { circos.text(CELL_META$xcenter, CELL_META$cell.ylim[2] + mm_y(5), CELL_META$sector.index) circos.axis(labels.cex = 0.6) }); col = rep(c("#FF0000", "#00FF00"), 4); circos.trackPoints(df$sectors, df$x, df$y, col = col, pch = 16, cex = 0.5); circos.text(-1, 0.5, "text", sector.index = "a", track.index = 1); circos.clear(); dev.off();

ShuqingL commented 1 year ago

mm_y()