From c74345ea6f8059825a40d381c60866e478c17107 Mon Sep 17 00:00:00 2001 From: Li-Pu Chen Date: Thu, 13 May 2021 11:12:57 +0800 Subject: [PATCH] specifying the x, y parameters Plot with specifying the x, y parameters. The purpose is to solve the potential warning showed when we execute the script in GoogleColab, JupyterNotebook --- content/c1/code.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/c1/code.ipynb b/content/c1/code.ipynb index 547c1c7..5ed91bb 100644 --- a/content/c1/code.ipynb +++ b/content/c1/code.ipynb @@ -83,7 +83,7 @@ "source": [ "sklearn_predictions = sklearn_model.predict(X_train)\n", "fig, ax = plt.subplots()\n", - "sns.scatterplot(y_train, sklearn_predictions)\n", + "sns.scatterplot(x=y_train, y=sklearn_predictions)\n", "ax.set_xlabel(r'$y$', size = 16)\n", "ax.set_ylabel(r'$\\hat{y}$', rotation = 0, size = 16, labelpad = 15)\n", "ax.set_title(r'$y$ vs. $\\hat{y}$', size = 20, pad = 10)\n",