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

Question: how to use ipympl to simply include axes in ipywidets layout? #552

Closed
shaunc opened this issue Apr 13, 2024 · 1 comment
Closed

Comments

@shaunc
Copy link

shaunc commented Apr 13, 2024

I am trying to include a recangular grid created with pcolormesh in a ipywigets grid.

(1) It seems ipympl includes all kinds of extra stuff I don't want: window caption, extra space around axes, controls for panning & zooming, etc? How can I turn all of this stuff off?

(2) Plots seem to be displaying more than once, even though I call plt.ioff()?

image

@shaunc
Copy link
Author

shaunc commented Apr 14, 2024

I can accomplish what I need to do without ipympl, using:

    png_buffer = io.BytesIO()
    fig.savefig(png_buffer, format="png")
    plt.close(fig)
    img = widgets.Image(value=png_buffer.getvalue(), format="png")
    box = widgets.HBox([img])

I guess this is out of scope of ipympl, though would be nice to have in the documentation.

@shaunc shaunc closed this as completed Apr 14, 2024
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