vault backup: 2023-05-15 17:58:49

This commit is contained in:
2023-05-15 17:58:49 +08:00
parent 9a966b4509
commit 5299474e42
2 changed files with 18 additions and 5 deletions

View File

@@ -53,8 +53,8 @@
"state": {
"type": "markdown",
"state": {
"file": "04. Programming/Machine Learning.md",
"mode": "preview",
"file": "04. Programming/Python/matplotlib.md",
"mode": "source",
"source": true
}
}
@@ -126,7 +126,7 @@
"state": {
"type": "backlink",
"state": {
"file": "04. Programming/Machine Learning.md",
"file": "04. Programming/Python/matplotlib.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@@ -151,7 +151,7 @@
"state": {
"type": "outline",
"state": {
"file": "04. Programming/Machine Learning.md"
"file": "04. Programming/Python/matplotlib.md"
}
}
},
@@ -204,8 +204,8 @@
},
"active": "1f1e98d771d9e088",
"lastOpenFiles": [
"05. 資料收集/讀書筆記/20230206 - 卡片盒筆記.md",
"04. Programming/Machine Learning.md",
"05. 資料收集/讀書筆記/20230206 - 卡片盒筆記.md",
"05. 資料收集/核心肌群訓練.md",
"05. 資料收集/Capture One.md",
"05. 資料收集/AI.md",

View File

@@ -22,6 +22,19 @@ plt.xlabel(
plt.gca().axes.get_xaxis().set_visible(False)
```
## 畫2張圖
```python
figure, axis = plt.subplots(2, 2)
```
`plt.subplots()` 來指定要畫幾張圖第一個參數是x軸的數量第二個參數是y軸的數量
`axis` 會是一個 array可以用類似座標的方式來控制你要的圖例如
```python
axis[0, 0].set_title("Sine Function")
axis[0, 1].set_title("Cosine Function")
```
`figure` 則是指外圍的大圖。
## 畫2條線
```python
plt.plot(x, y1, label='sine curve',color='b')