From 1373dfac64615a6187d3c579d4570a487c3c3d82 Mon Sep 17 00:00:00 2001 From: licong Date: Thu, 3 May 2018 21:59:55 +0800 Subject: [PATCH] fix default axis --- api/curve/v1/services/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/curve/v1/services/plugin.py b/api/curve/v1/services/plugin.py index 647475f..baccf3d 100644 --- a/api/curve/v1/services/plugin.py +++ b/api/curve/v1/services/plugin.py @@ -225,7 +225,7 @@ def y_axis(api, line): :param line: data raws :return: """ - values = np.asarray([point[0] for point in line if point[1] is not None]) + values = np.asarray([point[1] for point in line if point[1] is not None]) value_min, value_max = np.min(values), np.max(values) y_axis_min_per, y_axis_max_per = np.percentile(values, 0.3), np.percentile(values, 99.7) y_axis_min = y_axis_min_per - (y_axis_max_per + y_axis_min_per) * 0.05