ilmplot 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ilmplot/__init__.py +47 -0
- ilmplot/bridge.py +1469 -0
- ilmplot/document.py +2064 -0
- ilmplot/mathtext.py +69 -0
- ilmplot/messages.py +40 -0
- ilmplot/render.py +2574 -0
- ilmplot/stats.py +103 -0
- ilmplot-0.1.0.dist-info/METADATA +127 -0
- ilmplot-0.1.0.dist-info/RECORD +12 -0
- ilmplot-0.1.0.dist-info/WHEEL +5 -0
- ilmplot-0.1.0.dist-info/licenses/LICENSE +201 -0
- ilmplot-0.1.0.dist-info/top_level.txt +1 -0
ilmplot/__init__.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""ilmplot — Qt-free core for ILM's editable ``*.ilmplot.svg`` plots.
|
|
2
|
+
|
|
3
|
+
A ``*.ilmplot.svg`` is a standard SVG carrying a versioned JSON
|
|
4
|
+
:class:`PlotDocument` in ``<metadata id="ilm-plot-document">`` — both the
|
|
5
|
+
vector snapshot and the editable source of truth.
|
|
6
|
+
|
|
7
|
+
This package deliberately keeps import-time cost low: importing
|
|
8
|
+
``ilmplot`` pulls in only :mod:`ilmplot.document` (which itself imports
|
|
9
|
+
matplotlib lazily). The renderer (:mod:`ilmplot.render`), statistics
|
|
10
|
+
helpers (:mod:`ilmplot.stats`), mathtext helpers
|
|
11
|
+
(:mod:`ilmplot.mathtext`) and the matplotlib figure bridge
|
|
12
|
+
(:mod:`ilmplot.bridge`) load on demand.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
from .document import (
|
|
18
|
+
SCHEMA_VERSION, PlotDocument, PlotDocumentError, load_document,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
__version__ = '0.1.0'
|
|
22
|
+
|
|
23
|
+
_LAZY = {
|
|
24
|
+
'save_document': '.render',
|
|
25
|
+
'render_document': '.render',
|
|
26
|
+
'savefig': '.bridge',
|
|
27
|
+
'convert': '.bridge',
|
|
28
|
+
'ConversionResult': '.bridge',
|
|
29
|
+
'SaveResult': '.bridge',
|
|
30
|
+
'UnsupportedFigureError': '.bridge',
|
|
31
|
+
'FallbackWarning': '.bridge',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def __getattr__(name):
|
|
36
|
+
target = _LAZY.get(name)
|
|
37
|
+
if target is None:
|
|
38
|
+
raise AttributeError(
|
|
39
|
+
f"module {__name__!r} has no attribute {name!r}")
|
|
40
|
+
import importlib
|
|
41
|
+
value = getattr(importlib.import_module(target, __name__), name)
|
|
42
|
+
globals()[name] = value
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def __dir__():
|
|
47
|
+
return sorted(set(globals()) | set(_LAZY))
|