xaxs/yaxs not restored when set
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)
```
<img width="1350" height="675" alt="Image" src="https://github.com/user-attachments/assets/ef1aaf2f-720d-4831-b1aa-e273e7ba5e3a" />
```
tinyplot(species ~ island, data = penguins)
tinyplot(1:10, pch = 19, cex = 2)
```
<img width="1350" height="675" alt="Image" src="https://github.com/user-attachments/assets/5cb9b835-dca5-47db-a560-01d2711e43ae" />
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
关闭于 2026-02-04 0 条评论