Problems scaling when using different start.degree & gap.after for tracks. #285
Unanswered
stephenwhitmarsh
asked this question in
Q&A
Replies: 1 comment
-
I think you don't need to directly manipulate circos.initialize(sectors = "foo", xlim = c(0, 1))
circos.track(ylim = c(0, 1), panel.fun = function(x, y) {
circos.rect(0, 0, 0.6, 1) # pretend this is a track
x = seq(0, 0.6, length = 100)
y = runif(100)
circos.lines(x, y, type = "s", area = TRUE)
}, bg.border = NA, track.height = 0.1)
circos.track(ylim = c(0, 1), panel.fun = function(x, y) {
circos.rect(0, 0, 0.8, 1)
}, bg.border = NA, track.height = 0.1)
circos.track(ylim = c(0, 1), panel.fun = function(x, y) {
circos.rect(0, 0, 0.4, 1)
}, bg.border = NA, track.height = 0.1) |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Dear Zuguang Gu (or users)
First of all my compliments! I love the Circlize package and am planning to use it for my publications.
I am afraid, however, that I might be using it a bit beyond as intended, or in any case I've been struggling a lot with plotting segments that have different offsets (
start.degree
&gap.after
) for individual tracks. Following the example in the book, I've been trying to use the workaround withpar(new = TRUE)
. However, since this necessitates the use ofcanvas.xlim
andcanvas.ylim
, I am not having the benefit of automatically scaled tracks (distance between them, while maintaining the same height), as you can see in the attached picture. I've come close, but not close enough with the following code (see first two line):I'd like to scale up the number of tracks, so not being able to tightly organize the tracks becomes increasingly problematic, especially when also trying out differnt heights of the tracks (all the same though). Would you know how to deal with this either algorithmically (such as my first two lines), or perhaps I could try another, more intended method. Ideally, I would just be able to add tracks as normal, and then shift them (
start.degree
&gap.after
) when/after I add them.Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions