scikitplot._ipymagic#
Notebook frontend of scikit-plots: every scikitplot command and a profiler as IPython magics.
Load it in Jupyter, JupyterLab, VS Code, Colab or terminal IPython:
%load_ext scikitplot # or: %load_ext scikitplot._ipymagic
Magic |
Does |
|---|---|
|
run |
|
the same, the cell on standard input |
|
profile code; returns a table |
|
( |
|
session settings
( |
The engine works without IPython, for scripts and agents:
>>> import io
>>> from scikitplot._ipymagic import run_command
>>> run_command("info --format json", out=io.StringIO()).data["scikitplot"][
... "version"
... ] != ""
True
Notes
User notes. %scikitplot is the command line, in a cell: the same
commands, options, output and exit status as scikitplot in a terminal
(%scikitplot --help), with <TAB> completion, parsed JSON, errors in
two lines instead of a traceback, and nothing left changed in the kernel. A
mistyped command is refused with the closest names; nothing is guessed.
Developer notes. One engine (_bridge), one model (the CLI’s
registry), thin magics (_magics, the only IPython import). This
package imports nothing until a name is used.
User guide. See the Notebook magics section for further details.
Notebook magics: extension#
|
Register the scikitplot magics ( |
|
Remove the magics, stop snakeviz servers, delete temporary profiles. |
Notebook magics: commands#
Class inheritance

|
Run one |
|
Split a magic's line into arguments the way a POSIX shell would. |
|
Return the command |
|
Return whether |
|
Return the completions of the last word of a |
|
Which command an argument list names, and whether the CLI delegates it. |
|
The outcome of one |
|
Behaviour of the magics for one IPython session. |
Notebook magics: profiling#
Class inheritance

|
Run |
|
Return why a profiler cannot be enabled now, or None when it can. |
|
A profile of a statement or cell, displayed as a table. |
|
One function of a profile. |
Notebook magics: errors#
Class inheritance

|
Base class of every error raised by |
|
The magic was called with arguments it cannot run (nothing was run). |
|
A command exited with a non-zero status (raised only when asked to). |
|
Another profiler is active in this process (Rule 133); nothing was run. |
|
An optional package the request needs is not installed. |