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

Default plot width #19

Closed dan-knight closed 2 years ago

dan-knight commented 2 years ago

These changes clarify the input format for the plot's width. Previously, min.width could be passed into SRCGrob, but the way that the actual value related to the plot size was unclear. Now, min.width is set to a reasonable value internally.

The parameter was replaced with horizontal.padding, which adds a scaled padding to the default plot width. For example, the parameter uses a value of 0.1 as a default, which would add 10% of the total plot width to each side. This allows the user to scale the width up or down depending on how well the default size fits a particular plot.

This is a less sophisticated solution than I would like. Ideally, set.up.plot.size would calculate min.width depending on the size of the plot itself. This would have two benefits: less manual fine-tuning for the user, and horizontal.padding would function closer to the true definition of padding.