From c87dba57b54c4458119784b0b74dc14df9f92fa4 Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand Date: Fri, 31 Mar 2017 19:21:41 +0300 Subject: [PATCH] Describ manip in hist_boxplot --- notes_tools/tools/marks_plottings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notes_tools/tools/marks_plottings.py b/notes_tools/tools/marks_plottings.py index 4c35e40..587664d 100644 --- a/notes_tools/tools/marks_plottings.py +++ b/notes_tools/tools/marks_plottings.py @@ -74,7 +74,7 @@ def hist_boxplot(df, kwargs_hist=[], kwargs_box=[]): marks_hist(df, ax = ax_hist, rwidth=0.9) ev_desc = df["Mark"].describe() - m = ev_desc["mean"] + m = round(ev_desc["mean"], 1) ax_hist.plot([m,m], ax_hist.get_ylim()) ax_hist.annotate(round(ev_desc["mean"],1), @@ -83,7 +83,7 @@ def hist_boxplot(df, kwargs_hist=[], kwargs_box=[]): df["Mark"].plot.box(ax = ax_box, vert=False, widths = 0.6) ax_box.set_yticklabels("") for e in ["min", "25%", "50%", "75%", "max"]: - ax_box.annotate(ev_desc[e], + ax_box.annotate(round(ev_desc[e], 1), xy=(ev_desc[e] - 0.2, ax_box.get_ylim()[1])) return f, (ax_hist, ax_box)