Skip to content

Commit

Permalink
add axis range
Browse files Browse the repository at this point in the history
  • Loading branch information
tompollard committed Aug 23, 2022
1 parent bba5203 commit eeab0c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _episodes/03-learning.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ df = pd.DataFrame(data)
df['y_hat'] = [0, 2, 4, 6, 8]

# plot the data
ax = df.plot(x='x', y='y', kind='scatter')
ax = df.plot(x='x', y='y', kind='scatter', xlim=[0,6], ylim=[-1,9])

# plot approx line of best fit
ax.plot(df['x'], df['y_hat'], color='blue');
Expand Down

0 comments on commit eeab0c8

Please sign in to comment.