aboutsummaryrefslogtreecommitdiff
path: root/api.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2024-03-27 12:46:21 -0600
committerNavan Chauhan <navanchauhan@gmail.com>2024-03-27 12:46:21 -0600
commit770e71fc40eaf1c1d66a6568cb486adda789cc8d (patch)
tree3bf989ba38f29c4be9c7825f06367e9d2acbacc6 /api.py
parentc9d4623526b6c7a6c0e4ad749a05ea05a22089bd (diff)
variable length and spacing
Diffstat (limited to 'api.py')
-rw-r--r--api.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/api.py b/api.py
index 03fd303..46e8490 100644
--- a/api.py
+++ b/api.py
@@ -71,7 +71,7 @@ def plot_data(x_data, y_data, std_dev_data, color_picker, labels, df,
p = sympify(trendline_equation)
x_range = np.linspace(df[x_data[0]].astype(float).min(), df[x_data[0]].astype(float).max(), 100)
y_range = [p.subs(x, i) for i in x_range]
- h, = ax.plot(x_range, y_range, linestyle="dashed", label="Trendline", color=trendline_color)
+ h, = ax.plot(x_range, y_range, linestyle="dotted", label="Trendline", color=trendline_color)
handles.append(h)
except:
print("Invalid Equation")
@@ -80,7 +80,7 @@ def plot_data(x_data, y_data, std_dev_data, color_picker, labels, df,
y = df[y_data[0]].astype(float)
z = np.polyfit(x, y, 2)
p = np.poly1d(z)
- h, = ax.plot(x,p(x), linestyle="dashed", label="Trendline", color=trendline_color)
+ h, = ax.plot(x,p(x), linestyle="dotted", label="Trendline", color=trendline_color)
handles.append(h)
light_grey = 0.9
@@ -91,7 +91,7 @@ def plot_data(x_data, y_data, std_dev_data, color_picker, labels, df,
idx += 1
grey_shade = light_grey - (light_grey - dar_grey) * (idx / len(constant_line))
color = (grey_shade, grey_shade, grey_shade)
- h = ax.axhline(y=val, linestyle='--', color=color, label=name)
+ h = ax.axhline(y=val, linestyle='dashed', dashes=(idx,idx) , color=color, label=name)
handles.append(h)
ax.grid(True,linestyle=(0,(1,5))) # enable_grid)