Add examples + explanations#244
Conversation
|
I also removed the |
|
First off, thanks for doing this! The following is a discussion I've been meaning to have for a while, I just haven't had time. So, I think that using Afaik, the ideal way is to capture the figure creation inside an Here's a modified version of the cell, with the method I describe above: o = widgets.Output()
with o:
fig = plt.figure()
ax = fig.gca()
ax.imshow(Z)
layout1 = widgets.AppLayout(
center=fig.canvas,
footer=widgets.Button(icon='check'),
pane_heights=[0, 6, 1]
)
display(layout1)
layout2 = widgets.AppLayout(
center=o,
footer=widgets.Button(icon='check'),
pane_heights=[0, 6, 1]
)
display(layout2)What do you all think? Notice that I included the |
Can you link those posts? I'm curious to read them. My sense is the A good way of looking at this may be that there is the matplotlib approach to solving this problem (
👍 I think this is not well known. I wonder if its worth having an example of a custom class that basically presents a matplotlib plot with some controls that defines |
|
I think it would be nice to include the explanation of why it is necessary to use the Output widget from #233 (comment) |
|
@ianhi is this PR ready? |
|
@martinRenou not quite. I'd like to include more on the distinction between using an output widget and using Also: Post release of matplotlib 3.4 we should also update these to include the usage of |
- show setting image data + add explanation of `ioff` and `Output` - update github link - mention display(fig) for a static embed - remove stale example and add comment to main example
|
I added an explanation of using @martinRenou this is ready now |
|
Does it make sense to mention mpl-interactions in the section on how to connect plots to sliders? The entire reason I made that library was to make those sorts of examples easier. |
|
Actually as a broader point maybe it makes sense for this library to have a 3rd party packages section? Looking at https://github.com/matplotlib/ipympl/network/dependents?dependent_type=PACKAGE there are at least 20 packages that depend on/build on ipympl |
|
@martinRenou before I forget about this again: does this need any changes? I think we could consider and maybe implement a third party packages area in a separate issue/PR. |
|
No it's totally fine, sorry I missed the
Merging then :) thank you! |
ioffset_datadraw_idlewidgets.Outputto capture errors in callbacksI'm gonna link this to #208 and maybe @thomasaarholt is interested in this?