teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

コード追加

2019/07/31 06:23

投稿

8524ba23
8524ba23

スコア38352

answer CHANGED
@@ -1,2 +1,17 @@
1
1
  `set_xlim`などの**関数に値を代入**してしまっています。
2
- `axL1.set_xlim=([0,1.50])`→`axL1.set_xlim(0,1.50)`のように修正ください。
2
+ `axL1.set_xlim=([0,1.50])`→`axL1.set_xlim(0,1.50)`のように修正ください。
3
+
4
+ 以下、単純な使用例です。
5
+ ```Python
6
+ import matplotlib.pyplot as plt
7
+
8
+ x, y = [0.0,0.5,1.0], [0.0,0.5,1.0]
9
+
10
+ fig, ([axL1,axR1],[axL2,axR2]) = plt.subplots(nrows=2, ncols=2, figsize=(6,6))
11
+
12
+ axL1.scatter(x, y, s=20, alpha=1)
13
+ axL1.set_xlim(0,1.50)
14
+ axL1.set_ylim(0,2.50)
15
+ plt.show()
16
+ ```
17
+ ![![イメージ説明](7b58411ffca69de395a95e0503cb4c21.png)](897654f34a7bb1e0f4250e727114bdf1.png)