Currently there are several places in the tinyplot::tinyplot function where there are different logic branches for different build-in types.
Examples:
https://github.com/grantmcdermott/tinyplot/blob/main/R/tinyplot.R#L1369-L1372
https://github.com/grantmcdermott/tinyplot/blob/main/R/tinyplot.R#L1176
There a couple usability issues with this:
- It's not clear from the documentation exactly behavior is controlled by this
name variable. In the vignette, it says "fallback behaviour same as "p" type (e.g., legend defaults)" and "think of it as a convenient way to inherit default/fallback behaviour from an existing plot type". But exactly what behavior is controlled by this param, and thus the consequences of choosing one built-in plot type over another is unclear. (For example, what are the consequences of choosing "l" vs "segments" if building a plot type where either could potentially fit?)
- IMO It would be even nicer if the options that are currently controlled by these hard-coded type names in
tinyplot::tinyplot could instead be controlled by the output of the type_x() function somehow. Maybe in the settings object? In the above examples, it looks like those options are whether empty plots are disallowed and the default x and y labels.