mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 20:14:45 +00:00
add external files
This commit is contained in:
parent
7823243dbe
commit
92aa3ea078
122 changed files with 1087 additions and 0 deletions
4
crates/erg_compiler/lib/external/matplotlib.d/__init__.d.er
vendored
Normal file
4
crates/erg_compiler/lib/external/matplotlib.d/__init__.d.er
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
.pyplot = pyimport "./pyplot"
|
||||
.scale = pyimport "./scale"
|
||||
|
||||
.use!: Str => NoneType
|
3
crates/erg_compiler/lib/external/matplotlib.d/axes.d/__init__.d.er
vendored
Normal file
3
crates/erg_compiler/lib/external/matplotlib.d/axes.d/__init__.d.er
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
._axes = pyimport "./_axes"
|
||||
|
||||
.Axes! = ._axes.Axes!
|
21
crates/erg_compiler/lib/external/matplotlib.d/axes.d/_axes.d.er
vendored
Normal file
21
crates/erg_compiler/lib/external/matplotlib.d/axes.d/_axes.d.er
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
.Axes!: ClassType
|
||||
.Axes!.
|
||||
scatter!: (
|
||||
self: RefMut(.Axes!),
|
||||
x: Num, # TODO: Float | ArrayLike
|
||||
y: Num,
|
||||
s := Num,
|
||||
c := Iterable(Int),
|
||||
vmin := Float,
|
||||
vmax := Float,
|
||||
) => NoneType
|
||||
set!: (
|
||||
self: RefMut(.Axes!),
|
||||
xlabel := Str,
|
||||
xlim := (Float, Float),
|
||||
xticks := Iterable(Obj),
|
||||
ylabel := Str,
|
||||
ylim := (Float, Float),
|
||||
yticks := Iterable(Obj),
|
||||
title := Str
|
||||
) => NoneType
|
5
crates/erg_compiler/lib/external/matplotlib.d/figure.d.er
vendored
Normal file
5
crates/erg_compiler/lib/external/matplotlib.d/figure.d.er
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
axes = pyimport "./axes"
|
||||
|
||||
.Figure!: ClassType
|
||||
.Figure!.
|
||||
add_axes!: (self: RefMut(.Figure!), rect: [Nat; 4], projection := Str or NoneType, polar := Bool, label := Str) => axes.Axes!
|
4
crates/erg_compiler/lib/external/matplotlib.d/image.d.er
vendored
Normal file
4
crates/erg_compiler/lib/external/matplotlib.d/image.d.er
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
_ImageBase: ClassType
|
||||
|
||||
.AxesImage!: ClassType
|
||||
.AxesImage! <: _ImageBase
|
1
crates/erg_compiler/lib/external/matplotlib.d/legend.d.er
vendored
Normal file
1
crates/erg_compiler/lib/external/matplotlib.d/legend.d.er
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.Legend: ClassType
|
2
crates/erg_compiler/lib/external/matplotlib.d/lines.d.er
vendored
Normal file
2
crates/erg_compiler/lib/external/matplotlib.d/lines.d.er
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.Line2D: ClassType
|
||||
.Line3D: ClassType
|
0
crates/erg_compiler/lib/external/matplotlib.d/package.er
vendored
Normal file
0
crates/erg_compiler/lib/external/matplotlib.d/package.er
vendored
Normal file
0
crates/erg_compiler/lib/external/matplotlib.d/path.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/matplotlib.d/path.d.er
vendored
Normal file
30
crates/erg_compiler/lib/external/matplotlib.d/pyplot.d/__init__.d.er
vendored
Normal file
30
crates/erg_compiler/lib/external/matplotlib.d/pyplot.d/__init__.d.er
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
contextlib = pyimport "contextlib"
|
||||
|
||||
# lines = pyimport "../lines"
|
||||
text = pyimport "../text"
|
||||
legend = pyimport "../legend"
|
||||
.style = pyimport "../style"
|
||||
figure = pyimport "../figure"
|
||||
axes = pyimport "../axes"
|
||||
image = pyimport "../image"
|
||||
|
||||
.plot!: (*args: Obj, scaleX := Bool, scaleY := Bool) => [Obj; _]
|
||||
.imshow!: (X: Obj, cmap := Str, interpolation := Str) => image.AxesImage!
|
||||
.show!: () => NoneType
|
||||
.text!: (x: Float, y: Float, s: Str, fontdict := {Str: Obj}, fontsize := Nat) => text.Text
|
||||
.title!: (title: Str) => text.Text
|
||||
.xlabel!: (label: Str) => text.Text
|
||||
.ylabel!: (label: Str) => text.Text
|
||||
.xlim!: (left := Float, right := Float) => (Float, Float) \
|
||||
and ((left_right: (Float, Float)) => (Float, Float))
|
||||
.ylim!: (bottom := Float, top := Float) => (Float, Float) \
|
||||
and ((bottom_top: (Float, Float)) => (Float, Float))
|
||||
.legend!: (labels := [Str; _]) => legend.Legend
|
||||
.savefig!: (fname: Str, dpi := Float or Str, format := Str) => NoneType
|
||||
.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!; _]; _]))
|
||||
.figure!: (num := Int or Str, figsize := [Float; _], dpi := Float) => figure.Figure!
|
||||
.xkcd!: (scale := Float, length := Float, randomness := Float) => contextlib.ExitStack!
|
0
crates/erg_compiler/lib/external/matplotlib.d/scale.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/matplotlib.d/scale.d.er
vendored
Normal file
1
crates/erg_compiler/lib/external/matplotlib.d/style.d/__init__.d.er
vendored
Normal file
1
crates/erg_compiler/lib/external/matplotlib.d/style.d/__init__.d.er
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.use!: Str => NoneType
|
0
crates/erg_compiler/lib/external/matplotlib.d/testing.d/__init__.d.er
vendored
Normal file
0
crates/erg_compiler/lib/external/matplotlib.d/testing.d/__init__.d.er
vendored
Normal file
1
crates/erg_compiler/lib/external/matplotlib.d/text.d.er
vendored
Normal file
1
crates/erg_compiler/lib/external/matplotlib.d/text.d.er
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.Text: ClassType
|
Loading…
Add table
Add a link
Reference in a new issue