-
Notifications
You must be signed in to change notification settings - Fork 4
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
Long labels #5
Comments
Getting the width of strings right is complicated: it depends on the font, the specific letters, etc. I looked into it awhile back and came away shaking my head. How about just giving the user an option (say, |
Sure, that would work too! |
Happy to consider pull requests with documentation changes, as well as additional plotting options. It might also be good to add additional data sets. The primates data you sent earlier is sitting on the repo now, but not included in the package. Not sure if it is a good one. |
One thing to keep in mind in this is that ouch is deficient in unit tests. With each proposed change, it would be good to include tests (in the |
Using the plotting branch, I can do the following. Is this an improvement? I'm not sure: seems a lot of clunkiness just to adjust label widths.
|
Hi Aaron,
This was actually the issue that really got me to hack the code. Real data exploration often involves long labels and if it is cut off, it can be a big problem to check if your regimes are correctly specified. This canʻt be fixed by making the text smaller sometimes because the region is set as a hard limit based on the node times
In the phylogeny weʻre working on now, there are a lot of unnamed species (and long names). Sometimes we have to paste the names and sites together. We can write short codes, of course, for the species but the human brain can only process so much and with 250 taxa its really a problem.
ouch/R/plot.R
Line 79 in 3dec2ce
My suggestion is to use the strwidth function to automatically size the plot region for the labels. This requires a cex= argument as cex is then passed to both the plot() and the text() functions. The other annoyance is that the x-axis labels then extends across the names too. I couldnʻt figure out how to limit that.
I generated these plots with the edits suggested and arguments
namescut.pdf
namesok.pdf
The text was updated successfully, but these errors were encountered: