Skip to content

Standardising calls to gpar() #5866

@teunbrand

Description

@teunbrand

Throughout ggplot2's codebase, there are various calls to grid::gpar().
There are several operations that happen almost ubiquitously, like the following gpar(lwd = len0_null(linewidth * .pt)).
The suggestion here is to write a wrapper for grid::gpar() that automatically applies such adjustments and ensures the absence of 0-length vectors, which I believe would result in cleaner code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions