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

回答編集履歴

1

fix context

2022/10/16 06:24

投稿

ps_aux_grep
ps_aux_grep

スコア1581

answer CHANGED
@@ -1,6 +1,13 @@
1
- `plt.plot()`するたびにラベル指定していれば,凡例が生成されてしまので1度プロットしたカテゴリものは2度目からは`label = None`にすると良いですよ
1
+ `handler_map={tuple:HandlerTuple(ndivide=None)}`を使ときはようにすると良いでしょう
2
2
 
3
3
  ```Python
4
+ plt.plot()
5
+ plt.legend(labels=["SiO2", "C", "another"], handler_map={tuple:HandlerTuple(ndivide=None)})
6
+ ```
7
+
8
+ うまくいかない場合は,応急的になりますが次のようにできます.`plt.plot()`するたびにラベルを指定していれば,凡例が生成されてしまうので,1度プロットしたカテゴリのものは2度目からは`label = None`にする方法があります.
9
+
10
+ ```Python
4
11
  show_sio2_label = True
5
12
  for i in range():
6
13
  if ..........