1.首先安装xcode,可以去App Store下载
2.安装Macports,去http://www.macports.org下载pkg文件
3.打开终端,进入/opt/local/bin,输入sudo port install gnuplot
4.在终端输入gnuplot后输入plot sin(x)测试是否安装成功
参考资料:http://blog.sina.com.cn/s/blog_731c054101017s5v.html
注:现在好像不需要在xcode中安装Command line tool,因为现在版本的xcode自带这个工具