title: sh: gnuplot: command not found in Gnuplot + Xcode
body: <p>There was a similar question to mine however the answers were not quite solutions so if I could get some help with this it would be greatly appreciated.</p>
  
  <p>The problem is that when I compile, Xcode gives the aforementioned error of sh: gnuplot: command not found.</p>
  
  <p>I checked <code>which gnuplot</code> in terminal and as expected from macports it is in <code>/opt/local/bin/gnuplot</code>. Also <code>printf("PATH=%s\n", getenv("PATH"));</code> shows the path <code>PATH=/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin</code> I suspect therein lies the problem but I am not sure how to fix it.</p>
  
  <p>Thanks in advance!</p>