Skip to content
Snippets Groups Projects
Commit 196d5100 authored by casagran's avatar casagran
Browse files

create aux/ with some tutos

parent 13f0e514
No related branches found
No related tags found
1 merge request!6Draft: Resolve "py-bkg-rm"
* matplotlib interactive output capture
```python
out = widgets.Output()
with out:
fig = plt.figure()
```
* `ipywidgets.AppLayout`
```python
widgets.AppLayout(
center=out,
footer=widgets.Button(icon='check'),
pane_heights=[0, 6, 1]
)
```
* image stack with slider (pre-computed + update)
```python
plt.ioff()
fig = plt.figure()
plt.ion()
im = plt.imshow(example_image_stack[0])
def update(change):
im.set_data(example_image_stack[change['new']])
fig.canvas.draw_idle()
slider = widgets.IntSlider(value=0, min=0, max=len(parameter)-1)
slider.observe(update, names='value')
widgets.VBox([slider, fig.canvas])
```
* debug `update(change)` function
```python
out = widgets.Output()
@out.capture()
def update(change):
with out:
if change['name'] == 'value':
im.set_data(example_image_stack[change['new']])
fig.canvas.draw_idle
```
or `Log Console (View > Show Log Console)`
* output view
on a cell `*click right*` > `Create New View for Output`
* sidecar
https://github.com/jupyter-widgets/jupyterlab-sidecar
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment