{"id":878,"date":"2020-12-28T16:14:04","date_gmt":"2020-12-28T07:14:04","guid":{"rendered":"http:\/\/ringo-apple-web.com\/?p=878"},"modified":"2020-12-28T16:14:27","modified_gmt":"2020-12-28T07:14:27","slug":"sympy%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e5%be%ae%e5%88%86%e7%a9%8d%e5%88%86%e3%81%97%e3%81%9f%e7%b5%90%e6%9e%9c%e3%82%92%e3%82%b0%e3%83%a9%e3%83%95","status":"publish","type":"post","link":"http:\/\/ringo-apple-web.com\/?p=878","title":{"rendered":"sympy\u3092\u4f7f\u3063\u3066\u5fae\u5206\u7a4d\u5206\u3057\u305f\u7d50\u679c\u3092\u30b0\u30e9\u30d5\u306b"},"content":{"rendered":"\n<p>sympy\u3067\u8a08\u7b97\u3057\u3066\u3001sympy\u3067\u63cf\u5199\u3059\u308b<\/p>\n\n\n\n<p>\u307e\u305a\u30e2\u30b8\u30e5\u30a4\u30f3\u30b9\u30b3<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plane\"><code>% pip install sympy\n% pip install matplotlib<\/code><\/pre><\/div>\n\n\n\n<p>sympy\u3060\u3051\u3060\u3068\u3001\u5b9f\u884c\u6642\u306b\u300cValueError: The TextBackend supports only one graph per Plot.\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059<\/p>\n\n\n\n<p>\u300cx **3 + 200\u300d\u3092\u5fae\u5206\u3059\u308b\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b<br>\u300cdiff\u300d\u95a2\u6570\u3067\u5fae\u5206\u304c\u3067\u304d\u308b<br>\u300cf_org\u300d\u304c\u5fae\u5206\u524d\u3067\u3001\u300cf_diff\u300d\u304c\u5fae\u5206\u5f8c<br>\u5fae\u5206\u5f8c\u306e\u7dda\u306f\u8d64\u306b\u6307\u5b9a\u3059\u308b<\/p>\n\n\n\n<p>\u203b\u300c**3\u300d\u306f3\u4e57\u3068\u3044\u3046\u610f\u5473<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>% cat bibun_work.py\nimport sympy as sp\n \nif __name__ == &#39;__main__&#39;:\n  x = sp.symbols(&#39;x&#39;)   # \u5909\u6570\u5b9a\u7fa9\n  f_org = x **3 + 200   # \u5fae\u5206\u524d\n  f_diff = sp.diff(f_org, x)   # \u5fae\u5206\u5f8c\n\n  p = sp.plot(f_org,f_diff,(x,-10,10), legend = True, show = False)\n\n  p[1].line_color = &quot;red&quot;   # \u5fae\u5206\u5f8c\u306f\u8d64\u3044\u7dda\u3067\u8868\u793a\u3059\u308b\n  p.show()\n<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"768\" height=\"670\" src=\"http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.42.58-768x670-1.png\" alt=\"\" class=\"wp-image-879\" srcset=\"http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.42.58-768x670-1.png 768w, http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.42.58-768x670-1-300x262.png 300w, http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.42.58-768x670-1-696x607.png 696w, http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.42.58-768x670-1-481x420.png 481w, http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.42.58-768x670-1-133x116.png 133w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p>\u300cx**2 \/ 3\u300d\u3092\u7a4d\u5206\u3059\u308b\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b<br>\u300cintegrate\u300d\u95a2\u6570\u3067\u7a4d\u5206\u304c\u3067\u304d\u308b<br>\u300cf_org\u300d\u304c\u7a4d\u5206\u524d\u3067\u3001\u300cf_inte\u300d\u304c\u7a4d\u5206\u5f8c<br>\u7a4d\u5206\u5f8c\u306e\u7dda\u306f\u8d64\u306b\u6307\u5b9a\u3059\u308b<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plane\"><code>% cat bibun_work.py\nimport sympy as sp\n \nif __name__ == &#39;__main__&#39;:\n  x = sp.symbols(&#39;x&#39;)   # \u5909\u6570\u5b9a\u7fa9\n  f_org = x**2 \/ 3   # \u7a4d\u5206\u524d\n  f_inte = sp.integrate(f_org, x)   # \u7a4d\u5206\u5f8c\n\n  p = sp.plot(f_org,f_inte,(x,-10,10), legend = True, show = False)\n  p[1].line_color = &quot;red&quot;   # \u7a4d\u5206\u5f8c\u306f\u8d64\u3044\u7dda\u3067\u8868\u793a\u3059\u308b\n  p.show()\n<\/code><\/pre><\/div>\n\n\n\n<p>\u3055\u3061\u3047\u3001\u3058\u3063\u3053\u30fc<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plane\"><code>% python bibun_work.py\n<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"768\" height=\"670\" src=\"http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.45.47-768x670-1.png\" alt=\"\" class=\"wp-image-880\" srcset=\"http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.45.47-768x670-1.png 768w, http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.45.47-768x670-1-300x262.png 300w, http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.45.47-768x670-1-696x607.png 696w, http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.45.47-768x670-1-481x420.png 481w, http:\/\/ringo-apple-web.com\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-03-06-at-23.45.47-768x670-1-133x116.png 133w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p>\u5fae\u5206\u7a4d\u5206\u3057\u305f\u7d50\u679c\u3092\u30b0\u30e9\u30d5\u306b\u3057\u3061\u3083\u3046\u56de\u304a\u3061\u307e\u3044<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sympy\u3067\u8a08\u7b97\u3057\u3066\u3001sympy\u3067\u63cf\u5199\u3059\u308b \u307e\u305a\u30e2\u30b8\u30e5\u30a4\u30f3\u30b9\u30b3 sympy\u3060\u3051\u3060\u3068\u3001\u5b9f\u884c\u6642\u306b\u300cValueError: The TextBackend supports only one graph per Plot.\u300d\u3068 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":880,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[63,18],"tags":[],"_links":{"self":[{"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=\/wp\/v2\/posts\/878"}],"collection":[{"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=878"}],"version-history":[{"count":3,"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=\/wp\/v2\/posts\/878\/revisions"}],"predecessor-version":[{"id":883,"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=\/wp\/v2\/posts\/878\/revisions\/883"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=\/wp\/v2\/media\/880"}],"wp:attachment":[{"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=878"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ringo-apple-web.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}