Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with circle.margin #393

Open
onmyojiyys opened this issue Jun 17, 2024 · 0 comments
Open

problem with circle.margin #393

onmyojiyys opened this issue Jun 17, 2024 · 0 comments

Comments

@onmyojiyys
Copy link

NK T cells Monocytes B cells Plasma cells NK_pseudo pDCs
1 100 0 0 0 0 0 0
2 0 100 0 0 0 0 0
3 100 0 0 0 0 0 0
4 0 0 100 0 0 0 0
5 0 100 0 0 0 0 0
6 0 0 0 100 0 0 0
7 0 0 0 100 0 0 0
8 0 0 100 0 0 0 0
9 0 100 0 0 0 0 0
10 0 0 0 0 100 0 0
11 0 0 0 0 0 100 0
12 100 0 0 0 0 0 0
13 0 0 100 0 0 0 0
14 0 0 0 0 100 0 0
15 0 0 0 0 0 0 100
16 0 47 0 0 0 0 0

This is my data. When I use the following code to plot and save the image as a PNG, the margins of the image are quite large, with a lot of white space. I wonder if there is any way to address this issue. The 'circle.margin' does not seem to have a very good effect.

png('Circle.png'), width = 4, height = 4, res = 300, units = 'in')
circos.par$circle.margin = c(0.1, 0.1, 0.001, 0.1)
circos.par(gap.after = c(rep(3, nrow(plot_data)-1), 10, rep(3, ncol(plot_data)-1), 10))
chordDiagram(tdata,
grid.col = use_color,
preAllocateTracks = 2,
annotationTrack = c("grid"))
circos.track(
track.index = 2, panel.fun = function(x, y) {
circos.text(
CELL_META$xcenter, CELL_META$ylim[1],
CELL_META$sector.index, facing = "clockwise",
niceFacing = TRUE, adj = c(0, 0.5),
cex = 0.6)
}, bg.border = NA
)
circos.clear()
dev.off()

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant