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

update angles and hjust of vertices in Circular Dendrogram #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PaulApivat
Copy link

What?

Update angles and hjust calculation for 339-circular-dendrogram-with-ggraph.Rmd

Why?

In the original version, the geom_node_text is hidden behind the node and not readable.

How?

I update the calculation for vertices$angle and vertices$hjust and added coord_flip() method to the graph.

Testing?

There are no unit tests. However, after I made the changes, I re-knitted the Rmarkdown document and the circular dendrogram now displays as intended.

Screenshot

Original circular dendrogram

old

New circular dendrogram

new

@holtzy
Copy link
Owner

holtzy commented Jun 16, 2021

Hi @PaulApivat,
I've knitted my rmd and it works fine for me, so it's weird it does not for you.
I've added a session.info() at the end of the document. Could you please have a look and tell me what's different for you?

@88vikram
Copy link

88vikram commented Jan 7, 2023

Hi @holtzy , I get the same problem as @PaulApivat as well, except that his pull request also did not solve the problem. The problem arises because of the location of the starting point of the dendrogram i.e. the location of subgroup 1. Your angle calculation assumes that the location is at the top. For some reason, I get it at 90 degrees. The entire circle is rotated and hence the angle of the label text gets screwed up.

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

Successfully merging this pull request may close these issues.

None yet

3 participants