8000 Merge pull request #5506 from RachitKansal/my-work · scikit-learn/scikit-learn@1863895 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1863895

Browse files
committed
Merge pull request #5506 from RachitKansal/my-work
Tweaking the legend of GP plot in plot_compare_gpr_krr.py
2 parents 8b990c3 + 7a2e2d8 commit 1863895

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/gaussian_process/plot_compare_gpr_krr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
% (time.time() - stime))
103103

104104
# Plot results
105+
plt.figure(figsize = (10,5))
105106
plt.scatter(X, y, c='k', label='data')
106107
plt.plot(X_plot, np.sin(X_plot), c='k', label='True')
107108
plt.plot(X_plot, y_kr, c='g', label='KRR (%s)' % kr.best_params_)
@@ -111,6 +112,7 @@
111112
plt.xlabel('data')
112113
plt.ylabel('target')
113114
plt.xlim(0, 20)
115+
plt.ylim(-4, 4)
114116
plt.title('GPR versus Kernel Ridge')
115-
plt.legend(loc="best", prop={'size': 10})
117+
plt.legend(loc=9, prop={'size': 10})
116118
plt.show()

0 commit comments

Comments
 (0)
0