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

回答編集履歴

1

修正

2020/06/10 16:19

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -1,5 +1,26 @@
1
1
  枠、目盛り、ラベルもすべてオブジェクトで表されているので、そのプロパティ (色など) を変更すればよいです。
2
2
 
3
+ ```txt
4
+ Axes
5
+ ├── Axes.spines (dict of text.Spine) - 枠一覧
6
+ │ ├── Axes.spines["left"] (spines.Spine) - 左の枠
7
+ │ ├── Axes.spines["top"] (spines.Spine) - 上の枠
8
+ │ ├── Axes.spines["right"] (spines.Spine) - 右の枠
9
+ │ └── Axes.spines["bottom"] (spines.Spine) - 下の枠
10
+ ├── Axes.xaxis (axis.XAxis) - x 軸
11
+ │ └── Axes.xaxis.label (text.Text) - x 軸のラベル
12
+ ├── Axes.yaxis (axis.YAxis) - y 軸
13
+ │ └── Axes.yaxis.label (text.Text) - y 軸のラベル
14
+ ├── Axes.get_xticklabels() (list of text.Text) - x 軸の目盛りのラベル一覧
15
+ │ ├── ラベル (text.Text)
16
+ │ ├── ラベル (text.Text)
17
+ │ ├── ...
18
+ ├── Axes.get_yticklabels() (list of text.Text) - y 軸の目盛りのラベル一覧
19
+ │ ├── ラベル (text.Text)
20
+ │ ├── ラベル (text.Text)
21
+ │ ├── ...
22
+ ```
23
+
3
24
  コードを見たほうが早いと思うので、サンプルコードを貼ります。
4
25
 
5
26
  ```python