Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_background not inheriting from rect #1278

Open
concimuscb opened this issue Jan 8, 2025 · 0 comments
Open

plot_background not inheriting from rect #1278

concimuscb opened this issue Jan 8, 2025 · 0 comments

Comments

@concimuscb
Copy link

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(),
    )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant