milia.plot.bind#
Binding backend-independent figures to one drawing backend.
Functions
|
Every public figure of a module with its |
- milia.plot.bind.bind(draw, figures)#
Every public figure of a module with its
drawargument fixed to one backend.This is how
milia.plot.letsandmilia.plot.mplexpose the same figures under the same names while each is written only once.- Parameters:
draw (
ModuleType) – Drawing backend module (milia.plot.lets.drawormilia.plot.mpl.draw).figures (
ModuleType) – Module of figure functions takingdrawfirst.
- Return type:
- Returns:
Figure name to the bound function, keeping its docstring and signature (minus
draw).
Examples
>>> from milia.plot.figures import clusters >>> from milia.plot.mpl import draw >>> "scatter" in bind(draw, clusters) True