{"id":164,"date":"2008-03-21T06:38:26","date_gmt":"2008-03-21T06:38:26","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=164"},"modified":"2015-09-09T20:11:11","modified_gmt":"2015-09-09T20:11:11","slug":"can-i-use-pylab-figures-in-reproducible-documents","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2008\/03\/21\/can-i-use-pylab-figures-in-reproducible-documents\/","title":{"rendered":"Can I use Pylab figures in reproducible documents?"},"content":{"rendered":"<p>Now you can. See an <a href=\"\/RSF\/book\/sep\/fkamo\/paper_html\/node4.html\">example<\/a>, where a figure originally generated with <a href=\"http:\/\/www.mathworks.com\/products\/matlab\/\">Matlab<\/a> is replicated with <a href=\"http:\/\/matplotlib.sourceforge.net\/\">Pylab<\/a>. <\/p>\n<p><img decoding=\"async\" src=\"\/RSF\/book\/sep\/fkamo\/Pylab\/Fig\/pystrali.png\" alt=\"\" title=\"\" \/> <\/p>\n<p>To prepare your figures, follow the rules similar to <a href=\"\/blog\/2006\/05\/23\/reproducible-matlab-and-mathematica-figures-and-spectral-factorization\/\">those for Matlab and Mathematica figures<\/a>:<\/p>\n<ol>\n<li>Create a directory called <strong>Pylab<\/strong>.<\/li>\n<li>Put figure-generating python scripts in this directory.<\/li>\n<li>Each script should have a <strong>.py<\/strong> suffix<\/li>\n<li>Each script should end with a command like <\/li>\n<\/ol>\n<div class=\"code-box\"><div class=\"code-title\"><i class=\"fa fa-code\"><\/i> <div class=\"pull-right\"><a href=\"#\" class=\"btn btn-default btn-xs toggle-code\" data-toggle=\"tooltip\" title=\"Toggle code\"><i class=\"fa fa-toggle-up\"><\/i><\/a><\/div><\/div><pre ><code>savefig('junk_py.eps');\n<\/code><\/pre><\/div>\n<p>(the name <strong>junk_py.eps<\/strong> is important.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now you can. See an example, where a figure originally generated with Matlab is replicated with Pylab. To prepare your figures, follow the rules similar to those for Matlab and Mathematica figures: Create a directory called Pylab. Put figure-generating python scripts in this directory. Each script should have a .py suffix Each script should end [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-164","post","type-post","status-publish","format-standard","hentry","category-faq"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/comments?post=164"}],"version-history":[{"count":3,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/164\/revisions"}],"predecessor-version":[{"id":22537,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/164\/revisions\/22537"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}