Skip to content

Feature Request: Break up FacetX$draw_panels() into smaller functions #5482

Closed
@teunbrand

Description

@teunbrand

The draw_panels() methods are quite beefy with various tasks. Extending facets with custom draw_panels() methods is a bit of a pain due to having to repeat/copy a lot of code. As I understand the code, there are three major steps that should be mostly independent of one another:

  • Initialise the panels as a gtable.
  • Attach axes to panels.
  • Attach strips to panels.

There are more granular steps within each task, but I think the above tasks are good chunks to isolate into separate methods to make facets more extensible. My proposal is to keep draw_panels() for backward compatibility, but add 3 methods for the tasks above that are called in draw_panels().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions