{"id":6052,"date":"2025-12-31T15:38:59","date_gmt":"2025-12-31T06:38:59","guid":{"rendered":"https:\/\/secondlife.lol\/?p=6052"},"modified":"2025-12-31T15:39:34","modified_gmt":"2025-12-31T06:39:34","slug":"seaborn-palette-guide","status":"publish","type":"post","link":"https:\/\/secondlife.lol\/ja\/seaborn-palette-guide\/","title":{"rendered":"seaborn palette \uc644\uc804 \uc815\ubcf5: \uc2dc\uac01\ud654 \ud004\ub9ac\ud2f0\ub97c \uc62c\ub9ac\ub294 \uc0c9\uc0c1 \ud314\ub808\ud2b8 \ud65c\uc6a9\ubc95"},"content":{"rendered":"<style>.kb-image6052_bdae77-41.kb-image-is-ratio-size, .kb-image6052_bdae77-41 .kb-image-is-ratio-size{max-width:512px;width:100%;}.wp-block-kadence-column > .kt-inside-inner-col > .kb-image6052_bdae77-41.kb-image-is-ratio-size, .wp-block-kadence-column > .kt-inside-inner-col > .kb-image6052_bdae77-41 .kb-image-is-ratio-size{align-self:unset;}.kb-image6052_bdae77-41 figure{max-width:512px;}.kb-image6052_bdae77-41 .image-is-svg, .kb-image6052_bdae77-41 .image-is-svg img{width:100%;}.kb-image6052_bdae77-41 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image6052_bdae77-41\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"512\" height=\"338\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-95.png\" alt=\"seaborn palette \uc644\uc804 \uc815\ubcf5\" class=\"kb-img wp-image-6053\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-95.png 512w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-95-300x198.png 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-95-18x12.png 18w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\uac19\uc740 \uadf8\ub798\ud504\ub77c\ub3c4 <strong>\uc5b4\ub5a4 \uc0c9\uc744 \uc4f0\ub290\ub0d0<\/strong>\uc5d0 \ub530\ub77c \uc644\uc804\ud788 \ub2e4\ub978 \ub290\ub08c\uc744 \uc90d\ub2c8\ub2e4. <br><a href=\"https:\/\/secondlife.lol\/what-is-seaborn-visualization-remodeling\/\" data-type=\"post\" data-id=\"6028\">seaborn<\/a> palette \uc774 \uc0c9\uac10 \ubb38\uc81c\ub97c \uac00\uc7a5 \uc138\ub828\ub418\uac8c \ud574\uacb0\ud574 \uc904 \uc218 \uc788\uc8e0. <br>\uc5b4\ub5bb\uac8c \uc0ac\uc6a9\ud558\ub290\ub0d0\uc5d0 \ub530\ub77c \ucc28\ubd84\ud55c \ubd84\uc11d \ub9ac\ud3ec\ud2b8\ucc98\ub7fc \ubcf4\uc77c \uc218\ub3c4 \uc788\uace0,<br>\ub208\ub9cc \uc544\ud508 \uc778\ud3ec\uadf8\ub798\ud53d\uc774 \ub418\uc5b4\ubc84\ub9b4 \uc218\ub3c4 \uc788\uc8e0.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">seaborn palette(\uc2dc\ubcf8 \ud314\ub808\ud2b8)\ub294 \ub9d0 \uadf8\ub300\ub85c \u201c\uc0c9\uc0c1 \ud314\ub808\ud2b8 \uc124\uc815 \ub3c4\uad6c\u201d\uc778\ub370,<br>\ub2e8\uc21c\ud788 \uc0c9 \uba87 \uac1c\ub97c \uace0\ub974\ub294 \uc218\uc900\uc774 \uc544\ub2c8\ub77c,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\ubc94\uc8fc\ud615 \ub370\uc774\ud130\uc5d0 \uc5b4\uc6b8\ub9ac\ub294 <strong>\uc9c8\uc801(qualitative) palette<\/strong>,<\/li>\n\n\n\n<li>\ud06c\uace0 \uc791\uc74c\uc744 \uac15\uc870\ud558\ub294 <strong>\uc5f0\uc18d\ud615(sequential) palette<\/strong>,<\/li>\n\n\n\n<li>\uc591\uadf9\ub2e8(+, -) \ucc28\uc774\ub97c \ubcf4\uc5ec\uc8fc\ub294 <strong>\ubc1c\uc0b0\ud615(diverging) palette<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\ucc98\ub7fc <strong>\ub370\uc774\ud130\uc758 \uc758\ubbf8\uc5d0 \ub9de\ub294 \uc0c9 \uad6c\uc131<\/strong>\uc744 \ud55c \ubc88\uc5d0 \ubd88\ub7ec\uc62c \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br>\uadf8\ub798\uc11c \uc2dc\uac01\ud654\uc5d0\uc11c \uac00\uc7a5 \uc911\uc694\ud55c \u201c\uc0c9\uc758 \uc5ed\ud560\u201d\uc744<br>\uc2dc\ubcf8 \ud314\ub808\ud2b8 \ud558\ub098\ub85c \ud06c\uac8c \uac1c\uc120\ud560 \uc218 \uc788\uc5b4\uc694.<\/p>\n\n\n<style>.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{color:var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{color:var(--global-palette2, #2B6CB0);font-size:28px;font-weight:regular;font-style:normal;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list{color:var(--global-palette1, #3182CE);line-height:2em;font-weight:regular;font-style:normal;margin-top:var(--global-kb-spacing-sm, 1.5rem);margin-right:0px;margin-bottom:0px;margin-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list .kb-table-of-contents__entry:hover{color:var(--global-palette6, #718096);}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}@media all and (max-width: 767px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}<\/style>\n\n\n<h2 class=\"wp-block-heading\">seaborn palette\uac00 \ud544\uc694\ud55c \ub300\ud45c\uc801\uc778 \uc21c\uac04\ub4e4<\/h2>\n\n\n<style>.kb-image6052_7374b2-60 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image6052_7374b2-60\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"600\" height=\"399\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-96-600x399.png\" alt=\"seaborn palette image\" class=\"kb-img wp-image-6054\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-96-600x399.png 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-96-300x199.png 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-96-768x510.png 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-96-18x12.png 18w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-96.png 1049w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">seaborn palette\uac00 \ud2b9\ud788 \ube5b\ub098\ub294 \uc0c1\ud669\uc744 \uba87 \uac00\uc9c0\ub85c \uc815\ub9ac\ud574\ubcf4\uba74:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\ubc94\uc8fc\ud615 \ub9c9\ub300\uadf8\ub798\ud504\uac00 \u201c\ubb34\uc9c0\uac1c \uc9c0\uc625\u201d\uc774 \ub418\uc5c8\uc744 \ub54c\n<ul class=\"wp-block-list\">\n<li>\uce74\ud14c\uace0\ub9ac\uac00 5~8\uac1c \uc815\ub3c4 \uc788\uc744 \ub54c,<br>\uc544\ubb34 \uc0c9\uc774\ub098 \uc11e\uc5b4 \uc4f0\uba74 \uadf8\ub798\ud504\uac00 \uc815\uc2e0\uc5c6\uc5b4\uc9d1\ub2c8\ub2e4.<\/li>\n\n\n\n<li>\uc774\ub54c \uc2dc\ubcf8 \ud314\ub808\ud2b8\uc5d0\uc11c <code>color_palette(\"Set2\")<\/code>, <code>\"Pastel1\"<\/code> \uac19\uc740<br><strong>qualitative seaborn palette<\/strong>\ub97c \uc4f0\uba74<br>\uc11c\ub85c \uad6c\ubd84\uc740 \uc798 \ub418\uc9c0\ub9cc \uacfc\ud558\uac8c \ud280\uc9c0 \uc54a\ub294 \uc0c9 \uc870\ud569\uc744 \uc790\ub3d9\uc73c\ub85c \uc5bb\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\uac12\uc758 \ud06c\uace0 \uc791\uc74c\uc744 \ubd80\ub4dc\ub7fd\uac8c \ud45c\ud604\ud558\uace0 \uc2f6\uc744 \ub54c\n<ul class=\"wp-block-list\">\n<li>\uc608: \ub9e4\ucd9c \uad6c\uac04, \uc810\uc218, \ud655\ub960 \ub4f1 \uc5f0\uc18d\uc801\uc778 \uc218\uce58<\/li>\n\n\n\n<li><code>seaborn palette<\/code>\uc5d0\uc11c <code>\"Blues\"<\/code>, <code>\"Greens\"<\/code> \uac19\uc740 <strong>sequential \ud314\ub808\ud2b8<\/strong>\ub97c \uace0\ub974\uba74<br>\uc9c4\ud55c \uc0c9 \u2192 \ub192\uc740 \uac12, \uc5f0\ud55c \uc0c9 \u2192 \ub0ae\uc740 \uac12\uc774\ub77c\ub294 \ud750\ub984\uc774 \uc790\uc5f0\uc2a4\ub7fd\uac8c \uc804\ub2ec\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\uae30\uc900\uc810(0)\uc744 \uc911\uc2ec\uc73c\ub85c \uc591\u00b7\uc74c\uc758 \ucc28\uc774\ub97c \ubcf4\uc5ec\uc904 \ub54c\n<ul class=\"wp-block-list\">\n<li>\uc608: \uc218\uc775 vs \uc190\uc2e4, \ud3c9\uade0 \ub300\ube44 +\/\u2013 \ud3b8\ucc28<\/li>\n\n\n\n<li><code>\"coolwarm\"<\/code>, <code>\"RdBu\"<\/code> \uac19\uc740 <strong>diverging seaborn \ud314\ub808\ud2b8<\/strong>\ub97c \uc4f0\uba74<br>0\uc744 \uae30\uc900\uc73c\ub85c \uc591\uc218\ub294 \ub530\ub73b\ud55c \uc0c9, \uc74c\uc218\ub294 \ucc28\uac00\uc6b4 \uc0c9\ucc98\ub7fc<br>\u201c\uc5b4\ub290 \ucabd\uc774 \ub354 \uc704\ud5d8\/\uc88b\uc740 \uc0c1\ud0dc\uc778\uc9c0\u201d\ub97c \uc9c1\uad00\uc801\uc73c\ub85c \ud45c\uc2dc\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">seaborn palette\uc758 \uae30\ubcf8 \uc0ac\uc6a9 \ud750\ub984<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\uc2e4\uc81c \ucf54\ub4dc\ub85c \ub4e4\uc5b4\uac00\uba74 \ubcf4\ud1b5 \uc774\ub7f0 \ud750\ub984\uc744 \ub9ce\uc774 \uc501\ub2c8\ub2e4.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\ud314\ub808\ud2b8 \uac1d\uccb4\ub97c \ubbf8\ub9ac \ub9cc\ub4e4\uae30 <code>import seaborn as sns palette = sns.color_palette(\"Set2\", n_colors=6)<\/code><\/li>\n\n\n\n<li>seaborn \uadf8\ub798\ud504\uc5d0 \uc9c1\uc811 \ub118\uae30\uae30 <code>sns.barplot(data=df, x=\"category\", y=\"value\", palette=palette)<\/code><\/li>\n\n\n\n<li>\uc804\uc5ed \uc2a4\ud0c0\uc77c\ub85c \ud55c \ubc88\uc5d0 \uc801\uc6a9\ud558\uae30 <code>sns.set_palette(\"Set2\")<\/code><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\uc5ec\uae30\uc11c <strong>\ud575\uc2ec \ud3ec\uc778\ud2b8\ub294 \ub450 \uac00\uc9c0<\/strong>\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\uc2dc\ubcf8 \ud314\ub808\ud2b8\ub294 \u201c\uc0c9 \uc774\ub984 \ubb38\uc790\uc5f4\u201d \ub610\ub294 \u201c\ud314\ub808\ud2b8 \uac1d\uccb4\u201d \ud615\ud0dc\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4.<\/li>\n\n\n\n<li>\uadf8\ub798\ud504\ub9c8\ub2e4 palette\ub97c \ub2e4\ub974\uac8c \uc904 \uc218\ub3c4 \uc788\uace0,<br><code>sns.set_palette()<\/code>\ub85c <strong>\uc804\uccb4 \uc2a4\ud0c0\uc77c\uc744 \ud55c \ubc88\uc5d0 \ud1b5\uc77c<\/strong>\ud560 \uc218\ub3c4 \uc788\ub2e4.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\uadf8\ub798\uc11c \uc2e4\ubb34 \ud504\ub85c\uc81d\ud2b8\uc5d0\uc11c\ub294 \ud504\ub85c\uc81d\ud2b8\ub9c8\ub2e4 \u201c\uc6b0\ub9ac \ube0c\ub79c\ub4dc \ub290\ub08c\u201d\uc5d0 \ub9de\ub294<br>\ub300\ud45c\uc801\uc778 \uc2dc\ubcf8 \ud314\ub808\ud2b8 \uc138\ud2b8\ub97c \uba3c\uc800 \uc815\ud574\ub450\uace0,<br>\ubaa8\ub4e0 \ub178\ud2b8\ubd81\u00b7\ub9ac\ud3ec\ud2b8\uc5d0\uc11c \uadf8 \ud314\ub808\ud2b8\ub9cc \uc4f0\ub3c4\ub85d \ud569\uc758\ud558\ub294 \uacbd\uc6b0\ub3c4 \ub9ce\uc2b5\ub2c8\ub2e4.<br>\uc774\ub807\uac8c \ud558\uba74 \uc5ec\ub7ec \uc0ac\ub78c\uc774 \ub9cc\ub4e0 \uadf8\ub798\ud504\ub3c4 \uc804\uccb4\uc801\uc73c\ub85c <strong>\ud1a4\uc774 \ub9de\ub294 \uc77c\uad00\ub41c \ub514\uc790\uc778<\/strong>\uc744 \uac16\uac8c \ub418\uc8e0.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\uc2dc\ubcf8 \ud314\ub808\ud2b8\ub97c \uc798 \uc4f0\uae30 \uc704\ud55c \uc2e4\ubb34 \uac10\uac01<\/h2>\n\n\n<style>.kb-image6052_f67906-27 .kb-image-has-overlay:after{opacity:0.3;border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-right-radius:20px;border-bottom-left-radius:20px;}.kb-image6052_f67906-27 img.kb-img, .kb-image6052_f67906-27 .kb-img img{border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-right-radius:20px;border-bottom-left-radius:20px;box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}<\/style>\n<div class=\"wp-block-kadence-image kb-image6052_f67906-27\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"576\" height=\"576\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97.jpg\" alt=\"qualitative seaborn palette image\" class=\"kb-img wp-image-6055\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97.jpg 576w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-300x300.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-150x150.jpg 150w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-12x12.jpg 12w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><figcaption>(\ucd9c\ucc98: <a href=\"https:\/\/seaborn.pydata.org\/tutorial\/color_palettes.html\" target=\"_blank\" rel=\"noopener\">seaborn website<\/a>)<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\uc544\ub798\ub294\u00a0<strong>\ub3d9\uc77c\ud55c \ub370\uc774\ud130<\/strong>\ub85c\u00a0<strong>6\uac00\uc9c0 \ub2e4\ub978 \ud314\ub808\ud2b8<\/strong>\ub97c \uc801\uc6a9\ud55c \uc2e4\uc804 \uc608\uc2dc\uc785\ub2c8\ub2e4. <br>\uadf8\ub798\ud504\uc758 \ub290\ub08c\uc744 \ubcf4\uc2dc\uace0 \ucde8\uc0ac\uc120\ud0dd\ud558\uc2dc\uba74 \ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted language-python\">import matplotlib.pyplot as plt<br>import matplotlib.font_manager as fm<br>import seaborn as sns<br>import pandas as pd<br><br># 1) \ud3f0\ud2b8 \ud0d0\uc0c9 (macOS)<br>font_path = None<br>for f in fm.findSystemFonts():<br>    if \"AppleGothic\" in f or \"Apple SD Gothic\" in f:<br>        font_path = f<br>        break<br><br>if font_path:<br>    font_name = fm.FontProperties(fname=font_path).get_name()<br>    print(\"\u2705 \uc0ac\uc6a9 \ud3f0\ud2b8:\", font_name)<br>else:<br>    font_name = \"Apple SD Gothic Neo\"<br>    print(\"\u26a0\ufe0f AppleGothic \ubabb\ucc3e\uc74c \u2192\", font_name, \"\uc2dc\ub3c4\")<br><br># 2) \u2705 seaborn \ud14c\ub9c8 + rc\ub97c \uac19\uc774 \uc9c0\uc815 (\uc911\uc694)<br>sns.set_theme(<br>    style=\"whitegrid\",<br>    rc={<br>        \"font.family\": font_name,          # \u2190 \ud3f0\ud2b8 \uace0\uc815<br>        \"axes.unicode_minus\": False<br>    }<br>)<br><br># (\ucd94\uac00 \uc548\uc804\uc7a5\uce58) matplotlib\uc5d0\ub3c4 \ud55c \ubc88 \ub354 \uace0\uc815<br>plt.rcParams[\"font.family\"] = font_name<br>plt.rcParams[\"axes.unicode_minus\"] = False<br><br># \ud14c\uc2a4\ud2b8 \ub370\uc774\ud130<br>df = pd.DataFrame({<br>    \"\uc720\ud615\": [\"\uc548\uc804\", \"\uc704\uc0dd\", \"\ud658\uacbd\", \"\ud488\uc9c8\", \"\uae30\ud0c0\", \"\uae30\uacc4\uace0\uc7a5\"],<br>    \"\uac74\uc218\": [25, 12, 8, 15, 5, 30]<br>})<br><br>palettes = [\"Set2\", \"Pastel1\", \"tab10\", \"Set3\", \"muted\", \"bright\"]<br><br>plt.figure(figsize=(12, 8))<br>for i, pal in enumerate(palettes, 1):<br>    ax = plt.subplot(2, 3, i)<br><br>    sns.barplot(<br>        data=df, x=\"\uc720\ud615\", y=\"\uac74\uc218\",<br>        hue=\"\uc720\ud615\", dodge=False,<br>        palette=sns.color_palette(pal, n_colors=len(df))<br>    )<br><br>    # legend \uc81c\uac70 (seaborn \ubc84\uc804 \ud638\ud658)<br>    leg = ax.get_legend()<br>    if leg:<br>        leg.remove()<br><br>    ax.set_title(f\"{pal}: \ud55c\uae00 \uc644\ubcbd \ud14c\uc2a4\ud2b8\", fontsize=12, weight=\"bold\")<br>    ax.tick_params(axis=\"x\", rotation=45)<br>    ax.set_ylim(0, 35)<br><br>plt.tight_layout()<br>plt.show()<\/pre>\n\n\n<style>.kb-image6052_f34797-e1 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image6052_f34797-e1\"><figure class=\"aligncenter size-medium_large\"><img decoding=\"async\" width=\"768\" height=\"510\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-1-768x510.jpg\" alt=\"\ub3d9\uc77c\ud55c \ub370\uc774\ud130\ub85c\u00a06\uac00\uc9c0 \ub2e4\ub978 \ud314\ub808\ud2b8 \uc774\ubbf8\uc9c0\" class=\"kb-img wp-image-6056\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-1-768x510.jpg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-1-300x199.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-1-600x398.jpg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-1-18x12.jpg 18w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-1.jpg 1180w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\uadf8\ub9ac\uace0 \uc2dc\ubcf8 \ud314\ub808\ud2b8\ub97c \uace0\ub97c \ub54c \uae30\uc5b5\ud574\ub450\uba74 \uc88b\uc740 \uac04\ub2e8\ud55c \uae30\uc900\uc744 \uc815\ub9ac\ud574\ubcf4\uba74<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\ubc94\uc8fc\ud615(\uce74\ud14c\uace0\ub9ac)<\/strong> \u2192 Set2, Set3, Pastel, tab10 \uac19\uc740 <strong>qualitative seaborn \ud314\ub808\ud2b8<\/strong><\/li>\n\n\n\n<li><strong>\uc21c\uc11c\ub97c \uac00\uc9c0\ub294 \uc218\uce58<\/strong> \u2192 Blues, Greens, Oranges \uac19\uc740 <strong>sequential seaborn <strong>\ud314\ub808\ud2b8<\/strong><\/strong><\/li>\n\n\n\n<li><strong>\uae30\uc900\uac12 \uae30\uc900 +\/\u2013<\/strong> \u2192 coolwarm, RdBu, BrBG \uac19\uc740 <strong>diverging seaborn <strong>\ud314\ub808\ud2b8<\/strong><\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774 \uae30\uc900\ub9cc \uae30\uc5b5\ud574\ub3c4<br>\u201c\uc0c9\uc744 \uc544\ubb34\ub807\uac8c\ub098 \uace0\ub974\ub294 \ub2e8\uacc4\u201d\uc5d0\uc11c<br>\u201c\ub370\uc774\ud130\uc758 \uc758\ubbf8\uc5d0 \ub9de\ub294 \uc0c9\uc744 \uc120\ud0dd\ud558\ub294 \ub2e8\uacc4\u201d\ub85c \ud55c \ub2e8\uacc4 \uc62c\ub77c\uac08 \uc218 \uc788\uc5b4\uc694.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>import numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nfrom matplotlib.colors import Normalize, TwoSlopeNorm\nfrom matplotlib.cm import ScalarMappable\nimport matplotlib as mpl\n\n# =========================\n# 0) \ub79c\ub364 \ub370\uc774\ud130 \uc0dd\uc131 (\uc7ac\ud604 \uac00\ub2a5)\n# =========================\nrng = np.random.default_rng(42)\n\n# -----------------------------\n# 1) \ubc94\uc8fc\ud615(category) -> \uc218\uce58\ud615(value) : \uc9c8\uc801(qualitative) \ud314\ub808\ud2b8\n# -----------------------------\ncats = &#91;f\"Cat {i}\" for i in range(1, 9)]\ndf_qual = pd.DataFrame({\n    \"category\": cats,\n    \"value\": rng.integers(10, 60, size=len(cats))\n})\n\n# -----------------------------\n# 2) \ubc94\uc8fc\ud615(item) -> \uc218\uce58\ud615(value) : \uc21c\ucc28(sequential) \ud314\ub808\ud2b8 (\uac12 \ud06c\uae30 \uae30\ubc18)\n# -----------------------------\nitems = &#91;f\"Item {i}\" for i in range(1, 11)]\nvals_seq = rng.normal(loc=50, scale=12, size=len(items)).clip(10, 90)\ndf_seq = pd.DataFrame({\"item\": items, \"value\": vals_seq}).sort_values(\"value\")\n\n# -----------------------------\n# 3) \ubc94\uc8fc\ud615(metric) -> \uc218\uce58\ud615(delta) : \ubc1c\uc0b0(diverging) \ud314\ub808\ud2b8 (0\uc744 \uc911\uc2ec\uc73c\ub85c +\/-)\n# -----------------------------\nnames = &#91;f\"Metric {i}\" for i in range(1, 11)]\nvals_div = rng.normal(loc=0, scale=20, size=len(names)).clip(-50, 50)\ndf_div = pd.DataFrame({\"metric\": names, \"delta\": vals_div}).sort_values(\"delta\")\n\n# =========================\n# 1) \uadf8\ub9bc(figure) \uc0dd\uc131\n# =========================\nsns.set_theme(style=\"whitegrid\")\nfig, axes = plt.subplots(1, 3, figsize=(18, 6), constrained_layout=True)\n\n# =========================================================\n# A. \uc9c8\uc801(qualitative) \ud314\ub808\ud2b8: Set2 \/ Set3 \/ Pastel1 \/ tab10 \ub4f1\n#    \u2705 Seaborn v0.14 \ub300\ube44: palette \uc0ac\uc6a9 \uc2dc hue\ub97c \ubc18\ub4dc\uc2dc \uc9c0\uc815\n# =========================================================\nqual_palette_name = \"Set2\"  # \"Set3\", \"Pastel1\", \"tab10\" \ub4f1\uc73c\ub85c \ubc14\uafd4\ub3c4 \ub428\nqual_colors = sns.color_palette(qual_palette_name, n_colors=len(df_qual))\n\nsns.barplot(\n    data=df_qual,\n    x=\"category\",\n    y=\"value\",\n    hue=\"category\",       # \u2705 \uacbd\uace0 \ud574\uacb0 \ud575\uc2ec: x \ubcc0\uc218\ub97c hue\ub85c \uc9c0\uc815\n    palette=qual_colors,  # \uce74\ud14c\uace0\ub9ac\ubcc4 \uc0c9\uc0c1\n    legend=False,         # \u2705 legend \uc81c\uac70(\uacbd\uace0 \ud574\uacb0 \uad8c\uc7a5 \ubc29\uc2dd)\n    dodge=False,          # hue\uac00 \uc788\uc9c0\ub9cc \ub9c9\ub300\ub97c \uacb9\uce58\uc9c0 \uc54a\uac8c(\uac19\uc740 \ud56d\ubaa9 1\uac1c \ub9c9\ub300\ucc98\ub7fc)\n    ax=axes&#91;0]\n)\n\naxes&#91;0].set_title(f\"Qualitative palette: {qual_palette_name}\")\naxes&#91;0].tick_params(axis=\"x\", rotation=45)\n\n# =========================================================\n# B. \uc21c\ucc28(sequential) \ud314\ub808\ud2b8: Blues \/ Greens \/ Oranges \ub4f1\n#    - \ub9c9\ub300 \uc0c9\uc744 '\uac12 \ud06c\uae30'\uc5d0 \ub530\ub77c \uc5f0\ud558\uac8c\/\uc9c4\ud558\uac8c \ubd80\uc5ec\n#    \u2705 Matplotlib get_cmap() deprec. \ud574\uacb0: mpl.colormaps.get_cmap \uc0ac\uc6a9\n#    \u2705 Seaborn v0.14 \ub300\ube44: palette \uc0ac\uc6a9 \uc2dc hue \uc9c0\uc815\n# =========================================================\nseq_cmap_name = \"Blues\"  # \"Greens\", \"Oranges\" \ub4f1\uc73c\ub85c \ubcc0\uacbd \uac00\ub2a5\nseq_cmap = mpl.colormaps.get_cmap(seq_cmap_name)  # \u2705 deprec \ud574\uacb0\n\n# \uac12 \ubc94\uc704\ub97c &#91;0,1]\ub85c \uc815\uaddc\ud654\ud558\uae30 \uc704\ud55c \uc124\uc815\nnorm_seq = Normalize(vmin=df_seq&#91;\"value\"].min(), vmax=df_seq&#91;\"value\"].max())\n\n# \uac01 \uac12\uc5d0 \ub300\uc751\ud558\ub294 RGBA \uc0c9\uc0c1\uc744 \ub9cc\ub4e4\uae30\nseq_colors = &#91;seq_cmap(norm_seq(v)) for v in df_seq&#91;\"value\"]]\n\nsns.barplot(\n    data=df_seq,\n    x=\"item\",\n    y=\"value\",\n    hue=\"item\",           # \u2705 \uacbd\uace0 \ud574\uacb0: x\ub97c hue\ub85c \uc9c0\uc815\n    palette=seq_colors,   # \uac12 \uae30\ubc18\uc73c\ub85c \ub9cc\ub4e0 \uc0c9 \ub9ac\uc2a4\ud2b8\n    legend=False,         # \u2705 \ubc94\ub840 \uc81c\uac70\n    dodge=False,\n    ax=axes&#91;1]\n)\n\naxes&#91;1].set_title(f\"Sequential palette: {seq_cmap_name} (by value)\")\naxes&#91;1].tick_params(axis=\"x\", rotation=45)\n\n# \uc21c\ucc28 \ud314\ub808\ud2b8 \uceec\ub7ec\ubc14(\uc0c9=\uac12 \ud06c\uae30)\ub97c \ud568\uaed8 \ud45c\uc2dc\nsm_seq = ScalarMappable(norm=norm_seq, cmap=seq_cmap)\nsm_seq.set_array(&#91;])\ncbar_seq = fig.colorbar(sm_seq, ax=axes&#91;1], fraction=0.05, pad=0.02)\ncbar_seq.set_label(\"Value\")\n\n# =========================================================\n# C. \ubc1c\uc0b0(diverging) \ud314\ub808\ud2b8: coolwarm \/ RdBu \/ BrBG \ub4f1\n#    - 0\uc744 \uc911\uc2ec\uc73c\ub85c \uc74c\uc218\/\uc591\uc218\uc5d0 \ub530\ub77c \uc0c9\uc774 \uac08\ub77c\uc9d0\n#    \u2705 Matplotlib get_cmap() deprec \ud574\uacb0\n#    \u2705 Seaborn v0.14 \ub300\ube44: palette \uc0ac\uc6a9 \uc2dc hue \uc9c0\uc815\n# =========================================================\ndiv_cmap_name = \"coolwarm\"  # \"RdBu\", \"BrBG\" \ub4f1 \uac00\ub2a5\ndiv_cmap = mpl.colormaps.get_cmap(div_cmap_name)  # \u2705 deprec \ud574\uacb0\n\n# 0\uc744 \uc911\uc2ec\uac12(vcenter)\uc73c\ub85c \ub450\uace0 \uc591\/\uc74c\uc218 \uc0c9\uc744 \ub300\uce6d\uc801\uc73c\ub85c \ub9e4\ud551\nnorm_div = TwoSlopeNorm(\n    vmin=df_div&#91;\"delta\"].min(),\n    vcenter=0,\n    vmax=df_div&#91;\"delta\"].max()\n)\n\ndiv_colors = &#91;div_cmap(norm_div(v)) for v in df_div&#91;\"delta\"]]\n\nsns.barplot(\n    data=df_div,\n    x=\"metric\",\n    y=\"delta\",\n    hue=\"metric\",         # \u2705 \uacbd\uace0 \ud574\uacb0\n    palette=div_colors,   # +\/- \uac12\uc5d0 \ub530\ub77c \ub9cc\ub4e0 \uc0c9 \ub9ac\uc2a4\ud2b8\n    legend=False,\n    dodge=False,\n    ax=axes&#91;2]\n)\n\naxes&#91;2].axhline(0, linewidth=1)\naxes&#91;2].set_title(f\"Diverging palette: {div_cmap_name} (center=0)\")\naxes&#91;2].tick_params(axis=\"x\", rotation=45)\n\n# \ubc1c\uc0b0 \ud314\ub808\ud2b8 \uceec\ub7ec\ubc14(\uc0c9=delta \ud06c\uae30)\ub97c \ud568\uaed8 \ud45c\uc2dc\nsm_div = ScalarMappable(norm=norm_div, cmap=div_cmap)\nsm_div.set_array(&#91;])\ncbar_div = fig.colorbar(sm_div, ax=axes&#91;2], fraction=0.05, pad=0.02)\ncbar_div.set_label(\"Delta (\u00b1)\")\n\nplt.show()<\/code><\/pre>\n\n\n<style>.kb-image6052_eb96b2-c2 .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image6052_eb96b2-c2\"><figure class=\"aligncenter size-medium_large\"><img decoding=\"async\" width=\"768\" height=\"259\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-2-768x259.jpg\" alt=\"output image\" class=\"kb-img wp-image-6058\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-2-768x259.jpg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-2-300x101.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-2-600x203.jpg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-2-18x6.jpg 18w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-97-2.jpg 1200w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\uac19\uc740 \uadf8\ub798\ud504\ub77c\ub3c4 \uc5b4\ub5a4 \uc0c9\uc744 \uc4f0\ub290\ub0d0\uc5d0 \ub530\ub77c \uc644\uc804\ud788 \ub2e4\ub978 \ub290\ub08c\uc744 \uc90d\ub2c8\ub2e4&#8230;.<\/p>","protected":false},"author":3,"featured_media":6053,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[3],"tags":[1316,1317,1322,1315,1321,1303,1323,1318,1319,1320],"class_list":["post-6052","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-coding","tag-diverging-palette","tag-qualitative-palette","tag-seaborn-color-palette","tag-seaborn-palette","tag-seaborn--","tag-seaborn-","tag-1323","tag-1318","tag-1319","tag-1320"],"taxonomy_info":{"category":[{"value":3,"label":"\ud30c\uc774\uc36c(Python)"}],"post_tag":[{"value":1316,"label":"diverging palette"},{"value":1317,"label":"qualitative palette"},{"value":1322,"label":"seaborn color palette"},{"value":1315,"label":"seaborn palette"},{"value":1321,"label":"Seaborn \uc0c9\uc0c1 \ud314\ub808\ud2b8"},{"value":1303,"label":"Seaborn \uc2dc\uac01\ud654"},{"value":1323,"label":"\uadf8\ub798\ud504 \uc0c9\uc0c1 \ucd5c\uc801\ud654"},{"value":1318,"label":"\ub370\uc774\ud130 \uc2dc\uac01\ud654 \ub514\uc790\uc778"},{"value":1319,"label":"\uceec\ub7ec \ud314\ub808\ud2b8 \ud29c\ud1a0\ub9ac\uc5bc"},{"value":1320,"label":"\ud30c\uc774\uc36c \uc2dc\uac01\ud654 \uc0c9\uc0c1"}]},"featured_image_src_large":["https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/12\/image-95.png",512,338,false],"author_info":{"display_name":"TERE","author_link":"https:\/\/secondlife.lol\/ja\/author\/tere\/"},"comment_info":0,"category_info":[{"term_id":3,"name":"\ud30c\uc774\uc36c(Python)","slug":"python-coding","term_group":0,"term_taxonomy_id":3,"taxonomy":"category","description":"","parent":20,"count":119,"filter":"raw","cat_ID":3,"category_count":119,"category_description":"","cat_name":"\ud30c\uc774\uc36c(Python)","category_nicename":"python-coding","category_parent":20}],"tag_info":[{"term_id":1316,"name":"diverging palette","slug":"diverging-palette","term_group":0,"term_taxonomy_id":1316,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":1317,"name":"qualitative palette","slug":"qualitative-palette","term_group":0,"term_taxonomy_id":1317,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":1322,"name":"seaborn color palette","slug":"seaborn-color-palette","term_group":0,"term_taxonomy_id":1322,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":1315,"name":"seaborn palette","slug":"seaborn-palette","term_group":0,"term_taxonomy_id":1315,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":1321,"name":"Seaborn \uc0c9\uc0c1 \ud314\ub808\ud2b8","slug":"seaborn-%ec%83%89%ec%83%81-%ed%8c%94%eb%a0%88%ed%8a%b8","term_group":0,"term_taxonomy_id":1321,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":1303,"name":"Seaborn \uc2dc\uac01\ud654","slug":"seaborn-%ec%8b%9c%ea%b0%81%ed%99%94","term_group":0,"term_taxonomy_id":1303,"taxonomy":"post_tag","description":"","parent":0,"count":5,"filter":"raw"},{"term_id":1323,"name":"\uadf8\ub798\ud504 \uc0c9\uc0c1 \ucd5c\uc801\ud654","slug":"%ea%b7%b8%eb%9e%98%ed%94%84-%ec%83%89%ec%83%81-%ec%b5%9c%ec%a0%81%ed%99%94","term_group":0,"term_taxonomy_id":1323,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":1318,"name":"\ub370\uc774\ud130 \uc2dc\uac01\ud654 \ub514\uc790\uc778","slug":"%eb%8d%b0%ec%9d%b4%ed%84%b0-%ec%8b%9c%ea%b0%81%ed%99%94-%eb%94%94%ec%9e%90%ec%9d%b8","term_group":0,"term_taxonomy_id":1319,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":1319,"name":"\uceec\ub7ec \ud314\ub808\ud2b8 \ud29c\ud1a0\ub9ac\uc5bc","slug":"%ec%bb%ac%eb%9f%ac-%ed%8c%94%eb%a0%88%ed%8a%b8-%ed%8a%9c%ed%86%a0%eb%a6%ac%ec%96%bc","term_group":0,"term_taxonomy_id":1318,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":1320,"name":"\ud30c\uc774\uc36c \uc2dc\uac01\ud654 \uc0c9\uc0c1","slug":"%ed%8c%8c%ec%9d%b4%ec%8d%ac-%ec%8b%9c%ea%b0%81%ed%99%94-%ec%83%89%ec%83%81","term_group":0,"term_taxonomy_id":1320,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts\/6052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/comments?post=6052"}],"version-history":[{"count":3,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts\/6052\/revisions"}],"predecessor-version":[{"id":6060,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts\/6052\/revisions\/6060"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/media\/6053"}],"wp:attachment":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/media?parent=6052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/categories?post=6052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/tags?post=6052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}