8000 extend linear regression lines to the entire length of plots in Ansco… · matplotlib/matplotlib@573d5bf · GitHub
[go: up one dir, main page]

Skip to content

Commit 573d5bf

Browse files
extend linear regression lines to the entire length of plots in Anscombe's Quartet example
1 parent 06514d2 commit 573d5bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/specialty_plots/anscombe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
# linear regression
4343
p1, p0 = np.polyfit(x, y, deg=1)
44-
x_lin = np.array([np.min(x), np.max(x)])
44+
x_lin = np.array([0, 20])
4545
y_lin = p1 * x_lin + p0
4646
ax.plot(x_lin, y_lin, 'r-', lw=2)
4747

0 commit comments

Comments
 (0)
0