From d157dd4529f719cd8ed9d49b256eadd43de69f2d Mon Sep 17 00:00:00 2001 From: Kyle Scully Date: Thu, 25 Apr 2024 09:24:39 -0700 Subject: [PATCH] fix(embeddings): revert to previous color --- .../embeddings_clustering.ipynb | 14 ++++++++++++-- pyproject.toml | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/moderne_visualizations_misc/embeddings_clustering.ipynb b/moderne_visualizations_misc/embeddings_clustering.ipynb index c723d70..56dc88e 100644 --- a/moderne_visualizations_misc/embeddings_clustering.ipynb +++ b/moderne_visualizations_misc/embeddings_clustering.ipynb @@ -57,7 +57,17 @@ ") # as string so the colors and legend are discrete\n", "df.sort_values(by=\"kmeans\", inplace=True)\n", "\n", - "colors = palette.generate_colors(best_k)\n", + "custom_palette = [\n", + " palette.__moderne_color_map[\"red\"][\"main\"],\n", + " palette.__moderne_color_map[\"yellow\"][\"main\"],\n", + " palette.__moderne_color_map[\"green\"][\"main\"],\n", + " palette.__moderne_color_map[\"blue\"][\"main\"],\n", + " palette.__moderne_color_map[\"indigo\"][\"main\"],\n", + " palette.__moderne_color_map[\"red\"][700],\n", + " palette.__moderne_color_map[\"yellow\"][700],\n", + "]\n", + "\n", + "colors = custom_palette[:best_k]\n", "\n", "fig = px.scatter(\n", " df,\n", @@ -89,7 +99,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.11.4" } }, "nbformat": 4, diff --git a/pyproject.toml b/pyproject.toml index 6ed99c5..416cafc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ authors = [ ] license = { text = "Apache-2.0" } dependencies = [ - "code-data-science==2.1.0", + "code-data-science==2.1.1", "graphviz==0.20.1", "ipython==8.13.0", "matplotlib==3.7.1",