{"id":51,"date":"2024-10-14T14:45:00","date_gmt":"2024-10-14T14:45:00","guid":{"rendered":"https:\/\/newmenon.com\/?p=51"},"modified":"2024-10-14T14:45:00","modified_gmt":"2024-10-14T14:45:00","slug":"matplotlib-%ed%95%9c%ea%b8%80-%ed%8f%b0%ed%8a%b8-%ea%b9%a8%ec%a7%90feat-%ed%8f%b0%ed%8a%b8-%ea%b2%bd%eb%a1%9c-%ec%b0%be%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/newmenon.com\/?p=51","title":{"rendered":"matplotlib \ud55c\uae00 \ud3f0\ud2b8 \uae68\uc9d0(feat. \ud3f0\ud2b8 \uacbd\ub85c \ucc3e\uae30)"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>\ud30c\uc774\uc36c \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 pandas\ub85c \ub370\uc774\ud130 \ubd84\uc11d\uc744 \ud558\ub294 \uacbd\uc6b0\uc5d0 matplotlib\uc744 \ud65c\uc6a9\ud574\uc11c \uc2dc\uac01\ud654 \uc2dc\ud0a4\ub294 \uacbd\uc6b0\uac00 \ub9ce\uc740\ub370  matplotlib \uc5d0 \ud55c\uae00\uc744 \uc4f0\ub2e4\ubcf4\uba74 \uadf8\ub798\ud504\uc704\uc758 \uae00\uc790\uac00 \uae38\ucb49\ud55c \ub124\ubaa8\ub85c \uae68\uc838\uc11c \ub098\uc624\ub294 \uacbd\uc6b0\uac00 \uc885\uc885 \uc788\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"880\" src=\"https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-11-1024x880.png\" alt=\"\" class=\"wp-image-55\" srcset=\"https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-11-1024x880.png 1024w, https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-11-300x258.png 300w, https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-11-768x660.png 768w, https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-11.png 1206w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\uc774\ub294 \ud3f0\ud2b8\ub97c \ud55c\uae00\ub85c \uc9c0\uc815\ud574\uc8fc\uc5b4\uc57c \ud574\uc11c \uadf8\ub7f0\ub370 \ud3f0\ud2b8 \uacbd\ub85c\uac00 \ub3c4\ud1b5\uc5b4\ub514\uc5d0 \uc788\ub294\uc9c0 \ubaa8\ub974\uaca0\ub2e4\uba74 \uc544\ub798 \ucf54\ub4dc\ub97c \uc8fc\ud53c\ud130 \ub178\ud2b8\ubd81\uc5d0\uc11c \ub3cc\ub824\ubcf4\uc790. \uc0c1\ub2f9\ud788 \ub9ce\uc740 \ud3f0\ud2b8\ub4e4\uc774 \uc228\uc5b4 \uc788\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.font_manager as fm\nfor font in fm.findSystemFonts(fontpaths=None, fontext='ttf'):\n    print(font)<\/code><\/pre>\n\n\n\n<p>\uadf8 \uc911\uc5d0 \ub098\ub214\uccb4\ub4e4\uc774\ub098 \ub178\ud1a0 \uc0b0\uc2a4 \ucf54\ub9ac\uc544 \uac19\uc740 \uc560\ub4e4\uc744 \uacbd\ub85c\ub97c \uc9c0\uc815\ud574\uc11c \uc4f0\uba74 \uadf8\ub798\ud504\uac00 \uc815\uc0c1\uc801\uc73c\ub85c \ub098\uc624\ub294 \uac83\uc744 \ud655\uc778 \ud560 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\uc544\ub798\ub294 matplotlib\uc5d0\uc11c \uae68\uc9c4 \ud55c\uae00\uc744 \uc801\uc6a9\uc2dc\ud0a4\ub294 \ucf54\ub4dc\uc774\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Set Korean font (NanumGothic)\n# Ensure the font path is correct, or use a font installed on your system\nfont_path = '\/Users\/****\/Library\/Fonts\/NanumSquareB.ttf'  # Example path for Linux\nfontprop = fm.FontProperties(fname=font_path)\n\n# Plot your data\nlogs_per_weekday.plot(kind='bar')\n\n# Set the title and labels with the proper font\nplt.title('\uc694\uc77c\ubcc4 \ub85c\uadf8 \uae30\ub85d', fontproperties=fontprop)\nplt.xlabel('\uc694\uc77c', fontproperties=fontprop)\nplt.ylabel('\ub85c\uadf8 \uc218', fontproperties=fontprop)\n\n# Show the plot\nplt.show()<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"874\" src=\"https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-10-1024x874.png\" alt=\"\" class=\"wp-image-54\" srcset=\"https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-10-1024x874.png 1024w, https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-10-300x256.png 300w, https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-10-768x656.png 768w, https:\/\/newmenon.com\/wp-content\/uploads\/2024\/10\/image-10.png 1204w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\ud30c\uc774\uc36c \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 pandas\ub85c \ub370\uc774\ud130 \ubd84\uc11d\uc744 \ud558\ub294 \uacbd\uc6b0\uc5d0 matplotlib\uc744 \ud65c\uc6a9\ud574\uc11c \uc2dc\uac01\ud654 \uc2dc\ud0a4\ub294 \uacbd\uc6b0\uac00 \ub9ce\uc740\ub370 matplotlib \uc5d0&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/newmenon.com\/index.php?rest_route=\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/newmenon.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/newmenon.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/newmenon.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/newmenon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=51"}],"version-history":[{"count":1,"href":"https:\/\/newmenon.com\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":56,"href":"https:\/\/newmenon.com\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions\/56"}],"wp:attachment":[{"href":"https:\/\/newmenon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/newmenon.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/newmenon.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}