grantmcdermott
``` r library(tinyplot) dat = data.frame(x = -1:1, y = 0:2) plt(y ~ x, data = dat) plt_add(type = "vline", lty = 2) ``` <!-- --> Adding `flip = TRUE`: ``` r plt(y ~ x, data = dat, flip = TRUE) plt_add(type = "vline", lty = 2) ``` <!-- --> The second plot should look like: <!-- --> The issue become more egregious if we start thinking about `tinyplot.*` methods that build up layers. Say, a coefficient plot that could be flipped. This is where I first noticed the issue: ``` r library(tinyplot) coefplot = function(mod, ...) { coefs = data.frame(names(coef(mod)), coef(mod), confint(mod)) colnames(coefs) = c("term", "est", "lwr", "upr") plt( est ~ term, ymin = lwr, ymax = upr, data = coefs, type = "errorbar", theme = "classic", ... ) plt_add(type = "hline", lty = 4, col = "hotpink") } mod = lm(mpg ~ 0 + wt / factor(am), mtcars) coefplot(mod) ``` <!-- --> The zero line is missing in the flipped version: ``` r coefplot(mod, flip = TRUE) ``` <!-- -->