Skip to content

Commit

Permalink
Shorter colormap
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Oct 2, 2024
1 parent 24e8595 commit 8a4b46d
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions notebooks/EPM_syllables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -510,23 +510,33 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_410776/1508767421.py:13: RuntimeWarning:\n",
"\n",
"More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). Consider using `matplotlib.pyplot.close()`.\n",
"\n"
]
},
{
"data": {
"text/plain": [
"Text(0.5, 1.0, 'ethogram')"
]
},
"execution_count": 18,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a279886afe134442b7b590ec7a871ce1",
"model_id": "96f04dc6041c4993848fe65258711e67",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -552,11 +562,9 @@
"source": [
"# prepare colormap for syllables\n",
"list_colors = (\n",
" plt.get_cmap(\"tab10\").colors\n",
" + plt.get_cmap(\"tab20b\").colors\n",
" + plt.get_cmap(\"Set3\").colors\n",
" + plt.get_cmap(\"Set1\").colors\n",
") # 51 colors, should be enough for the total number of syllables detected\n",
" plt.get_cmap(\"tab10\").colors # 10 colors\n",
" + plt.get_cmap(\"tab20b\").colors # 20 colors\n",
") # 30 colors, should be enough for the total number of syllables detected\n",
"\n",
"# select maximum frames to plot\n",
"frames_max_to_plot = 1000\n",
Expand Down

0 comments on commit 8a4b46d

Please sign in to comment.