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

Overlapping labels and huge gap between them #145

Open
scienception opened this issue Aug 30, 2023 · 0 comments
Open

Overlapping labels and huge gap between them #145

scienception opened this issue Aug 30, 2023 · 0 comments
Assignees

Comments

@scienception
Copy link

I added label.dist=0.0000001 with the hope it would bring labels together but didn't happen. Is this a bug?
Not only are they too spaced out, but they overlap with other regions. Is there a way to raise the bar upper just for one group? So that they don't overlap with the other?

png(paste0("CNVs.png"), width = 400, height = 400, units='mm', res = 300)
plot.params <- getDefaultPlotParams(plot.type=1)
plot.params$data1height <- 100000
kp <- plotKaryotype(chromosomes=c("autosomal"), plot.type = 1)
kpPoints(kp, chr = num, x=in_df$chr_position, y=0.15, col="red", cex=0.2)
chr_names <- noquote(paste0(rep("chr", length(cnv_signals_df$chr)), cnv_signals_df$chr))
CNVR <- toGRanges(data.frame(chr=chr_names, start=cnv_signals_df$start, end=cnv_signals_df$end))
kpPlotRegions(kp, CNVR,col="#FFAACC")
middle_points <- round(cnv_signals_df$start+(cnv_signals_df$end-cnv_signals_df$start)/2)
kpPlotMarkers(kp, chr=chr_names, x=middle_points, labels=cnv_signals_df$pheno, r1 = 0.3, cex=0.4, text.orientation = "vertical", label.color="black",ignore.chromosome.ends=TRUE,max.iter=1000,abel.dist=0.0000001)   
dev.off()

CNVs

@bernatgel bernatgel self-assigned this Jan 9, 2024
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

2 participants