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

Let SVG of ui.pyplot fill its container #3289

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Let SVG of ui.pyplot fill its container #3289

merged 1 commit into from
Jun 27, 2024

Conversation

falkoschindler
Copy link
Contributor

This PR resolves discussion #3277 by setting the width and height of an SVG element to 100% of its parent container, which is the ui.pyplot element itself. This way the following plot stays inside the ui.card, which wasn't the case before:

with ui.card().classes('w-[400px]'):
    with ui.pyplot() as plot:
        plot.fig.gca().plot()

@falkoschindler falkoschindler added the bug Something isn't working label Jun 27, 2024
@falkoschindler falkoschindler added this to the 1.4.28 milestone Jun 27, 2024
@rodja rodja merged commit 054986d into main Jun 27, 2024
7 checks passed
@rodja rodja deleted the pyplot-size branch June 27, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants