uclahs-cds / package-CancerEvolutionVisualization

Publication Quality Phylogenetic Tree Plots
https://cran.r-project.org/web/packages/CancerEvolutionVisualization/
GNU General Public License v2.0
2 stars 0 forks source link

Edge intersection style in nodeless mode #118

Open dan-knight opened 4 months ago

dan-knight commented 4 months ago

Without nodes, the intersection between edge line segments becomes visible. How should we handle this detail? Are there scientific considerations? For example, correctly "implying" the ancestor at the intersection point?

Screenshot 2024-02-13 at 12 24 03 PM
dan-knight commented 4 months ago

Other considerations:

Varying line segment thickness

Screenshot 2024-02-13 at 12 43 56 PM

Varying line type

Screenshot 2024-02-13 at 12 45 35 PM

Multiple line segments

Screenshot 2024-02-13 at 1 58 09 PM
dan-knight commented 4 months ago

Possible Solutions

Parent on Top Layer Grobs are stacked in the order that they are created, so the later line segments are rendered on top of the earlier ones. By reversing this, the parent will be rendered on top of its children. This results in an (almost) node at the tip of the parent line segment.

Screenshot 2024-02-13 at 1 07 39 PM
whelena commented 4 months ago

I might be missing the point of this issue, but what specifically are we considering here? Are you implying that there is a difference in how we would interpret the plot depending if the parent edge vs. children edge is on the front layer?

dan-knight commented 4 months ago

I don't think that the visual style was considered very much in the original design, since the node circles would hide this part of the plot. Now, nodeless mode will be more relevant when combined with dendrogram mode. Are there any major issues you can see here? General ugliness? It may just be the nature of these plots - something we leave for users to resolve given the amount of control the package allows.

pboutros commented 4 months ago

I think... at least for now, not a high priority issue. I view this as a graphical nicety rather than an error, and I think worth keeping this as an open feature request "find ways to improve visualization of segment boundaries in nodeless mode" kinda thing, but not worth stressing about right now as this is exposing features to users and allowing them to decide on optimal application.

dan-knight commented 4 months ago

I view this as a graphical nicety rather than an error

Sounds good. I don't think there's anything obvious that we should enforce as a default here. Certainly nothing we should enforce as a constraint. Thanks for the input everyone!