From dbc23da90d477b1046315cb6210454d5a142e140 Mon Sep 17 00:00:00 2001 From: Milton Pividori Date: Mon, 12 Aug 2024 03:31:53 -0600 Subject: [PATCH] mics: save figure as svg --- .../misc/01-data_with_substructures.ipynb | 153 +----------------- .../misc/py/01-data_with_substructures.py | 2 +- 2 files changed, 8 insertions(+), 147 deletions(-) diff --git a/nbs/99_manuscript/misc/01-data_with_substructures.ipynb b/nbs/99_manuscript/misc/01-data_with_substructures.ipynb index a410b621..c210ab3f 100644 --- a/nbs/99_manuscript/misc/01-data_with_substructures.ipynb +++ b/nbs/99_manuscript/misc/01-data_with_substructures.ipynb @@ -60,12 +60,6 @@ "execution_count": 1, "id": "2dcd0e52-236a-44cd-9cd9-71cca1232338", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:04.050362Z", - "iopub.status.busy": "2023-11-20T15:42:04.050025Z", - "iopub.status.idle": "2023-11-20T15:42:04.851583Z", - "shell.execute_reply": "2023-11-20T15:42:04.851239Z" - }, "papermill": { "duration": 0.809772, "end_time": "2023-11-20T15:42:04.853250", @@ -112,12 +106,6 @@ "execution_count": 2, "id": "3e9781c8-faf2-41ec-a5c3-ab84dec6a7fa", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:04.876161Z", - "iopub.status.busy": "2023-11-20T15:42:04.876077Z", - "iopub.status.idle": "2023-11-20T15:42:04.878289Z", - "shell.execute_reply": "2023-11-20T15:42:04.877978Z" - }, "papermill": { "duration": 0.009172, "end_time": "2023-11-20T15:42:04.879490", @@ -154,12 +142,6 @@ "execution_count": 3, "id": "f869a719-5302-4c5b-b496-0878617ea3d3", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:04.900870Z", - "iopub.status.busy": "2023-11-20T15:42:04.900777Z", - "iopub.status.idle": "2023-11-20T15:42:04.904748Z", - "shell.execute_reply": "2023-11-20T15:42:04.904473Z" - }, "papermill": { "duration": 0.011527, "end_time": "2023-11-20T15:42:04.906686", @@ -208,12 +190,6 @@ "execution_count": 4, "id": "90611494-e1b4-4c57-b7b9-cf96e7abbfd3", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:04.928844Z", - "iopub.status.busy": "2023-11-20T15:42:04.928765Z", - "iopub.status.idle": "2023-11-20T15:42:04.933308Z", - "shell.execute_reply": "2023-11-20T15:42:04.932908Z" - }, "papermill": { "duration": 0.011492, "end_time": "2023-11-20T15:42:04.934585", @@ -238,12 +214,6 @@ "execution_count": 5, "id": "e5076d0b-4614-4f67-8c0e-7965f53d6d5b", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:04.946428Z", - "iopub.status.busy": "2023-11-20T15:42:04.946271Z", - "iopub.status.idle": "2023-11-20T15:42:04.951280Z", - "shell.execute_reply": "2023-11-20T15:42:04.950760Z" - }, "papermill": { "duration": 0.012419, "end_time": "2023-11-20T15:42:04.952624", @@ -264,12 +234,6 @@ "execution_count": 6, "id": "5bcac844-f64a-4b31-82e8-1ef58d8a19e1", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:04.965338Z", - "iopub.status.busy": "2023-11-20T15:42:04.965050Z", - "iopub.status.idle": "2023-11-20T15:42:04.969707Z", - "shell.execute_reply": "2023-11-20T15:42:04.969137Z" - }, "papermill": { "duration": 0.012945, "end_time": "2023-11-20T15:42:04.971227", @@ -300,12 +264,6 @@ "execution_count": 7, "id": "04b1607e-3a52-4b60-a71b-e2118fc53015", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:04.983803Z", - "iopub.status.busy": "2023-11-20T15:42:04.983615Z", - "iopub.status.idle": "2023-11-20T15:42:04.993798Z", - "shell.execute_reply": "2023-11-20T15:42:04.993227Z" - }, "papermill": { "duration": 0.018191, "end_time": "2023-11-20T15:42:04.995323", @@ -400,12 +358,6 @@ "execution_count": 8, "id": "9ce32b94-87b1-4608-91ae-38d2b2176fbd", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.008785Z", - "iopub.status.busy": "2023-11-20T15:42:05.008297Z", - "iopub.status.idle": "2023-11-20T15:42:05.133169Z", - "shell.execute_reply": "2023-11-20T15:42:05.132734Z" - }, "papermill": { "duration": 0.13258, "end_time": "2023-11-20T15:42:05.133957", @@ -442,12 +394,6 @@ "execution_count": 9, "id": "a4e3f6ff-e904-4dd2-8cb0-63ce1d9ee390", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.149896Z", - "iopub.status.busy": "2023-11-20T15:42:05.149521Z", - "iopub.status.idle": "2023-11-20T15:42:05.152095Z", - "shell.execute_reply": "2023-11-20T15:42:05.151707Z" - }, "papermill": { "duration": 0.014974, "end_time": "2023-11-20T15:42:05.152824", @@ -484,12 +430,6 @@ "execution_count": 10, "id": "1b869c31-11c5-4d1b-81cc-3eec5df478b1", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.169177Z", - "iopub.status.busy": "2023-11-20T15:42:05.168688Z", - "iopub.status.idle": "2023-11-20T15:42:05.176073Z", - "shell.execute_reply": "2023-11-20T15:42:05.175425Z" - }, "papermill": { "duration": 0.012977, "end_time": "2023-11-20T15:42:05.176938", @@ -514,12 +454,6 @@ "execution_count": 11, "id": "3c01b5d7-f94a-448f-9b55-ac334497865f", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.185466Z", - "iopub.status.busy": "2023-11-20T15:42:05.185077Z", - "iopub.status.idle": "2023-11-20T15:42:05.189947Z", - "shell.execute_reply": "2023-11-20T15:42:05.189444Z" - }, "papermill": { "duration": 0.010105, "end_time": "2023-11-20T15:42:05.190811", @@ -540,12 +474,6 @@ "execution_count": 12, "id": "8bb5c902-7f6d-439e-863e-7588159a23ca", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.199263Z", - "iopub.status.busy": "2023-11-20T15:42:05.198946Z", - "iopub.status.idle": "2023-11-20T15:42:05.203118Z", - "shell.execute_reply": "2023-11-20T15:42:05.202524Z" - }, "papermill": { "duration": 0.009354, "end_time": "2023-11-20T15:42:05.203954", @@ -576,12 +504,6 @@ "execution_count": 13, "id": "677299f5-6906-4068-94fa-156cf54ee487", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.212620Z", - "iopub.status.busy": "2023-11-20T15:42:05.212197Z", - "iopub.status.idle": "2023-11-20T15:42:05.219813Z", - "shell.execute_reply": "2023-11-20T15:42:05.219367Z" - }, "papermill": { "duration": 0.01286, "end_time": "2023-11-20T15:42:05.220607", @@ -676,12 +598,6 @@ "execution_count": 14, "id": "e5f89c44-b7d3-4fba-b325-806887d538d7", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.229060Z", - "iopub.status.busy": "2023-11-20T15:42:05.228898Z", - "iopub.status.idle": "2023-11-20T15:42:05.382160Z", - "shell.execute_reply": "2023-11-20T15:42:05.381744Z" - }, "papermill": { "duration": 0.159255, "end_time": "2023-11-20T15:42:05.383709", @@ -718,12 +634,6 @@ "execution_count": 15, "id": "ed27b36e-6da9-44db-98b8-7f60b9ded22b", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.404847Z", - "iopub.status.busy": "2023-11-20T15:42:05.404752Z", - "iopub.status.idle": "2023-11-20T15:42:05.407644Z", - "shell.execute_reply": "2023-11-20T15:42:05.407270Z" - }, "papermill": { "duration": 0.015908, "end_time": "2023-11-20T15:42:05.408864", @@ -763,12 +673,6 @@ "execution_count": 16, "id": "d7ebe017-5ae6-4d4b-94b7-3367d96626ce", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.446435Z", - "iopub.status.busy": "2023-11-20T15:42:05.446257Z", - "iopub.status.idle": "2023-11-20T15:42:05.452245Z", - "shell.execute_reply": "2023-11-20T15:42:05.451660Z" - }, "papermill": { "duration": 0.017549, "end_time": "2023-11-20T15:42:05.453599", @@ -793,12 +697,6 @@ "execution_count": 17, "id": "3e491c19-2a36-436f-a5f8-e2dcc405304c", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.472229Z", - "iopub.status.busy": "2023-11-20T15:42:05.471864Z", - "iopub.status.idle": "2023-11-20T15:42:05.476824Z", - "shell.execute_reply": "2023-11-20T15:42:05.476269Z" - }, "papermill": { "duration": 0.015932, "end_time": "2023-11-20T15:42:05.478110", @@ -819,12 +717,6 @@ "execution_count": 18, "id": "1fbcaa46-7bc0-4a4c-8d9d-88c0fde82168", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.497508Z", - "iopub.status.busy": "2023-11-20T15:42:05.497076Z", - "iopub.status.idle": "2023-11-20T15:42:05.500916Z", - "shell.execute_reply": "2023-11-20T15:42:05.500510Z" - }, "papermill": { "duration": 0.014885, "end_time": "2023-11-20T15:42:05.502317", @@ -855,12 +747,6 @@ "execution_count": 19, "id": "9103bafa-218d-4bed-aaa5-603855efccce", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.518497Z", - "iopub.status.busy": "2023-11-20T15:42:05.518158Z", - "iopub.status.idle": "2023-11-20T15:42:05.525425Z", - "shell.execute_reply": "2023-11-20T15:42:05.525003Z" - }, "papermill": { "duration": 0.014383, "end_time": "2023-11-20T15:42:05.526198", @@ -955,12 +841,6 @@ "execution_count": 20, "id": "c6dd608a-8389-44f4-b042-10a67c6b913d", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.536329Z", - "iopub.status.busy": "2023-11-20T15:42:05.536164Z", - "iopub.status.idle": "2023-11-20T15:42:05.651584Z", - "shell.execute_reply": "2023-11-20T15:42:05.651256Z" - }, "papermill": { "duration": 0.122491, "end_time": "2023-11-20T15:42:05.653440", @@ -997,12 +877,6 @@ "execution_count": 21, "id": "5a996e5a-d5e4-4369-a577-c9db247cef21", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.676503Z", - "iopub.status.busy": "2023-11-20T15:42:05.676416Z", - "iopub.status.idle": "2023-11-20T15:42:05.679092Z", - "shell.execute_reply": "2023-11-20T15:42:05.678740Z" - }, "papermill": { "duration": 0.015754, "end_time": "2023-11-20T15:42:05.680310", @@ -1059,12 +933,6 @@ "execution_count": 22, "id": "603dae3d-0fbe-4fe0-8639-181ba6f13a20", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.739905Z", - "iopub.status.busy": "2023-11-20T15:42:05.739483Z", - "iopub.status.idle": "2023-11-20T15:42:05.746259Z", - "shell.execute_reply": "2023-11-20T15:42:05.745832Z" - }, "papermill": { "duration": 0.015066, "end_time": "2023-11-20T15:42:05.747143", @@ -1103,12 +971,6 @@ "execution_count": 23, "id": "0109f1d9-22ff-42fd-8bf8-ab84f449cbbd", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.789350Z", - "iopub.status.busy": "2023-11-20T15:42:05.789192Z", - "iopub.status.idle": "2023-11-20T15:42:05.797545Z", - "shell.execute_reply": "2023-11-20T15:42:05.797140Z" - }, "papermill": { "duration": 0.015054, "end_time": "2023-11-20T15:42:05.798329", @@ -1163,12 +1025,6 @@ "execution_count": 24, "id": "55ecad23-cf11-4ed5-a81d-c7faa16ad8b9", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-20T15:42:05.809867Z", - "iopub.status.busy": "2023-11-20T15:42:05.809487Z", - "iopub.status.idle": "2023-11-20T15:42:09.164387Z", - "shell.execute_reply": "2023-11-20T15:42:09.164057Z" - }, "papermill": { "duration": 3.363718, "end_time": "2023-11-20T15:42:09.167366", @@ -1242,7 +1098,7 @@ " )\n", "\n", " plt.savefig(\n", - " OUTPUT_FIGURE_DIR / \"clusters.png\",\n", + " OUTPUT_FIGURE_DIR / \"clusters.svg\",\n", " # rasterized=True,\n", " dpi=300,\n", " bbox_inches=\"tight\",\n", @@ -1271,7 +1127,12 @@ "metadata": { "jupytext": { "cell_metadata_filter": "all,-execution,-papermill,-trusted", - "notebook_metadata_filter": "-jupytext.text_representation.jupytext_version" + "notebook_metadata_filter": "-jupytext.text_representation.jupytext_version", + "text_representation": { + "extension": ".py", + "format_name": "percent", + "format_version": "1.3" + } }, "kernelspec": { "display_name": "Python 3 (ipykernel)", diff --git a/nbs/99_manuscript/misc/py/01-data_with_substructures.py b/nbs/99_manuscript/misc/py/01-data_with_substructures.py index cf8eee20..28d2748c 100644 --- a/nbs/99_manuscript/misc/py/01-data_with_substructures.py +++ b/nbs/99_manuscript/misc/py/01-data_with_substructures.py @@ -256,7 +256,7 @@ def get_cm_line_points(x, y, max_parts, parts): ) plt.savefig( - OUTPUT_FIGURE_DIR / "clusters.png", + OUTPUT_FIGURE_DIR / "clusters.svg", # rasterized=True, dpi=300, bbox_inches="tight",