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

回答編集履歴

1

プロット部分の追記

2020/02/11 13:18

投稿

bamboo-nova
bamboo-nova

スコア1408

answer CHANGED
@@ -52,10 +52,15 @@
52
52
  ```
53
53
 
54
54
  で、プロットします。
55
- ```python
55
+ ```Python
56
+ import matplotlib.pyplot as plt
57
+ %matplotlib inline
58
+
56
59
  ax = result[result.a==1.0].plot(x="d", y="c",kind='bar',color='b')
57
60
  ax.legend(['割合'],fontsize=14,loc='upper left', bbox_to_anchor=(1, 1), frameon=False)
58
61
  ax.set_xlabel("",fontsize=14)
62
+ labels = ax.get_xticklabels()
63
+ ax.set_xticklabels(labels, rotation=45)
59
64
  ```
60
65
 
61
- ![イメージ説明](2506c3bb730aa8a3394bcd3dfd291e62.png)
66
+ ![イメージ説明](b198bd66a4fa4a73a7d28b4a558819cf.png)