Skip to content

circlize package: different font size for axis labels

5 messages · David Winsemius, Gu, Zuguang, Fix Ace

#
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!
#
On Dec 15, 2014, at 8:41 AM, Fix Ace wrote:

            
That appears to be the sort of argument names that would suggest the underlying plot paradigm is base graphics. I would try this as the labels 'argument':

labels=epression("L3", "72hL3", bold(72hL4), "8dF", "16dF")
Please read what the Posting Guide says about HTML formatting.
David Winsemius
Alameda, CA, USA
#
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
#
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!
#
I was trying to ask if there is way to change the color of 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!