aphalo / ggpmisc

R package ggpmisc is an extension to ggplot2 and the Grammar of Graphics
https://docs.r4photobiology.info/ggpmisc
94 stars 6 forks source link

Refactoring of label formatting code #57

Closed aphalo closed 3 months ago

aphalo commented 4 months ago

Very similar code used to format polynomial equations, R2, p-values, etc., is repeated in different statistics. The output is currently consistent but this type of repetition is against good programing practice.

aphalo commented 3 months ago

Shared code extracted to separate utility functions. Statisitics not yet edited to use them.

aphalo commented 3 months ago

stat_poly_eq(), stat_ma_eq(), stat_quant_eq(), stat_multcomp(), and stat_correlation() edited and tested. These edits introduce some cosmetic changes in plots, and in the case of stat_quant_eq() they can be code breaking because of a change to the content of grp.label which now works as in all other stats in the package and the label for quantiles returned as qtl.label.