From e287581c93b05955bbd3174480234db972ea0adf Mon Sep 17 00:00:00 2001 From: pannoos Date: Sun, 15 Oct 2017 14:14:05 -0700 Subject: [PATCH] Chapter 2: Improvement of code in "Setup" & "Get the data" --- 02_end_to_end_machine_learning_project.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/02_end_to_end_machine_learning_project.ipynb b/02_end_to_end_machine_learning_project.ipynb index c63e8ef..5332815 100644 --- a/02_end_to_end_machine_learning_project.ipynb +++ b/02_end_to_end_machine_learning_project.ipynb @@ -62,14 +62,13 @@ "PROJECT_ROOT_DIR = \".\"\n", "CHAPTER_ID = \"end_to_end_project\"\n", "IMAGES_PATH = os.path.join(PROJECT_ROOT_DIR, \"images\", CHAPTER_ID)\n", - "FIG_EXTENSION = \"png\"\n", "\n", - "def save_fig(fig_id, tight_layout=True):\n", - " path = os.path.join(IMAGES_PATH, fig_id + \".\" + FIG_EXTENSION)\n", + "def save_fig(fig_id, tight_layout=True, fig_extension=\"png\", resolution=300):\n", + " path = os.path.join(IMAGES_PATH, fig_id + \".\" + fig_extension)\n", " print(\"Saving figure\", fig_id)\n", " if tight_layout:\n", " plt.tight_layout()\n", - " plt.savefig(path, format=FIG_EXTENSION, dpi=300)" + " plt.savefig(path, format=fig_extension, dpi=resolution)" ] }, { @@ -2322,11 +2321,12 @@ "width": "309px" }, "toc": { - "navigate_menu": true, + "nav_menu": {}, "number_sections": true, "sideBar": true, - "threshold": 6, + "skip_h1_title": false, "toc_cell": false, + "toc_position": {}, "toc_section_display": "block", "toc_window_display": false }