feat: enhance matplotlib type defs

This commit is contained in:
Shunsuke Shibayama 2023-06-03 12:03:31 +09:00
parent ea132e2345
commit 0b87a49b85
13 changed files with 38 additions and 0 deletions

View file

@ -1,6 +1,9 @@
# lines = pyimport "../lines"
text = pyimport "../text"
legend = pyimport "../legend"
.style = pyimport "../style"
figure = pyimport "../figure"
axes = pyimport "../axes"
.plot!: (*args: Obj, scaleX := Bool, scaleY := Bool) => [Obj; _]
.show!: () => NoneType
@ -8,3 +11,8 @@ legend = pyimport "../legend"
.xlabel!: (label: Str) => text.Text
.ylabel!: (label: Str) => text.Text
.legend!: (labels := [Str; _]) => legend.Legend
.subplots!: (() => (figure.Figure, axes.Axes!)) \
and ((nrows: {1}, ncols: {1}) => (figure.Figure, axes.Axes!)) \
and ((nrows: {1}, ncols: Nat) => (figure.Figure, [axes.Axes!; _])) \
and ((nrows: Nat, ncols: {1}) => (figure.Figure, [axes.Axes!; _])) \
and ((nrows: Nat, ncols: Nat) => (figure.Figure, [[axes.Axes!; _]; _]))