Skip to content

update angles and hjust of vertices in Circular Dendrogram#34

Open
PaulApivat wants to merge 1 commit intoholtzy:masterfrom
PaulApivat:update_circular_dendrogram
Open

update angles and hjust of vertices in Circular Dendrogram#34
PaulApivat wants to merge 1 commit intoholtzy:masterfrom
PaulApivat:update_circular_dendrogram

Conversation

@PaulApivat
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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.

3 participants