mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-13 17:45:20 +08:00
used plt.subplots everywhere
This commit is contained in:
@@ -45,11 +45,12 @@ line_x = np.arange(-250, 250)
|
||||
line_y = model.predict_y(line_x)
|
||||
line_y_robust = model_robust.predict_y(line_x)
|
||||
|
||||
plt.plot(data[inliers, 0], data[inliers, 1], '.b', alpha=0.6,
|
||||
label='Inlier data')
|
||||
plt.plot(data[outliers, 0], data[outliers, 1], '.r', alpha=0.6,
|
||||
label='Outlier data')
|
||||
plt.plot(line_x, line_y, '-k', label='Line model from all data')
|
||||
plt.plot(line_x, line_y_robust, '-b', label='Robust line model')
|
||||
plt.legend(loc='lower left')
|
||||
f, ax = plt.subplots()
|
||||
ax.plot(data[inliers, 0], data[inliers, 1], '.b', alpha=0.6,
|
||||
label='Inlier data')
|
||||
ax.plot(data[outliers, 0], data[outliers, 1], '.r', alpha=0.6,
|
||||
label='Outlier data')
|
||||
ax.plot(line_x, line_y, '-k', label='Line model from all data')
|
||||
ax.plot(line_x, line_y_robust, '-b', label='Robust line model')
|
||||
ax.legend(loc='lower left')
|
||||
plt.show()
|
||||
|
||||
Reference in New Issue
Block a user