Skip to content

Clean up axis expansion #1207

@hadley

Description

@hadley
  • Currently it's difficult to follow the code that computes axis expansion. The code (and default values) are spread out over both coordinate systems and scales.
  • We need to distinguish between setting the limits of a coordinate system exactly and approximately (e.g. expanded and not expanded). It's not exactly clear what the correct behaviour. It looks like the old wise parameter used to control expansion, but was removed, with the claim that expansion was now the default behaviour.
  • Given that the behaviour has clearly changed over the last few years, and I don't remember any complaints about it, it's probably not a heavily used feature so we can change it to do the "right" thing.
  • I would prefer to keep the expand parameter in one place (the scale), but I think there is some interaction with the coord, because the default expansion varies based on the coordinate system. Maybe the coordinate system could have a boolean expand flag, with the details controlled in the scale.

cc @wch, @lionel-

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions