[R] circlize package: different font size for axis labels

Fix Ace acefix at rocketmail.com
Tue Dec 16 17:16:23 CET 2014


Hi, Dr. Gu,
Thank you very much for the answer. This trick works. 
Another question, is there a way to change the color or the axis?
Thanks!
 

     On Monday, December 15, 2014 1:39 PM, "Gu, Zuguang" <z.gu at dkfz-heidelberg.de> wrote:
   

 Hi,

In current version, `labels.font` in `circos.axis` can only be a scalar ( a vector with length one).
But you can first add axes with no labels and then add labels by `circos.text`:

female.f = c("a", "b")
circos.initialize(factors=female.f, xlim=c(1.8,6.2))
circos.trackPlotRegion(factors=female.f, ylim=c(-1.3,1.8),track.height=0.5, panel.fun=function(x,y) {
        circos.axis(h = "top", major.at=c(2:6),minor.ticks=0,labels= rep("", 5),labels.cex=0.8,major.tick.percentage=0.02,
                direction="inside")
        circos.text(2:6, rep(1.5, 5), c("L3","72hL3","72hL4","8dF","16dF"), font = c(1, 2, 1, 1, 1), facing = "inside", niceFacing = TRUE)
})

best,
Zuguang
________________________________________

Sent: 15 December 2014 17:41
To: r-help at r-project.org; Gu, Zuguang
Subject: circlize package: different font size for axis labels

Hi, Dr. Gu,

I am trying to highlight some axis labels, for example, "72hL3" as bold, using the following command:


circos.initialize(factors=female.f, xlim=c(1.8,6.2))
circos.trackPlotRegion(factors=female.f,
ylim=c(-1.3,1.8),track.height=0.5,panel.fun=function(x,y){circos.axis(major.at=c(2:6),minor.ticks=0,labels=c("L3","72hL3","72hL4","8dF","16dF"),labels.cex=0.8,major.tick.percentage=0.02,h="bottom",
direction="inside", labels.font=c(1,2,1,1,1,1))})

Is there a way to do this using circlize package?

Thanks!

   
	[[alternative HTML version deleted]]



More information about the R-help mailing list