{"id":10204,"date":"2020-08-12T11:45:34","date_gmt":"2020-08-12T02:45:34","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=10204"},"modified":"2020-08-13T10:26:50","modified_gmt":"2020-08-13T01:26:50","slug":"matplotlib%ec%97%90%ec%84%9c-%ec%95%a0%eb%8b%88%eb%a9%94%ec%9d%b4%ec%85%98-%ea%b7%b8%eb%9e%98%ed%94%84-%ed%91%9c%ed%98%84%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=10204","title":{"rendered":"matplotlib\uc5d0\uc11c \uc560\ub2c8\uba54\uc774\uc158 \uadf8\ub798\ud504 \ud45c\ud604\ud558\uae30"},"content":{"rendered":"<p>matplotlib\ub294 \ub2e4\uc591\ud55c \uadf8\ub798\ud504\ub97c \ud45c\ud604\ud560 \uc218 \uc788\ub294\ub370\uc694. \uc815\uc801\uc778 \uadf8\ub798\ud504 \ubfd0\ub9cc \uc544\ub2c8\ub77c \ub370\uc774\ud130\uac00 \uc2e4\uc2dc\uac04\uc73c\ub85c \ubcc0\uacbd\ub418\uba74 \uadf8\uc5d0 \ub300\ud55c \ub3d9\uc801\uc778 \uadf8\ub798\ud504\ub3c4 \ud45c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 \uc608\uc2dc\ub85c\uc368 \uadf8 \uacb0\uacfc\uc785\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2020\/08\/matplot_ani.gif\" alt=\"\" width=\"607\" height=\"649\" class=\"aligncenter size-full wp-image-10205\" \/><\/p>\n<p>\uc704\uc758 \uc608\uc2dc\ub97c \uc2e4\uc81c\ub85c \uad6c\ud604\ud558\uae30 \uc704\ud55c \ucf54\ub4dc\ub97c \uc0b4\ud3b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 \uba3c\uc800 \uadf8\ub798\ud504\ub85c \ud45c\ud604\ud558\uae30 \uc704\ud55c \ub370\uc774\ud130\uac00 \ud544\uc694\ud55c\ub370, \uc544\ub798\uc758 \ucf54\ub4dc\ub294 \ub370\uc774\ud130\ub97c \uad6c\uc131\ud558\ub294 \ucf54\ub4dc\uc785\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.animation as animation\r\n\r\ndata = np.random.uniform(0, 1, (64, 75))\r\nX = np.linspace(-1, 1, data.shape[-1])\r\nG = 1.5 * np.exp(-4 * X ** 2)\r\n<\/pre>\n<p>\uc608\uc2dc\uc758 \uacb0\uacfc\ub97c \ubcf4\uba74, 65\uac1c\uc758 \uaebd\uc740\uc120 \uadf8\ub798\ud504\ub85c \uad6c\uc131\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 \uc774 \uaebd\uc740\uc120 \uadf8\ub798\ud504\ub97c \uad6c\uc131\ud558\ub294 \ucf54\ub4dc\uc785\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\nimport matplotlib.pyplot as plt\r\n\r\nfig = plt.figure(figsize=(8, 8))\r\nax = plt.subplot(111, frameon=False)\r\n\r\nlines = []\r\nfor i in range(data.shape[0]):\r\n    xscale = 1 - i \/ 200.0\r\n    lw = 1 - i \/ 100.0\r\n    line, = ax.plot(xscale * X, i + G * data[i], color=\"k\", lw=lw)\r\n    lines.append(line)\r\n<\/pre>\n<p>\uc774\uc81c \ucd5c\uc885\uc801\uc73c\ub85c \ub370\uc774\ud130\ub97c 0.2\ucd08\ub9c8\ub2e4 \ubcc0\uacbd\ud558\uace0, \ubcc0\uacbd\ub41c \ub370\uc774\ud130\uc5d0 \ub300\ud55c \uadf8\ub798\ud504\ub97c \uc5c5\ub370\uc774\ud2b8\ud558\uba74\uc11c \ub9c8\uce58 \ub3d9\uc801\uc73c\ub85c \uadf8\ub798\ud504\uac00 \uc6c0\uc9c1\uc774\ub294 \ud6a8\uacfc\ub97c \ub0b4\ub294 \ucf54\ub4dc\ub97c \uc0b4\ud3b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">\r\nimport matplotlib.animation as animation\r\n\r\nax.set_xticks([])\r\nax.set_yticks([])\r\n\r\nax.text(0.5, 1.0, \"MATPLOTLIB \", transform=ax.transAxes, ha=\"right\", va=\"bottom\", color=\"k\", \r\n        family=\"sans-serif\", fontweight=\"bold\", fontsize=16)\r\nax.text(0.5, 1.0, \"DYNAMIC\", transform=ax.transAxes, ha=\"left\", va=\"bottom\", color=\"k\",\r\n        family=\"sans-serif\", fontweight=\"light\", fontsize=20)\r\n\r\ndef update(*args):\r\n    data[:, 1:] = data[:, :-1]\r\n    data[:, 0] = np.random.uniform(0, 1, len(data))\r\n\r\n    for i in range(len(data)):\r\n        lines[i].set_ydata(i + G * data[i])\r\n\r\nanim = animation.FuncAnimation(fig, update, interval=200)\r\nplt.show()\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>matplotlib\ub294 \ub2e4\uc591\ud55c \uadf8\ub798\ud504\ub97c \ud45c\ud604\ud560 \uc218 \uc788\ub294\ub370\uc694. \uc815\uc801\uc778 \uadf8\ub798\ud504 \ubfd0\ub9cc \uc544\ub2c8\ub77c \ub370\uc774\ud130\uac00 \uc2e4\uc2dc\uac04\uc73c\ub85c \ubcc0\uacbd\ub418\uba74 \uadf8\uc5d0 \ub300\ud55c \ub3d9\uc801\uc778 \uadf8\ub798\ud504\ub3c4 \ud45c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 \uc608\uc2dc\ub85c\uc368 \uadf8 \uacb0\uacfc\uc785\ub2c8\ub2e4. \uc704\uc758 \uc608\uc2dc\ub97c \uc2e4\uc81c\ub85c \uad6c\ud604\ud558\uae30 \uc704\ud55c \ucf54\ub4dc\ub97c \uc0b4\ud3b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 \uba3c\uc800 \uadf8\ub798\ud504\ub85c \ud45c\ud604\ud558\uae30 \uc704\ud55c \ub370\uc774\ud130\uac00 \ud544\uc694\ud55c\ub370, \uc544\ub798\uc758 \ucf54\ub4dc\ub294 \ub370\uc774\ud130\ub97c \uad6c\uc131\ud558\ub294 \ucf54\ub4dc\uc785\ub2c8\ub2e4. import numpy as np import matplotlib.pyplot as plt import matplotlib.animation &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=10204\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;matplotlib\uc5d0\uc11c \uc560\ub2c8\uba54\uc774\uc158 \uadf8\ub798\ud504 \ud45c\ud604\ud558\uae30&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,131],"tags":[],"class_list":["post-10204","post","type-post","status-publish","format-standard","hentry","category-opensource","category-python"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/10204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10204"}],"version-history":[{"count":2,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/10204\/revisions"}],"predecessor-version":[{"id":10207,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/10204\/revisions\/10207"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10204"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}