Skip to content

plot_background not inheriting from rect #1278

Closed
@concimuscb

Description

@concimuscb

As per the docs plot_background should inherit from rect.

However, the below code sample returns a plot with a white background, instead of an orange with dark blue border:

(
    sample
    + theme_none()
    + theme(
        rect=element_rect(fill="orange", color="dark_blue"),
        plot_background=element_rect(),
    )
)

The same happens with:

(
    sample
    + theme_none()
    + theme(
        rect=element_rect(fill="orange", color="dark_blue"),
        plot_background=None,
    )
)

Overwriting works as intended with the below sample returning a plot with a transparent background:

(
    sample
    + theme_none()
    + theme(
        rect=element_rect(fill="orange", color="dark_blue"),
        plot_background=element_blank(),
    )
)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions