zeileis · GitHub

When xaxs and yaxs are set (e.g., automatically in type_barplot and type_spineplot), then they don't get restored afterwards affecting subsequent output.

Example:

tinyplot(~ species, data = penguins, type = type_barplot())
tinyplot(1:10, pch = 19, cex = 2)

Image

tinyplot(species ~ island, data = penguins)
tinyplot(1:10, pch = 19, cex = 2)

Image

Note the clipping of the first and last point in the scatterplot due to the modified xaxs/yaxs settings.

The culprits are the par() settings in the following lines which do not restore the previous settings:

https://github.com/grantmcdermott/tinyplot/blob/main/R/facet.R#L61-L63

Read the original on github.com ↗