{"id":1924,"date":"2015-02-24T23:15:58","date_gmt":"2015-02-24T14:15:58","guid":{"rendered":"http:\/\/daily.belltail.jp\/?p=1924"},"modified":"2015-02-25T00:07:15","modified_gmt":"2015-02-24T15:07:15","slug":"matplotlib%e3%82%84skimage%e3%81%aeimshow%e3%81%a8%e3%81%8b%e3%81%a7%e3%82%a6%e3%82%a3%e3%83%b3%e3%83%89%e3%82%a6%e3%81%8c%e5%85%a8%e3%81%8f%e8%a1%a8%e7%a4%ba%e3%81%95%e3%82%8c%e3%81%aa%e3%81%84","status":"publish","type":"post","link":"https:\/\/daily.belltail.jp\/?p=1924","title":{"rendered":"matplotlib\u3084skimage\u306eimshow\u3068\u304b\u3067\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u5168\u304f\u8868\u793a\u3055\u308c\u306a\u3044\u306a\u3089backend\u3092\u5909\u3048\u3066\u307f\u3088\u3046"},"content":{"rendered":"<p>\u30b5\u30e1\u306f\u3044\u308f\u3086\u308b\u9b5a\u985e\uff08\u5206\u985e\u5b66\u7684\u306b\u306f\u9b5a\u985e\u3068\u3044\u3046\u306e\u306f\u7121\u3044\u3093\u3060\u305d\u3046\u3067\u3059\u306d\uff09\u306b\u542b\u307e\u308c\u307e\u3059\u304c\u3001\u666e\u901a\u306b\u300c\u3055\u304b\u306a\u300d\u3068\u8a00\u3063\u3066\u30a4\u30e1\u30fc\u30b8\u3059\u308b\u3088\u3046\u306a\u9b5a\u3092\u6307\u3059\u5834\u5408\u3001\u300c\u786c\u9aa8\u9b5a\u7db1\u300d\u3068\u547c\u3076\u3068\u3060\u3044\u305f\u3044\u4e00\u81f4\u3059\u308b\u3093\u3060\u305d\u3046\u3067\u3059\u3002\u30b5\u30e1\u3084\u30a8\u30a4\u306f\u300c\u8edf\u9aa8\u9b5a\u7db1\u300d\u306b\u306a\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u30bf\u30c4\u30ce\u30aa\u30c8\u30b7\u30b4\u3082\u786c\u9aa8\u9b5a\u7db1\u306b\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<p>\u3055\u3066\u3001matplotlib\u3084skimage\u306a\u3069\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u3069\u3093\u306a\u63cf\u753b\u7d50\u679c\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u51fa\u305d\u3046\u3068\u3057\u3066\u3082\u3067\u306a\u3044\u3068\u304d\u3002<br \/>\nX\u5468\u308a\u306f\u3061\u3083\u3093\u3068\u3057\u3066\u3044\u308b\u306e\u306b\u3001\u4f8b\u3048\u3070\u3053\u3093\u306a\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3082\u3001\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u8868\u793a\u3055\u308c\u306a\u3044\u5834\u5408\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport skimage.io\r\nimg = skimage.io.imread('\/path\/to\/image.png')\r\nskimage.io.imshow(img)\r\n<\/pre>\n<p>Render backend\u3092\u7591\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nmatplotlib\u304c\u4f55\u3092\u30d9\u30fc\u30b9\u306b\u63cf\u753b\u3092\u884c\u3063\u3066\u3044\u308b\u304b\u306b\u3088\u308a\u3001\u7d75\u306e\u8cea\u3084\u51fa\u529b\u65b9\u5f0f\u3084\u51fa\u529b\u5148\u304c\u5909\u308f\u308a\u307e\u3059\u3002<br \/>\n\u73fe\u5728\u306eRender backend\u3092\u8abf\u3079\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n&gt;&gt;&gt; print matplotlib.get_backend()\r\nagg\r\n<\/pre>\n<p>\u7121\u5370\u306eAGG\u306f\u3001\u753b\u9762\u3078\u306e\u51fa\u529b\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306abackends\u3092\u3001&#8221;noninteractive backends&#8221;\u3068\u547c\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n<p>>><br \/>\n<em>Here is a summary of the matplotlib renderers (there is an eponymous backed for each; these are non-interactive backends, capable of writing to a file):<br \/>\n[http:\/\/matplotlib.org\/faq\/usage_faq.html:title=Usage \u2014 Matplotlib 1.4.3 documentation]<br \/>\n<\/em><br \/>\n<<\n\n\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u753b\u9762\u3078\u306e\u51fa\u529b\u306b\u3082\u4f7f\u3048\u308b\u3082\u306e\"interactive backends\"\u3092render backend\u306b\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u3087\u3046\u3002\nbackend\u306e\u5909\u66f4\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u5185\u3067\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u30db\u30f3\u30c8\u306b\u6700\u521d\u306b\u3084\u3089\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u9762\u5012\u3067\u3059\u3002\n\u305d\u3053\u3067\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\n\nmatplotlib\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3057\u51fa\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070pyenv\u3092\u4f7f\u3063\u3066\u3044\u305f\u3089\u4e0b\u8a18\u306e\u3088\u3046\u306a\u304b\u3093\u3058\u3067\u51fa\u529b\u3055\u308c\u307e\u3059\u3002\n[python]\n&gt;&gt;&gt; matplotlib.matplotlib_fname()\nu'\/your\/home\/.pyenv\/versions\/2.7.9\/lib\/python2.7\/site-packages\/matplotlib-1.4.2-py2.7-linux-x86_64.egg\/matplotlib\/mpl-data\/matplotlibrc'\n[\/python]\n\n\u3067\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304d\u63db\u3048\u307e\u3059\u3002\n\n[text]\n - backend      : agg\n + backend      : Qt4Agg\n[\/text]\n\ninteractive backend\u3067\u3042\u308c\u3070\u4f55\u3067\u3082OK\u3067\u3059\u3002Agg\u304c\u3064\u3044\u3066\u308b\u3084\u3064\u304c\u304a\u3059\u3059\u3081\u3067\u3059\u3002\n\u307e\u305f\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u4e8b\u524d\u306b\u5165\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n\u4f8b\u3048\u3070Qt4Agg\u306e\u5834\u5408\u306fPyQt\u3084PySide\u304c\u3001GTKAgg\u306e\u5834\u5408\u306fPyGTK\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002\n\n\u8abf\u3079\u308c\u3070\u3059\u3050\u306a\u3093\u3067\u3059\u3051\u3069\u3082\u3001backend\u306b\u306finteractive\u3068noninteractive\u304c\u3042\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306b\u306a\u3063\u3066\u3044\u308b\u7121\u5370Agg\u304cGUI\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u306a\u3044\u3068\u3044\u3046\u306e\u304c\u30cf\u30de\u308a\u30dd\u30a4\u30f3\u30c8\u3067\u3057\u305f\u3002\npyenv\u74b0\u5883\u306bpip\u3067\u5165\u308c\u305f\u308f\u3051\u3067\u3059\u304c\u3001\u914d\u5e03\u3057\u3066\u3044\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u3063\u3066\u306f\u6700\u521d\u304b\u3089interactive backend\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308b\u3088\u3046\u3067\u3059\u3002\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b5\u30e1\u306f\u3044\u308f\u3086\u308b\u9b5a\u985e\uff08\u5206\u985e\u5b66\u7684\u306b\u306f\u9b5a\u985e\u3068\u3044\u3046\u306e\u306f\u7121\u3044\u3093\u3060\u305d\u3046\u3067\u3059\u306d\uff09\u306b\u542b\u307e\u308c\u307e\u3059\u304c\u3001\u666e\u901a\u306b\u300c\u3055\u304b\u306a\u300d\u3068\u8a00\u3063\u3066\u30a4\u30e1\u30fc\u30b8\u3059\u308b\u3088\u3046\u306a\u9b5a\u3092\u6307\u3059\u5834\u5408\u3001\u300c\u786c\u9aa8\u9b5a\u7db1\u300d\u3068\u547c\u3076\u3068\u3060\u3044\u305f\u3044\u4e00\u81f4\u3059\u308b\u3093\u3060\u305d\u3046\u3067\u3059\u3002\u30b5\u30e1\u3084\u30a8\u30a4\u306f\u300c\u8edf\u9aa8\u9b5a\u7db1\u300d\u306b\u306a\u308a\u307e [&hellip;]<\/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":[48,49,38,10],"class_list":["post-1924","post","type-post","status-publish","format-standard","hentry","category-1","tag-python","tag-49","tag-38","tag-10"],"_links":{"self":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/1924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1924"}],"version-history":[{"count":0,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/1924\/revisions"}],"wp:attachment":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}