{"id":133,"date":"2009-09-16T15:12:05","date_gmt":"2009-09-16T14:12:05","guid":{"rendered":"http:\/\/www.miscdebris.net\/blog\/?p=133"},"modified":"2010-03-25T13:41:30","modified_gmt":"2010-03-25T12:41:30","slug":"install-gnuplot-on-mac-os-x","status":"publish","type":"post","link":"http:\/\/www.miscdebris.net\/blog\/2009\/09\/16\/install-gnuplot-on-mac-os-x\/","title":{"rendered":"Install Gnuplot on Mac OS X"},"content":{"rendered":"<p><strong>I provide another instructions to <a href=\"http:\/\/www.miscdebris.net\/blog\/2010\/03\/25\/install-gnuplot-4-4-0-on-mac-os-x\/\" target=\"_self\">install Gnuplot 4.4.0 compiling it yourself on Mac OS X<\/a>. <\/strong><\/p>\n<p>There are some possibilities to install <a href=\"http:\/\/www.gnuplot.info\" target=\"_blank\">Gnuplot<\/a> on Mac OS X, none of them is &#8220;official&#8221;, since the Gnuplot project doesn&#8217;t provide binaries for Mac OS X. It&#8217;s actually quite easy to configure and compile Gnuplot (i.e. .\/configure; make; make install), but some terminals are not built due to missing dependencies and this makes Gnuplot less powerful.<\/p>\n<p><!--more--><\/p>\n<p>There is some information on the web about running Gnuplot on Mac OS X already (<a href=\"http:\/\/lee-phillips.org\/info\/Macintosh\/gnuplot.html\" target=\"_blank\">http:\/\/lee-phillips.org\/info\/Macintosh\/gnuplot.html<\/a> , <a href=\"http:\/\/maba.wordpress.com\/2006\/08\/02\/scientific-plotting-on-mac-os-x-using-gnuplot-and-plot\/\" target=\"_blank\">http:\/\/maba.wordpress.com\/2006\/08\/02\/scientific-plotting-on-mac-os-x-using-gnuplot-and-plot\/<\/a> ) and there is also <a href=\"http:\/\/www.finkproject.org\/ \" target=\"_blank\">http:\/\/www.finkproject.org\/<\/a> and <a href=\"http:\/\/www.macports.org\/\" target=\"_blank\">http:\/\/www.macports.org\/<\/a> but there is IMO an easier way (though it still needs some work): there is a Gnuplot installer provided by Octave! Here are the instructions:<\/p>\n<ul>\n<li>Download Octave for Mac OS X from the <a href=\"http:\/\/octave.sourceforge.net\/\">Octaveforge homepage<\/a> (latest version at time of writing was 3.2.2).<\/li>\n<li>Open the downloaded dmg file and browse to the Extras folder<\/li>\n<li>Open gnuplot-4.2.5-i386.dmg and copy Gnuplot.app to your Applications folder (or anywhere else).<\/li>\n<li>Alternatively you could directly download the <a href=\"http:\/\/www.miscdebris.net\/upload\/gnuplot-4.2.5-i386.dmg\">gnuplot-4.2.5-i386.dmg from here<\/a>.<\/li>\n<\/ul>\n<p>That&#8217;s about it. Or at least it should be. Usually you just open Gnuplot.app and start plotting. But unfortunately the default aquaterm terminal doesn&#8217;t work for me always (on one Mac it did, on another it didn&#8217;t &#8211; maybe Aquaterm shouldn&#8217;t be installed before). So we need to hack Gnuplot.app so that X11 (which is also more powerful) becomes the default terminal.<\/p>\n<ul>\n<li>Right click on Gnuplot.app and choose &#8220;Show Package Contents&#8221;.<\/li>\n<li>Browse to Contents\/Resources and edit &#8220;script&#8221; with your favorite text editor<\/li>\n<li>Replace both lines <em>do script (&#8220;exec &#8216;${ROOT}\/bin\/gnuplot'&#8221;)<\/em> with <em>do script (&#8220;GNUTERM=x11 exec &#8216;${ROOT}\/bin\/gnuplot'&#8221;) .<\/em> X11 will then be the default terminal.<\/li>\n<\/ul>\n<p>You might also want to have gnuplot available in your usual terminal session. This is also no problem. Just run the following command in your terminal<\/p>\n<pre>ln -s \/Applications\/Gnuplot.app\/Contents\/Resources\/bin\/gnuplot \/Users\/username\/bin\/gnuplot<\/pre>\n<p>where username is your user name. \/Users\/username\/bin must be added to the path, so that Gnuplot works form everywhere, e.g. you could add the following to the \/Users\/username\/.profile file<\/p>\n<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 579px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;\"># add binary directory of .local<\/div>\n<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 579px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;\">export PATH=$HOME\/.local\/bin:$PATH<\/div>\n<pre># add bin directory of home directory\r\nexport PATH=$HOME\/bin:$PATH<\/pre>\n<p>If you run gnuplot from the Terminal.app again the Aquaterm terminal is the default. This can be changed by adding<\/p>\n<pre># use x11 as the default Gnuplot terminal\r\nexport GNUTERM=x11<\/pre>\n<p>to your .profile file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I provide another instructions to install Gnuplot 4.4.0 compiling it yourself on Mac OS X. There are some possibilities to install Gnuplot on Mac OS X, none of them is &#8220;official&#8221;, since the Gnuplot project doesn&#8217;t provide binaries for Mac OS X. It&#8217;s actually quite easy to configure and compile Gnuplot (i.e. .\/configure; make; make &hellip; <a href=\"http:\/\/www.miscdebris.net\/blog\/2009\/09\/16\/install-gnuplot-on-mac-os-x\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Install Gnuplot on Mac OS X<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[10,4],"tags":[29,27],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-macosx","category-research","tag-gnuplot","tag-mac-os-x"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6pnj-29","_links":{"self":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts\/133"}],"collection":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":11,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":140,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/posts\/133\/revisions\/140"}],"wp:attachment":[{"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.miscdebris.net\/blog\/wp-json\/wp\/v2\/tags?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}