In [1]:
# Auto-generated by leda
import leda


leda.set_interact_mode(leda.StaticIpywidgetsInteractMode())
In [2]:
# Auto-generated by leda
import os

from leda.vendor.static_ipywidgets.static_ipywidgets     import interact as static_interact


static_interact.IMAGE_MANAGER = static_interact.InlineImageManager()

leda demo: matplotlib¶

In [3]:
import abc
import dataclasses

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from typing_extensions import override

import leda
In [4]:
leda.init("matplotlib")
plt.rcParams.update({"figure.max_open_warning": 0})
In [5]:
%%HTML
<!-- Auto-generated by leda -->
<h2>Table of Contents</h2>
  <ol type='I'>
  <li type='I'><a href='#leda-demo:-matplotlib'>leda demo: matplotlib</a></li>
    <ol type='A'>
    <li type='A'><a href='#Info'>Info</a></li>
    <li type='A'><a href='#Data'>Data</a></li>
    <li type='A'><a href='#Visualization'>Visualization</a></li>
      <ol type='1'>
      <li type='1'><a href='#Simple'>Simple</a></li>
      <li type='1'><a href='#Objects-as-Params'>Objects as Params</a></li>
      </ol>
    </ol>
  </ol>

Table of Contents

  1. leda demo: matplotlib
    1. Info
    2. Data
    3. Visualization
      1. Simple
      2. Objects as Params

Info¶

Widgets

Use the %%interact expr0;expr1;... cell magic to set widgets for that cell.

Each expression is of the form x=y, where x becomes the local var of the cell and y can be a:

  • list to indicate choices for a dropdown widget
  • tuple to indicate values for an int slider (start, stop, and optional step).

E.g.:

%%interact column=list(df.columns)
%%interact column=list(df.columns);mult=[1, 2, 3]
%%interact column=list(df.columns);window=(10, 50)
%%interact column=list(df.columns);window=(10, 50, 5)

Table of Contents

Use the %toc line magic to substitute with a table of contents in static mode.

Toggles

Click the Toggle input cells button at the bottom to reveal input cells.

Data¶

Using randomly generated data (with fixed seed).

In [6]:
df = pd.DataFrame(
    np.random.RandomState(42).rand(100, 10), columns=list("abcdefghij")
)

Visualization¶

Simple¶

In [7]:
%%interact column=list(df.columns);mult=[1, 2, 3]
title = f"column={column!r}, mult={mult}"
(df[[column]] * mult).plot(figsize=(15, 8), lw=2, title=title)
Generating results:   0%|          | 0/30 [00:00<?, ?it/s]
Generating results:   3%|▎         | 1/30 [00:00<00:03,  9.38it/s]
Generating results:  10%|█         | 3/30 [00:00<00:01, 14.18it/s]
Generating results:  17%|█▋        | 5/30 [00:00<00:01, 15.78it/s]
Generating results:  23%|██▎       | 7/30 [00:00<00:01, 16.50it/s]
Generating results:  30%|███       | 9/30 [00:00<00:01, 17.08it/s]
Generating results:  37%|███▋      | 11/30 [00:00<00:01, 17.31it/s]
Generating results:  43%|████▎     | 13/30 [00:00<00:00, 17.47it/s]
Generating results:  50%|█████     | 15/30 [00:00<00:00, 17.38it/s]
Generating results:  57%|█████▋    | 17/30 [00:01<00:00, 17.39it/s]
Generating results:  63%|██████▎   | 19/30 [00:01<00:00, 14.02it/s]
Generating results:  70%|███████   | 21/30 [00:01<00:00, 14.95it/s]
Generating results:  77%|███████▋  | 23/30 [00:01<00:00, 15.76it/s]
Generating results:  83%|████████▎ | 25/30 [00:01<00:00, 16.27it/s]
Generating results:  90%|█████████ | 27/30 [00:01<00:00, 16.66it/s]
Generating results:  97%|█████████▋| 29/30 [00:01<00:00, 16.98it/s]
Generating results: 100%|██████████| 30/30 [00:01<00:00, 16.29it/s]

Generating HTML:   0%|          | 0/30 [00:00<?, ?it/s]
Generating HTML:   3%|▎         | 1/30 [00:00<00:16,  1.73it/s]
Generating HTML:   7%|▋         | 2/30 [00:01<00:15,  1.75it/s]
Generating HTML:  10%|█         | 3/30 [00:01<00:14,  1.80it/s]
Generating HTML:  13%|█▎        | 4/30 [00:02<00:14,  1.84it/s]
Generating HTML:  17%|█▋        | 5/30 [00:02<00:13,  1.81it/s]
Generating HTML:  20%|██        | 6/30 [00:03<00:13,  1.83it/s]
Generating HTML:  23%|██▎       | 7/30 [00:03<00:12,  1.86it/s]
Generating HTML:  27%|██▋       | 8/30 [00:04<00:12,  1.83it/s]
Generating HTML:  30%|███       | 9/30 [00:04<00:11,  1.79it/s]
Generating HTML:  33%|███▎      | 10/30 [00:05<00:10,  1.82it/s]
Generating HTML:  37%|███▋      | 11/30 [00:06<00:10,  1.81it/s]
Generating HTML:  40%|████      | 12/30 [00:06<00:09,  1.83it/s]
Generating HTML:  43%|████▎     | 13/30 [00:07<00:09,  1.85it/s]
Generating HTML:  47%|████▋     | 14/30 [00:07<00:08,  1.83it/s]
Generating HTML:  50%|█████     | 15/30 [00:08<00:08,  1.84it/s]
Generating HTML:  53%|█████▎    | 16/30 [00:08<00:07,  1.87it/s]
Generating HTML:  57%|█████▋    | 17/30 [00:09<00:07,  1.84it/s]
Generating HTML:  60%|██████    | 18/30 [00:09<00:06,  1.86it/s]
Generating HTML:  63%|██████▎   | 19/30 [00:10<00:05,  1.88it/s]
Generating HTML:  67%|██████▋   | 20/30 [00:10<00:05,  1.84it/s]
Generating HTML:  70%|███████   | 21/30 [00:11<00:04,  1.86it/s]
Generating HTML:  73%|███████▎  | 22/30 [00:11<00:04,  1.88it/s]
Generating HTML:  77%|███████▋  | 23/30 [00:12<00:03,  1.85it/s]
Generating HTML:  80%|████████  | 24/30 [00:13<00:03,  1.86it/s]
Generating HTML:  83%|████████▎ | 25/30 [00:13<00:02,  1.88it/s]
Generating HTML:  87%|████████▋ | 26/30 [00:14<00:02,  1.84it/s]
Generating HTML:  90%|█████████ | 27/30 [00:14<00:01,  1.85it/s]
Generating HTML:  93%|█████████▎| 28/30 [00:15<00:01,  1.88it/s]
Generating HTML:  97%|█████████▋| 29/30 [00:15<00:00,  1.84it/s]
Generating HTML: 100%|██████████| 30/30 [00:16<00:00,  1.85it/s]
Generating HTML: 100%|██████████| 30/30 [00:16<00:00,  1.84it/s]

Out[7]:
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
column:
mult:
In [8]:
%%interact column=list(df.columns);window=(10, 50, 5)
ax = (
    df[[column]]
    .iloc[-window:]
    .plot(figsize=(15, 8), lw=2, title=f"column={column!r}, window={window}")
)
ax
Generating results:   0%|          | 0/90 [00:00<?, ?it/s]
Generating results:   2%|▏         | 2/90 [00:00<00:05, 17.34it/s]
Generating results:   4%|▍         | 4/90 [00:00<00:05, 17.01it/s]
Generating results:   7%|▋         | 6/90 [00:00<00:04, 16.82it/s]
Generating results:   9%|▉         | 8/90 [00:00<00:04, 16.83it/s]
Generating results:  11%|█         | 10/90 [00:00<00:04, 17.28it/s]
Generating results:  13%|█▎        | 12/90 [00:00<00:06, 11.96it/s]
Generating results:  16%|█▌        | 14/90 [00:00<00:05, 13.08it/s]
Generating results:  18%|█▊        | 16/90 [00:01<00:05, 13.85it/s]
Generating results:  20%|██        | 18/90 [00:01<00:04, 14.95it/s]
Generating results:  22%|██▏       | 20/90 [00:01<00:04, 15.70it/s]
Generating results:  24%|██▍       | 22/90 [00:01<00:04, 16.16it/s]
Generating results:  27%|██▋       | 24/90 [00:01<00:04, 16.20it/s]
Generating results:  29%|██▉       | 26/90 [00:01<00:03, 16.35it/s]
Generating results:  31%|███       | 28/90 [00:01<00:03, 16.72it/s]
Generating results:  33%|███▎      | 30/90 [00:01<00:03, 16.78it/s]
Generating results:  36%|███▌      | 32/90 [00:02<00:03, 17.00it/s]
Generating results:  38%|███▊      | 34/90 [00:02<00:03, 16.66it/s]
Generating results:  40%|████      | 36/90 [00:02<00:03, 17.10it/s]
Generating results:  42%|████▏     | 38/90 [00:02<00:02, 17.37it/s]
Generating results:  44%|████▍     | 40/90 [00:02<00:02, 17.34it/s]
Generating results:  47%|████▋     | 42/90 [00:02<00:02, 17.06it/s]
Generating results:  49%|████▉     | 44/90 [00:02<00:02, 16.73it/s]
Generating results:  51%|█████     | 46/90 [00:02<00:02, 17.12it/s]
Generating results:  53%|█████▎    | 48/90 [00:03<00:03, 13.19it/s]
Generating results:  56%|█████▌    | 50/90 [00:03<00:02, 14.21it/s]
Generating results:  58%|█████▊    | 52/90 [00:03<00:02, 14.74it/s]
Generating results:  60%|██████    | 54/90 [00:03<00:02, 15.64it/s]
Generating results:  62%|██████▏   | 56/90 [00:03<00:02, 16.23it/s]
Generating results:  64%|██████▍   | 58/90 [00:03<00:01, 16.48it/s]
Generating results:  67%|██████▋   | 60/90 [00:03<00:01, 16.56it/s]
Generating results:  69%|██████▉   | 62/90 [00:03<00:01, 16.68it/s]
Generating results:  71%|███████   | 64/90 [00:04<00:01, 17.04it/s]
Generating results:  73%|███████▎  | 66/90 [00:04<00:01, 17.01it/s]
Generating results:  76%|███████▌  | 68/90 [00:04<00:01, 17.15it/s]
Generating results:  78%|███████▊  | 70/90 [00:04<00:01, 16.81it/s]
Generating results:  80%|████████  | 72/90 [00:04<00:01, 17.27it/s]
Generating results:  82%|████████▏ | 74/90 [00:04<00:00, 17.43it/s]
Generating results:  84%|████████▍ | 76/90 [00:04<00:00, 17.34it/s]
Generating results:  87%|████████▋ | 78/90 [00:04<00:00, 17.12it/s]
Generating results:  89%|████████▉ | 80/90 [00:04<00:00, 17.17it/s]
Generating results:  91%|█████████ | 82/90 [00:05<00:00, 17.55it/s]
Generating results:  93%|█████████▎| 84/90 [00:05<00:00, 17.25it/s]
Generating results:  96%|█████████▌| 86/90 [00:05<00:00, 17.31it/s]
Generating results:  98%|█████████▊| 88/90 [00:05<00:00, 16.94it/s]
Generating results: 100%|██████████| 90/90 [00:05<00:00, 12.54it/s]
Generating results: 100%|██████████| 90/90 [00:05<00:00, 15.89it/s]

Generating HTML:   0%|          | 0/90 [00:00<?, ?it/s]
Generating HTML:   1%|          | 1/90 [00:00<00:48,  1.82it/s]
Generating HTML:   2%|▏         | 2/90 [00:01<00:49,  1.79it/s]
Generating HTML:   3%|▎         | 3/90 [00:01<00:47,  1.83it/s]
Generating HTML:   4%|▍         | 4/90 [00:02<00:45,  1.88it/s]
Generating HTML:   6%|▌         | 5/90 [00:02<00:44,  1.90it/s]
Generating HTML:   7%|▋         | 6/90 [00:03<00:44,  1.89it/s]
Generating HTML:   8%|▊         | 7/90 [00:03<00:44,  1.88it/s]
Generating HTML:   9%|▉         | 8/90 [00:04<00:42,  1.91it/s]
Generating HTML:  10%|█         | 9/90 [00:04<00:42,  1.92it/s]
Generating HTML:  11%|█         | 10/90 [00:05<00:40,  1.96it/s]
Generating HTML:  12%|█▏        | 11/90 [00:05<00:40,  1.97it/s]
Generating HTML:  13%|█▎        | 12/90 [00:06<00:39,  1.96it/s]
Generating HTML:  14%|█▍        | 13/90 [00:06<00:39,  1.97it/s]
Generating HTML:  16%|█▌        | 14/90 [00:07<00:38,  1.98it/s]
Generating HTML:  17%|█▋        | 15/90 [00:07<00:38,  1.95it/s]
Generating HTML:  18%|█▊        | 16/90 [00:08<00:38,  1.92it/s]
Generating HTML:  19%|█▉        | 17/90 [00:08<00:37,  1.93it/s]
Generating HTML:  20%|██        | 18/90 [00:09<00:37,  1.94it/s]
Generating HTML:  21%|██        | 19/90 [00:09<00:36,  1.97it/s]
Generating HTML:  22%|██▏       | 20/90 [00:10<00:35,  1.96it/s]
Generating HTML:  23%|██▎       | 21/90 [00:10<00:35,  1.93it/s]
Generating HTML:  24%|██▍       | 22/90 [00:11<00:35,  1.94it/s]
Generating HTML:  26%|██▌       | 23/90 [00:11<00:34,  1.93it/s]
Generating HTML:  27%|██▋       | 24/90 [00:12<00:34,  1.92it/s]
Generating HTML:  28%|██▊       | 25/90 [00:12<00:34,  1.91it/s]
Generating HTML:  29%|██▉       | 26/90 [00:13<00:33,  1.93it/s]
Generating HTML:  30%|███       | 27/90 [00:14<00:32,  1.94it/s]
Generating HTML:  31%|███       | 28/90 [00:14<00:31,  1.99it/s]
Generating HTML:  32%|███▏      | 29/90 [00:14<00:30,  2.00it/s]
Generating HTML:  33%|███▎      | 30/90 [00:15<00:30,  1.98it/s]
Generating HTML:  34%|███▍      | 31/90 [00:15<00:29,  1.99it/s]
Generating HTML:  36%|███▌      | 32/90 [00:16<00:29,  1.98it/s]
Generating HTML:  37%|███▋      | 33/90 [00:17<00:28,  1.97it/s]
Generating HTML:  38%|███▊      | 34/90 [00:17<00:28,  1.95it/s]
Generating HTML:  39%|███▉      | 35/90 [00:18<00:27,  1.96it/s]
Generating HTML:  40%|████      | 36/90 [00:18<00:27,  1.96it/s]
Generating HTML:  41%|████      | 37/90 [00:19<00:27,  1.94it/s]
Generating HTML:  42%|████▏     | 38/90 [00:19<00:27,  1.88it/s]
Generating HTML:  43%|████▎     | 39/90 [00:20<00:26,  1.90it/s]
Generating HTML:  44%|████▍     | 40/90 [00:20<00:25,  1.93it/s]
Generating HTML:  46%|████▌     | 41/90 [00:21<00:25,  1.95it/s]
Generating HTML:  47%|████▋     | 42/90 [00:21<00:24,  1.95it/s]
Generating HTML:  48%|████▊     | 43/90 [00:22<00:24,  1.95it/s]
Generating HTML:  49%|████▉     | 44/90 [00:22<00:23,  1.98it/s]
Generating HTML:  50%|█████     | 45/90 [00:23<00:22,  1.98it/s]
Generating HTML:  51%|█████     | 46/90 [00:23<00:22,  2.00it/s]
Generating HTML:  52%|█████▏    | 47/90 [00:24<00:21,  1.99it/s]
Generating HTML:  53%|█████▎    | 48/90 [00:24<00:21,  1.97it/s]
Generating HTML:  54%|█████▍    | 49/90 [00:25<00:21,  1.95it/s]
Generating HTML:  56%|█████▌    | 50/90 [00:25<00:20,  1.94it/s]
Generating HTML:  57%|█████▋    | 51/90 [00:26<00:20,  1.92it/s]
Generating HTML:  58%|█████▊    | 52/90 [00:26<00:19,  1.90it/s]
Generating HTML:  59%|█████▉    | 53/90 [00:27<00:19,  1.93it/s]
Generating HTML:  60%|██████    | 54/90 [00:27<00:18,  1.94it/s]
Generating HTML:  61%|██████    | 55/90 [00:28<00:17,  1.96it/s]
Generating HTML:  62%|██████▏   | 56/90 [00:28<00:17,  1.97it/s]
Generating HTML:  63%|██████▎   | 57/90 [00:29<00:16,  1.95it/s]
Generating HTML:  64%|██████▍   | 58/90 [00:29<00:16,  1.97it/s]
Generating HTML:  66%|██████▌   | 59/90 [00:30<00:15,  1.98it/s]
Generating HTML:  67%|██████▋   | 60/90 [00:30<00:15,  1.97it/s]
Generating HTML:  68%|██████▊   | 61/90 [00:31<00:14,  1.96it/s]
Generating HTML:  69%|██████▉   | 62/90 [00:31<00:14,  1.98it/s]
Generating HTML:  70%|███████   | 63/90 [00:32<00:13,  1.99it/s]
Generating HTML:  71%|███████   | 64/90 [00:32<00:12,  2.00it/s]
Generating HTML:  72%|███████▏  | 65/90 [00:33<00:12,  1.99it/s]
Generating HTML:  73%|███████▎  | 66/90 [00:33<00:12,  1.90it/s]
Generating HTML:  74%|███████▍  | 67/90 [00:34<00:12,  1.85it/s]
Generating HTML:  76%|███████▌  | 68/90 [00:35<00:12,  1.83it/s]
Generating HTML:  77%|███████▋  | 69/90 [00:35<00:11,  1.85it/s]
Generating HTML:  78%|███████▊  | 70/90 [00:36<00:10,  1.85it/s]
Generating HTML:  79%|███████▉  | 71/90 [00:36<00:10,  1.89it/s]
Generating HTML:  80%|████████  | 72/90 [00:37<00:09,  1.86it/s]
Generating HTML:  81%|████████  | 73/90 [00:37<00:08,  1.91it/s]
Generating HTML:  82%|████████▏ | 74/90 [00:38<00:08,  1.92it/s]
Generating HTML:  83%|████████▎ | 75/90 [00:38<00:07,  1.92it/s]
Generating HTML:  84%|████████▍ | 76/90 [00:39<00:07,  1.94it/s]
Generating HTML:  86%|████████▌ | 77/90 [00:39<00:06,  1.91it/s]
Generating HTML:  87%|████████▋ | 78/90 [00:40<00:06,  1.89it/s]
Generating HTML:  88%|████████▊ | 79/90 [00:40<00:05,  1.87it/s]
Generating HTML:  89%|████████▉ | 80/90 [00:41<00:05,  1.90it/s]
Generating HTML:  90%|█████████ | 81/90 [00:41<00:04,  1.91it/s]
Generating HTML:  91%|█████████ | 82/90 [00:42<00:04,  1.91it/s]
Generating HTML:  92%|█████████▏| 83/90 [00:43<00:03,  1.83it/s]
Generating HTML:  93%|█████████▎| 84/90 [00:43<00:03,  1.88it/s]
Generating HTML:  94%|█████████▍| 85/90 [00:43<00:02,  1.92it/s]
Generating HTML:  96%|█████████▌| 86/90 [00:44<00:02,  1.95it/s]
Generating HTML:  97%|█████████▋| 87/90 [00:44<00:01,  1.97it/s]
Generating HTML:  98%|█████████▊| 88/90 [00:45<00:01,  1.97it/s]
Generating HTML:  99%|█████████▉| 89/90 [00:46<00:00,  1.96it/s]
Generating HTML: 100%|██████████| 90/90 [00:46<00:00,  1.97it/s]
Generating HTML: 100%|██████████| 90/90 [00:46<00:00,  1.93it/s]

Out[8]:
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
column:
window:

Objects as Params¶

In [9]:
@dataclasses.dataclass(frozen=True)
class Calculator(abc.ABC):
    @abc.abstractmethod
    def calc(self, df: pd.DataFrame) -> pd.DataFrame: ...


@dataclasses.dataclass(frozen=True)
class CumSumCalculator(Calculator):
    @override
    def calc(self, df: pd.DataFrame) -> pd.DataFrame:
        return df.cumsum()


@dataclasses.dataclass(frozen=True)
class EWMMeanCalculator(Calculator):
    com: float

    @override
    def calc(self, df: pd.DataFrame) -> pd.DataFrame:
        return df.ewm(com=self.com).mean()


calcs = [
    CumSumCalculator(),
    EWMMeanCalculator(com=5),
    EWMMeanCalculator(com=10),
]
In [10]:
%%interact column_group=["abc", "def", "ghij"];calc=calcs
calced_df = calc.calc(df[list(column_group)])
title = f"column_group={column_group!r}, calc={calc}"
calced_df.plot(figsize=(15, 8), lw=2, title=title)
Generating results:   0%|          | 0/9 [00:00<?, ?it/s]
Generating results:  22%|██▏       | 2/9 [00:00<00:00, 15.62it/s]
Generating results:  44%|████▍     | 4/9 [00:00<00:00, 14.74it/s]
Generating results:  67%|██████▋   | 6/9 [00:00<00:00, 15.08it/s]
Generating results:  89%|████████▉ | 8/9 [00:00<00:00, 15.36it/s]
Generating results: 100%|██████████| 9/9 [00:00<00:00, 15.22it/s]

Generating HTML:   0%|          | 0/9 [00:00<?, ?it/s]
Generating HTML:  11%|█         | 1/9 [00:00<00:04,  1.83it/s]
Generating HTML:  22%|██▏       | 2/9 [00:01<00:03,  1.83it/s]
Generating HTML:  33%|███▎      | 3/9 [00:01<00:03,  1.80it/s]
Generating HTML:  44%|████▍     | 4/9 [00:02<00:02,  1.74it/s]
Generating HTML:  56%|█████▌    | 5/9 [00:02<00:02,  1.75it/s]
Generating HTML:  67%|██████▋   | 6/9 [00:03<00:01,  1.69it/s]
Generating HTML:  78%|███████▊  | 7/9 [00:04<00:01,  1.68it/s]
Generating HTML:  89%|████████▉ | 8/9 [00:04<00:00,  1.70it/s]
Generating HTML: 100%|██████████| 9/9 [00:05<00:00,  1.66it/s]
Generating HTML: 100%|██████████| 9/9 [00:05<00:00,  1.71it/s]

Out[10]:
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
calc:
column_group:

In [11]:
# Auto-generated by leda
import leda


leda.show_input_toggle()
Out[11]:
In [12]:
# Auto-generated by leda
import leda


leda.show_std_output_toggle()
Out[12]: