I am attempting to plot some data using ggraph
. The style is a circular
partition
plot. I have numerous plots/graphs. Each has a different density of dendritic branching. Nodes on the graph are labeled with geom_node_text(aes(label = labelText))
. I know I can use scaling or text size to adjust effective font point. However, I would like to hold font point constant and just censor labels (i.e., assign label value to be something like " "
) for dense regions of each graph, given some density threshold parameter. How could this be done? For instance, is there a way to extract the x, y
coordinates of text labels such that a density function can be computed over the plot area?
Asked
Active
Viewed 36 times
0

jbjo
- 111
- 2
-
Please share some code and reproducible data using `dput`? – Quinten Jun 04 '22 at 08:26
1 Answers
0
This falls under the heading of RTFM.
check_overlap
If TRUE, text that overlaps previous text in the same layer will not be plotted. check_overlap happens at draw time and in the order of the data. Therefore data should be arranged by the label column before calling geom_label() or geom_text().

jbjo
- 111
- 2
-
I think it might also fall into the “failure to search” category. https://cran.r-project.org/web/packages/ggrepel/vignettes/ggrepel.html – IRTFM Jun 05 '22 at 03:05