Skip to content

xaxs/yaxs not restored when set #545

@zeileis

Description

@zeileis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions