ITADN

Default color for single-group displays: Black vs palette?

#598Openzeileis 创建于 2026-05-30
Z
zeileiscommented
As discussed in https://github.com/grantmcdermott/tinyplot/pull/595#issuecomment-4581217133 and also highlighted at the end of https://github.com/grantmcdermott/tinyplot/pull/347#issuecomment-4328439763, we currently do not handle the default color for single-group displays consistently across plot types. Some types use black as the default while others use the first palette color.  ``` tinytheme("clean2") tinyplot(gear ~ 1, data = mtcars) tinyplot(factor(gear) ~ 1, data = mtcars) tinyplot(mpg ~ gear, data = mtcars) tinyplot(mpg ~ factor(gear), data = mtcars) ``` <img width="800" height="800" alt="Image" src="https://github.com/user-attachments/assets/44870ba2-3fce-4ead-b3b4-f738832e87b7" /> To resolve this issue we should probably think about the following two questions: 1. Is it sensible to generally use black as the default color for single-group displays? 2. If yes, should the black default be used even if the theme specified a different color in its palette?
2 条评论