回答編集履歴

1

d

2019/03/14 09:37

投稿

tiitoi
tiitoi

スコア21956

test CHANGED
@@ -70,9 +70,9 @@
70
70
 
71
71
  # 描画する。
72
72
 
73
- ax = df.T.plot(figsize=(20, 10), marker='o', ms=20,
73
+ fig, ax = plt.subplots(figsize=(20, 10), facecolor='w')
74
74
 
75
- legend=False, colormap='tab20')
75
+ df.T.plot(marker='o', ms=20, legend=False, colormap='tab20', ax=ax)
76
76
 
77
77
 
78
78
 
@@ -84,13 +84,17 @@
84
84
 
85
85
 
86
86
 
87
- # Yのラベルを右に変更
87
+ # X
88
88
 
89
+ ax.set_xticks(np.arange(len(df.index)))
90
+
89
- ax.yaxis.tick_right()
91
+ ax.set_xticklabels(df.columns)
90
92
 
91
93
 
92
94
 
93
- # Y軸のラベル表示
95
+ # Y軸
96
+
97
+ ax.yaxis.tick_right()
94
98
 
95
99
  ax.set_yticks(np.arange(1, len(df.index) + 1))
96
100
 
@@ -100,4 +104,4 @@
100
104
 
101
105
 
102
106
 
103
- ![イメージ説明](40631fc40c4a093278e9c9e5c84d3df0.png)
107
+ ![イメージ説明](b7192c84fdc01e9b812078c5a5d60f71.png)