回答編集履歴
1
Update
answer
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
ax= dfx[:-1][("Speed","90th")].sort_values(ascending=False).plot.bar()
|
3
3
|
|
4
4
|
# ここから
|
5
|
-
average = dfx.loc["Average", ("Speed","90th")]
|
6
|
-
pos_x = ax.get_xlim()
|
5
|
+
pos_x = ax.get_xlim()
|
7
6
|
label = "Average"
|
8
7
|
ax.axhline(average, color="red", ls="dotted")
|
8
|
+
ax.text(pos_x[0], average, f"{average:.2f}", ha="right", va="center", color="red")
|
9
|
-
ax.text(pos_x, average, label, ha="right", va="
|
9
|
+
ax.text(pos_x[1], average, label, ha="right", va="bottom", color="red")
|
10
10
|
```
|
11
|
-

|