{"id":1157,"date":"2020-07-31T17:16:46","date_gmt":"2020-07-31T08:16:46","guid":{"rendered":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/?p=1157"},"modified":"2020-08-02T11:55:29","modified_gmt":"2020-08-02T02:55:29","slug":"macos-%e3%81%ab-gnuplot_kernel-a-jupyter-ipython-kernel-for-gnuplot-%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/1157\/","title":{"rendered":"macOS \u306b gnuplot_kernel \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<h3>\u53c2\u8003<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\uff0cmacOS \u306b <strong>gnuplot_kernel (A Jupyter\/IPython kernel for Gnuplot)<\/strong> \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/has2k1\/gnuplot_kernel\">GitHub &#8211; has2k1\/gnuplot_kernel: A Jupyter\/IPython kernel for gnuplot<\/a><\/li>\n<\/ul>\n<h3>Homebrew<\/h3>\n<p><a href=\"https:\/\/brew.sh\/index_ja\">Homebrew<\/a> \u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u305d\u3057\u3066\uff0c<\/p>\n<pre>brew update; brew upgrade<\/pre>\n<h4>gnuplot<\/h4>\n<pre>brew install gnuplot<\/pre>\n<h4>Python<\/h4>\n<pre>brew install python3\r\npip3 install jupyter jupyterlab<\/pre>\n<p>\u306a\u304a\uff0cmacOS \u3067\u306f\uff0c<code>\/etc\/paths<\/code> \u306e\u6700\u521d\u306b\u4ee5\u4e0b\u3092\u4ed8\u3051\u52a0\u3048\u308b\u3068\uff0c<code>\u20193\u2019<\/code> \u3092\u3064\u3051\u5fd8\u308c\u3066\u3082\u5927\u4e08\u592b\u3002<\/p>\n<pre>% cat \/etc\/paths\r\n\/usr\/local\/opt\/python@3.8\/libexec\/bin\r\n\/usr\/local\/bin\r\n\/usr\/bin\r\n\/bin\r\n\/usr\/sbin\r\n\/sbin<\/pre>\n<pre>% python -V\r\nPython 3.8.5\r\n\r\n% python3 -V\r\nPython 3.8.5\r\n\r\n% pip -V\r\npip 20.1.1 from \/usr\/local\/lib\/python3.8\/site-packages\/pip (python 3.8)\r\n\r\n% pip3 -V\r\npip 20.1.1 from \/usr\/local\/lib\/python3.8\/site-packages\/pip (python 3.8)<\/pre>\n<h3>gnuplot_kernel<\/h3>\n<pre>pip install metakernel\r\npip install gnuplot_kernel\r\npython -m gnuplot_kernel install<\/pre>\n<h3>\u5fae\u8abf\u6574<\/h3>\n<p>\u305d\u306e\u307e\u307e\u3067\u306f\uff0cmacOS \u306e pngcairo \u306e\u554f\u984c\u304b\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7e26\u8ef8\u3084\u51e1\u4f8b\u306e\u5b57\u304c\u6f70\u308c\u3066\u3057\u307e\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1162\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/pngcairo.png\" alt=\"\" width=\"385\" height=\"256\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/pngcairo.png 385w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/pngcairo-300x199.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/pngcairo-360x239.png 360w\" sizes=\"auto, (max-width: 385px) 100vw, 385px\" \/><\/p>\n<p><code>\/usr\/local\/lib\/python3.8\/site-packages\/gnuplot_kernel\/kernel.py<\/code> \u306e\u4ee5\u4e0b\u3092 <code>svg<\/code> \u306b\u3002<\/p>\n<div>\n<pre> -         settings['termspec'] = ('pngcairo size 385, 256'\r\n -                                 ' font \"Arial,10\"')\r\n +         settings['termspec'] = ('svg size 512, 384'\r\n +                                 ' font \"NotoSansMonoCJKjp-Regular.otf,14\"')<\/pre>\n<pre> -         settings['format'] = 'png'\r\n +         settings['format'] = 'svg'<\/pre>\n<p>\u4e0a\u8a18\u3067\u306f\u65e5\u672c\u8a9e\u30d5\u30a9\u30f3\u30c8\u3082\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u3002Noto \u30d5\u30a9\u30f3\u30c8\u3092\u307e\u3060\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\uff0c\u5148\u306b<\/p>\n<pre>brew tap homebrew\/cask-fonts\r\nbrew cask install font-noto-sans-cjk-jp font-noto-serif-cjk-jp font-hackgen<\/pre>\n<p>\u306a\u3069\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304f\u3068\u3088\u3044\u3002<\/p>\n<p>\u53c2\u8003\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/1020\/\">\u65e5\u672c\u8a9e\u7b49\u5e45\u30d5\u30a9\u30f3\u30c8 &#8211; HEROIC 202X<\/a><\/li>\n<\/ul>\n<p>\u6539\u5584\u7d50\u679c\u306f\u4ee5\u4e0b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1171\" src=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/svg-noto1-640x475.png\" alt=\"\" width=\"512\" height=\"380\" srcset=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/svg-noto1-640x475.png 640w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/svg-noto1-300x223.png 300w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/svg-noto1-768x570.png 768w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/svg-noto1-360x267.png 360w, https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-content\/uploads\/sites\/25\/svg-noto1.png 1024w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>\u4f7f\u7528\u4f8b<\/h3>\n<p>Jupyter notebook \u74b0\u5883\u3067\uff0cWeb \u30d6\u30e9\u30a6\u30b6\u3092\u30d5\u30eb\u30b9\u30af\u30ea\u30fc\u30f3\u30fb\u30a8\u30c7\u30a3\u30bf\u306b\u3057\u3066 gnuplot \u304c\u4f7f\u3048\u308b\u306e\u306f\u3042\u308a\u304c\u305f\u3044\u3002\u5b9a\u6570\u3084\u95a2\u6570\u306e\u5b9a\u7fa9\uff0c\u63cf\u753b\u7d50\u679c\u3082\u4fdd\u5b58\u3057\u3066\u304a\u3051\u308b\u3057\u306d\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/home.hirosaki-u.ac.jp\/jupyter\/gnuplot\/\">gnuplot \u306b\u3088\u308b\u30b0\u30e9\u30d5\u4f5c\u6210 &#8211; \u5f18\u524d\u5927\u5b66 Home Sweet Home<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003 \u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\uff0cmacOS \u306b gnuplot_ <a href=\"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/1157\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[16,14,7],"tags":[],"class_list":["post-1157","post","type-post","status-publish","format-standard","hentry","category-gnuplot","category-jupyter","category-macos"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/posts\/1157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/comments?post=1157"}],"version-history":[{"count":15,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/posts\/1157\/revisions"}],"predecessor-version":[{"id":1188,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/posts\/1157\/revisions\/1188"}],"wp:attachment":[{"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/media?parent=1157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/categories?post=1157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/home.hirosaki-u.ac.jp\/heroic-2020\/wp-json\/wp\/v2\/tags?post=1157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}