{"id":14,"date":"2009-01-27T22:12:11","date_gmt":"2009-01-28T05:12:11","guid":{"rendered":"http:\/\/www.politicaldata.org\/?p=14"},"modified":"2009-09-15T17:41:24","modified_gmt":"2009-09-16T00:41:24","slug":"drawing-graphs-using-tikzpgf-gnuplot","status":"publish","type":"post","link":"https:\/\/www.politicaldata.org\/?p=14","title":{"rendered":"Drawing graphs using tikz\/pgf &#038; gnuplot"},"content":{"rendered":"<p>Combining the <a title=\"Tikz project page\" href=\"http:\/\/sourceforge.net\/projects\/pgf\/\" target=\"_blank\">tikz <\/a>package with <a title=\"gnuplot home\" href=\"http:\/\/www.gnuplot.info\/\" target=\"_blank\">gnuplot <\/a>allows you to plot graphs without ever leaving your favorite editor.\u00c2\u00a0 Adding the tikz package is straightforward as with other LaTeX packages but everytime I run into trouble installing gnuplot.\u00c2\u00a0 As far as I can tell the following steps are sufficient and necessary to get tikz and gnuplot to play nicely together.<\/p>\n<ul>\n<li>Download gnuplot and unzip in some folder, e.g., C:\\gnuplot.\u00c2\u00a0 Subsequently add C:\\gnuplot\\bin\\ as a path to your environment variables.<\/li>\n<li>If you have downloaded the windows version of gnuplot then change the name of the executable from &#8216;wgnuplot.exe&#8217; to &#8216;gnuplot.exe&#8217;.<\/li>\n<li>gnuplot may be prevented from writing in the current directory when it is called by tikz.\u00c2\u00a0 Use the &#8211;enable-write18 switch when compiling your document, e.g., pdflatex &#8211;enable-write18 foo.tex.\u00c2\u00a0 If you use WinEdt, the switch can be added under Options-Executions Modes.\u00c2\u00a0\u00c2\u00a0 Note that the first &#8216;-&#8216; in &#8211;enable-write18 should be two &#8216;-&#8216;.<\/li>\n<li>gnuplot doesn&#8217;t seem to like spaces in filenames.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Combining the tikz package with gnuplot allows you to plot graphs without ever leaving your favorite editor.\u00c2\u00a0 Adding the tikz package is straightforward as with other LaTeX packages but everytime I run into trouble installing gnuplot.\u00c2\u00a0 As far as I can tell the following steps are sufficient and necessary to get tikz and gnuplot to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[12],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-latex"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6tD3-e","_links":{"self":[{"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":3,"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":24,"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/24"}],"wp:attachment":[{"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.politicaldata.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}