Skip to content

Commit

Permalink
fix(embeddings): revert to previous color
Browse files Browse the repository at this point in the history
  • Loading branch information
zieka committed Apr 25, 2024
1 parent e19fb24 commit d157dd4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions moderne_visualizations_misc/embeddings_clustering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -89,7 +99,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.11.4"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d157dd4

Please sign in to comment.