From 6e584599576b8da67395e138ad87e63b92e7aa74 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 27 Mar 2024 13:29:32 -0600 Subject: trendline color and padding --- api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api.py b/api.py index 9507e63..b701d0a 100644 --- a/api.py +++ b/api.py @@ -77,6 +77,8 @@ def plot_data(x_data, y_data, std_dev_data, color_picker, labels, df, trendline_equation = None if enable_trendline: + if special_mode: + trendline_color = "blue" if trendline_equation != None: try: x = symbols('x') @@ -95,6 +97,8 @@ def plot_data(x_data, y_data, std_dev_data, color_picker, labels, df, h, = ax.plot(x,p(x), linestyle="dotted", label="Trendline", color=trendline_color) handles.append(h) + + light_grey = 0.9 dar_grey = 0.4 @@ -140,6 +144,9 @@ def plot_data(x_data, y_data, std_dev_data, color_picker, labels, df, ax.set_xlabel("") ax.set_ylabel("") + # revert fig.tight_layout + fig.tight_layout(pad=0.0) + ax.spines[['right', 'top']].set_visible(False) ax.tick_params(axis='x', length=0) ax.tick_params(axis='y', length=0) -- cgit v1.2.3