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]]
David Winsemius
2014-Dec-15 19:08 UTC
[R] circlize package: different font size for axis labels
On Dec 15, 2014, at 8:41 AM, Fix Ace wrote:> 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))})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")> Is there a way to do this using circlize package? > Thanks! > > [[alternative HTML version deleted]]Please read what the Posting Guide says about HTML formatting.> > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius Alameda, CA, USA
Gu, Zuguang
2014-Dec-15 19:38 UTC
[R] circlize package: different font size for axis labels
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 ________________________________________ From: Fix Ace [acefix at rocketmail.com] 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!
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]]
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! [[alternative HTML version deleted]]