Closed
Description
I'm using ggplot to plot borders of certain regions using geom_path
and have a problem of certain regions sharing a border, resulting in an overlap of lines:
I imagine, that the problem could be fixed by introducing a directional line-width. That is, one that will extend the segments, for example, only to the right-hand side of the line, instead of extending to both, as implemented currently. In that case I can specify the border points in a clock-wise order and make sure that the line will be always on the inside of the region.
I would appreciate thoughts on feasibility of this feature or any potential workarounds.
The code to reproduce the figure:
library(ggplot2)
library(data.table)
load(gzfile("border_example.rda.gz"))
ggplot(data, aes(x=UMAP_1, y=UMAP_2)) +
geom_point(color="grey") +
geom_path(data=maskTable, aes(group=group, color=cluster), linewidth=1) +
coord_fixed() +
theme_classic()
Metadata
Metadata
Assignees
Labels
No labels