Skip to content

Commit a2633c1

Browse files
committed
add docs
1 parent 4dd4cc2 commit a2633c1

File tree

4 files changed

+205
-0
lines changed

4 files changed

+205
-0
lines changed

docs/user-guide/imshow.ipynb

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "394c0bcc-4177-4083-abbb-9f829ab60a01",
6+
"metadata": {},
7+
"source": [
8+
"# Imshow"
9+
]
10+
},
11+
{
12+
"cell_type": "code",
13+
"execution_count": null,
14+
"id": "7b97da73-c403-48e6-a9a4-d86b8452eca2",
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"import matplotgl.pyplot as plt\n",
19+
"import numpy as np"
20+
]
21+
},
22+
{
23+
"cell_type": "code",
24+
"execution_count": null,
25+
"id": "650ad4ba-b117-4295-a4d0-55a3df249b1c",
26+
"metadata": {},
27+
"outputs": [],
28+
"source": [
29+
"fig, ax = plt.subplots()\n",
30+
"\n",
31+
"a = np.random.random((200, 300))\n",
32+
"\n",
33+
"ax.imshow(a, extent=[10, 50, 200, 500])\n",
34+
"\n",
35+
"fig"
36+
]
37+
}
38+
],
39+
"metadata": {
40+
"kernelspec": {
41+
"display_name": "Python 3 (ipykernel)",
42+
"language": "python",
43+
"name": "python3"
44+
},
45+
"language_info": {
46+
"codemirror_mode": {
47+
"name": "ipython",
48+
"version": 3
49+
},
50+
"file_extension": ".py",
51+
"mimetype": "text/x-python",
52+
"name": "python",
53+
"nbconvert_exporter": "python",
54+
"pygments_lexer": "ipython3",
55+
"version": "3.12.7"
56+
}
57+
},
58+
"nbformat": 4,
59+
"nbformat_minor": 5
60+
}

docs/user-guide/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ maxdepth: 1
66
---
77
88
installation
9+
plot
10+
scatter
11+
imshow
912
```

docs/user-guide/plot.ipynb

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "d228c316-3700-44b4-b457-218454da891d",
6+
"metadata": {},
7+
"source": [
8+
"# Plot"
9+
]
10+
},
11+
{
12+
"cell_type": "code",
13+
"execution_count": null,
14+
"id": "710d60a6-0166-44b5-8460-0e46eff525fa",
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"import matplotgl.pyplot as plt\n",
19+
"import numpy as np"
20+
]
21+
},
22+
{
23+
"cell_type": "code",
24+
"execution_count": null,
25+
"id": "0bcb7406-4eb8-45af-971e-36c7af397de4",
26+
"metadata": {},
27+
"outputs": [],
28+
"source": [
29+
"fig, ax = plt.subplots()\n",
30+
"\n",
31+
"x = np.arange(50.)\n",
32+
"y = np.sin(0.2 * x)\n",
33+
"\n",
34+
"ax.plot(x, y, lw=2)\n",
35+
"ax.plot(x, 0.5 * y, lw=2)\n",
36+
"ax.set_xlabel('Time (seconds)')\n",
37+
"ax.set_ylabel('Amplitude (cm)')\n",
38+
"\n",
39+
"fig"
40+
]
41+
},
42+
{
43+
"cell_type": "code",
44+
"execution_count": null,
45+
"id": "5c0de3de-4ce7-4882-9c0d-db6cb189bce0",
46+
"metadata": {},
47+
"outputs": [],
48+
"source": [
49+
"fig, ax = plt.subplots()\n",
50+
"\n",
51+
"ax.plot(x, y, '-o', lw=2)\n",
52+
"ax.set_xlabel('Time (seconds)')\n",
53+
"ax.set_ylabel('Amplitude (cm)')\n",
54+
"\n",
55+
"fig"
56+
]
57+
}
58+
],
59+
"metadata": {
60+
"kernelspec": {
61+
"display_name": "Python 3 (ipykernel)",
62+
"language": "python",
63+
"name": "python3"
64+
},
65+
"language_info": {
66+
"codemirror_mode": {
67+
"name": "ipython",
68+
"version": 3
69+
},
70+
"file_extension": ".py",
71+
"mimetype": "text/x-python",
72+
"name": "python",
73+
"nbconvert_exporter": "python",
74+
"pygments_lexer": "ipython3",
75+
"version": "3.12.7"
76+
}
77+
},
78+
"nbformat": 4,
79+
"nbformat_minor": 5
80+
}

docs/user-guide/scatter.ipynb

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "935f17d3-eae3-41e5-8258-8165cda406bb",
6+
"metadata": {},
7+
"source": [
8+
"# Scatter"
9+
]
10+
},
11+
{
12+
"cell_type": "code",
13+
"execution_count": null,
14+
"id": "9f36776c-0c6b-4d3b-8d76-86961aa11d16",
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"import matplotgl.pyplot as plt\n",
19+
"import numpy as np"
20+
]
21+
},
22+
{
23+
"cell_type": "code",
24+
"execution_count": null,
25+
"id": "05d54f24-7298-4ec3-befd-85ebaff9d1a6",
26+
"metadata": {},
27+
"outputs": [],
28+
"source": [
29+
"fig, ax = plt.subplots()\n",
30+
"\n",
31+
"N = 1000\n",
32+
"x = np.random.normal(size=N)\n",
33+
"y = np.random.normal(size=N)\n",
34+
"\n",
35+
"ax.scatter(x, y, s=6)\n",
36+
"\n",
37+
"fig"
38+
]
39+
}
40+
],
41+
"metadata": {
42+
"kernelspec": {
43+
"display_name": "Python 3 (ipykernel)",
44+
"language": "python",
45+
"name": "python3"
46+
},
47+
"language_info": {
48+
"codemirror_mode": {
49+
"name": "ipython",
50+
"version": 3
51+
},
52+
"file_extension": ".py",
53+
"mimetype": "text/x-python",
54+
"name": "python",
55+
"nbconvert_exporter": "python",
56+
"pygments_lexer": "ipython3",
57+
"version": "3.12.7"
58+
}
59+
},
60+
"nbformat": 4,
61+
"nbformat_minor": 5
62+
}

0 commit comments

Comments
 (0)