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

Is there a way to label edges? #92

Open
plijnzaad opened this issue Aug 17, 2023 · 1 comment
Open

Is there a way to label edges? #92

plijnzaad opened this issue Aug 17, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@plijnzaad
Copy link

Hi Luke and/or others,

is there an easy way to label the edges, specifically with the numbers or percentages distributing over the finer-clustered nodes under it? If not, I'd like to request that as a feature :-)

@lazappi lazappi added the enhancement New feature or request label Aug 18, 2023
@lazappi
Copy link
Owner

lazappi commented Aug 18, 2023

At the moment there is no option in {clustree} to label edges (I vaguely remember seeing that in a publication so there might be code out there somewhere). I don't really have the capacity to add features to {clustree} at the moment but if you are happy to work on this a PR would be very welcome.

I'm not sure this will work but you may be able to do it but adding things to the returned ggplot object using {ggraph}. Something like:

graph <- clustree(data, ...)
graph + ggraph::geom_edge_text(...)

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

No branches or pull requests

2 participants