-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
28 lines (21 loc) · 870 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from esch.plot import plot
from esch.edge import EdgeConfigs, EdgeConfig
import numpy as np
def main():
"""Example usage of esch plotting."""
# Generate some data
matrix = np.random.randn(3, 11, 11)
# Correct LaTeX syntax with single `$` for inline math
left = EdgeConfig(ticks=[(0, r"train"), (1.0, "$1$")], label=r"𝑥₀", show_on="all")
top = EdgeConfig(ticks=[(0, "𝑥₀"), (1.0, "𝑥₀")], label=r"𝑥₀", show_on="all")
bottom = EdgeConfig(label=["𝑥₀", "b", "c"], show_on="all", ticks=[(0, "a"), (1, "b")])
# right = EdgeConfig(label="RIGHT ON MOTHERUFCKS", show_on="all", ticks=[(0, "a"), (1, "b")])
edge = EdgeConfigs(left=left, top=top, bottom=bottom) # right=right)
drawing = plot(
matrix,
# animated=True,
edge=edge,
path="noah.svg",
)
return drawing
main()