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

Labels are cut off on the right for some settings when saving a dendrogram #56

Open
christofs opened this issue Jul 3, 2023 · 1 comment

Comments

@christofs
Copy link

Hi everyone, I just noted a strange phenomenon and hope you have an idea what causes this:

If I create a dendrogram using stylo() – in version 0.7.4 – and keep everything the same except the MFW setting, this happens:

  • At 100 MFW, the text labels are cut off on the right.
  • At 1000 MFW, the text labels are not cut off.

This behavior does not make any sense, at least not to me.

Any hint is highly appreciated!
FRLyrik20_CA_100_MFWs_Culled_0__wurzburg__001
FRLyrik20_CA_1000_MFWs_Culled_0__wurzburg__001

@jmclawson
Copy link
Contributor

It looks like there's a much bigger range of distances for the first analysis than the second—and many more values that are very close to zero. This makes it tougher to handle long labels.

Dendrogram margins are hardcoded in stylo.R lines 1163-1169 as allowing the equivalent of 8 + 0.1 lines of text on the right hand side. Since these are defined internally and re-adopted each time a dendrogram is printed, it isn't possible for a user to adjust them for a single figure. One solution could be for stylo() to add an optional "nudge" argument, which should be easy to add, if it's desired.

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

No branches or pull requests

2 participants