IPyMagic#
Examples for _ipymagic, the notebook frontend of
scikit-plots: every scikitplot command and a profiler as IPython magics,
in Jupyter, JupyterLab, VS Code, Colab or terminal IPython.
%load_ext scikitplot
Magic |
Does |
|---|---|
|
runs |
|
the same, with the cell on standard input |
|
profiles the code; returns a |
|
session settings ( |
How to read these examples. A gallery page runs as a plain Python script,
where magics do not exist. Each step therefore shows the magic in an
ipython block, then runs the very same thing with the Python function the
magic calls (run_command, profile_code). In the Jupyter
notebook download, every cell magic (%%scikitplot,
%%scikitplot_profile) becomes a runnable cell next to its Python
equivalent, and the first cell loads the extension; line magics stay as text
to copy into a cell.
%scikitplot LINE [cell]
↓
split_line shell-like words ("my env" stays one word)
↓
route the CLI's own command registry; a typo is refused
↓
in the kernel info, doctor, show-versions ... (logging restored)
or a subprocess env, mcp, cleanprompt, a cell, isolate=true
(streamed, timeout, interrupt, bounded capture)
↓
CommandResult exit_code, stdout, stderr, data (--format json)
Start with the commands, then the cell form (cleanprompt), the delegated
servers (mcp) and the profiler. See also Notebook magics.
Clean a Prompt in a Notebook Cell with %%scikitplot
Inspect and Self-test the MCP Server from a Notebook