顯示具有 gnuplot 標籤的文章。 顯示所有文章
顯示具有 gnuplot 標籤的文章。 顯示所有文章

2011年8月7日

用 PPA 安裝 gnuplot for gretl under ubuntu 10.04

gnuplot 4.2 不 “完全” 相容於 gretl 的問題, 有更簡單的解決辦法了, 就是改用 ppa, update 後自動安裝, 不需要自行 compile 了 (自行 compile gnuplot 的方法,見我之前寫的 http://yinung2.blogspot.com/search/label/gnuplot

gnuplot 4.2 in default ubuntu 10.04 does not well support gretl. Gretl needs at least 4.4 to work normally.

You may use this ppa instead for the current version of gnuplot.

sudo add-apt-repository ppa:daniel-elstner/ppa
sudo apt-get update

Then upgrade your gnuplot to 4.4. 

see also https://launchpad.net/~daniel-elstner/+archive/ppa

2011年1月7日

在 ubuntu 10.04 安裝 gretl 1.9.3x - 有關 gnuplot 的問題

用 gnuplot for gretl 的方法, 但是有錯誤(在執行 gnuplot 時):
XXX@ubu1004:/$ /opt/gnuplot/bin/gnuplot
/opt/gnuplot/bin/gnuplot: error while loading shared libraries: libwx_gtk2u_richtext-2.8.so.0: cannot open shared object file: No such file or directory
找了很多方法, 都不能決解, 
後來乾脆直接下載 gnuplot (4.4.0-1)  (for maverick ) 的 binary 檔來試試
 @ http://packages.ubuntu.com/maverick/gnuplot

但要先安裝

gnuplot-nox (>= 4.4.0-1)
gnuplot-x11 (>= 4.4.0-1)
裝好以後 gnuplot 的部份應該OK了 (可以在終端機中打 gnuplot, 看版本是不是 4.4)
接著安裝我自已打包的 gretl_1.9.3-1_i386.deb

安裝好 gretl 之後, 依 在 ubuntu 9.10 裝 自行打包的 gretl 1.8.6 這篇的說明:

  • 1. 在 /usr/local/lib 下, 找到 libgretl-1.0.so.0 和其它 3 個以 libgretl* 開始的檔案, 都複製到 /usr/lib 
  • 2. 找不到 lapack.so.0 ...
  • /usr/local/bin/gretl_x11: error while loading shared libraries: liblapack.so.3: cannot open shared object file: No such file or directory
少了 lapack, 試著在 synaptic 裝 liblapack-dev, 之後用管理權限, 在 /usr/lib 下, 找到 liblapack.so, 複制成 liblapack.so.3; 再用管理權限, 在 /usr/lib 下, 找到 libblas.so, 複制成 libblas.so.3Ok 了, gretl 和 gnuplot 都可以正常執行了

2010年12月28日

在 ubuntu 9.10 安裝 gretl 1.9.3x - 有關 gnuplot 的問題

如果覺得自行 compile 麻煩的話, 不妨試試 [在 ubuntu 10.04 安裝 gretl 1.9.3x - 有關 gnuplot 的問題] 這一篇的方法

gretl 網站的原始方法
這個步驟是成功的: see Install Gnuplot 4.4.0 on Ubuntu Linux
sudo apt-get install libwxgtk2.8-dev libpango1.0-dev libreadline5-dev libx11-dev libxt-dev texinfo libgd2-xpm-dev

Then we download and compile gnuplot (run each command/line in a terminal)
  • wget http://sourceforge.net/projects/gnuplot/files/gnuplot/4.4.0/gnuplot-4.4.0.tar.gz/download
  • tar xzf gnuplot-4.4.0.tar.gz
  • mkdir build && cd build
  • ../gnuplot-4.4.0/configure --with-readline=gnu
  • make
  • sudo make install
Compile 後, gnuplot 的子目錄位置是:
/usr/local/bin/gnuplot


用 gnuplot for gretl 的方法, 但是有錯誤(在執行 gretl 時):
/opt/gnuplot/bin/gnuplot: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /opt/gnuplot/bin/gnuplot)


另外有成功地 compile gnuplot, 在安裝以下的 packages 之後 (參見):
sudo apt-get install automake checkinstall libwxgtk2.8-dev libpango1.0-dev libreadline5-dev libx11-dev libxt-dev texinfo libgd2-xpm-dev  liblua5.1-dev

另見 gnuplot 4.4.2@sourceforge

再執行:

./prepare
./configure --with-readline=gnu --with-lua


*from http://gretl.sourceforge.net/gnuplot_for_gretl.html

Build from source

Note that for this to succeed you will need to have the "devel" packages for GTK+ and Xorg installed.
export CVSROOT=:pserver:anonymous@gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot
 cvs login
 cvs -z3 checkout gnuplot
Just hit Enter when asked for a password. Then
sh ./prepare
 ./configure --prefix=/opt/gnuplot
 make
 sudo make install
The choice of installing to /opt/gnuplot is designed to avoid collisions with gnuplot as installed by your Linux distro.

Packaged binary

If you would prefer to try a pre-built binary, use the following commands to download and install the package.
cd /tmp
 wget http://ricardo.ecn.wfu.edu/pub/gretl/gnuplot-4.5-i586-3.tar.gz
 cd / 
 sudo tar xvfz /tmp/gnuplot-4.5-i586-3.tar.gz
 rm /tmp/gnuplot-4.5-i586-3.tar.gz
Note that this package installs into /opt/gnuplot.

Using the new gnuplot

In gretl, go to Tools/Preferences/General/Programs and change the "gnuplot" entry to read
/opt/gnuplot/bin/gnuplot

* see also Compiling GNUPLOT from CVS with Ubuntu

2010年7月3日

試用 ubuntu 10.04

今天用 virtualbox 3.1.2 在 ubuntu 9.10 下試用 ubuntu 10.4 版, 結果 ubuntu 10.04 系統開啟地很慢很慢...
後來將 virtualbox 換成 3.2.6 版, 問題才解決

ubuntu 10.04 視窗風格有很大的改變, 最不適應的是放大縮小鈕改成放在左上角 ...
要更改為放在右上角的話:
  1. 在終端機啟動 gconf-editor
  2. 點選 Apps > Metacity > General > Button Layout
  3. 把字串值改成:menu:minimize,maximize,close
    (原來的值是: close,minimize,maximize:)
ubuntu 10.04 這一版的預設中文輸入法仍是 iBus + 注音輸入法, 新增倉頡 3 代後, 發現輸入法會記住你上一次所挑選的字, 總算有些進步...

ubuntu 10.04 這一版預載可安裝的 gretl 是 1.8.7
gnuplot 是 4.2.6-1
要在圖形中正常顯示中文, 請參見
http://gretl.sourceforge.net/gnuplot_for_gretl.html
測試的 gretl script
open djclose
smpl 1988/01/04 1989/12/29
gf1 <- gnuplot djclose --time-series --output=display --with-lines
gf1.show

先裝上 gretl 1.8.7 之後, 再
https://sites.google.com/site/gretlforubuntu/home/gretl-deb
下載自行編譯的 gretl 1.9.1, 但無法執行:
 /usr/local/bin/gretl_x11/: error while loading shared libraries: liblapack.so.

用 
sudo aptitude install libfftw3-dev
sudo aptitude install liblapack-dev
之後再重裝 gretl 1.9.1 即可 (比上一版 9.10 的簡單一些)


最後, 固定寛度字形預設是 monospace, 但要改成 freemono, 或 Courier 10 pitch 顯示才會對齊... 


若執行 ARIMA 模型估計時, 出現 /usr/lib/gretl-gtk2/arma.so 找不到, 則建立連結:
sudo ln -s /usr/local/lib/gretl-gtk2/ /usr/lib/gretl-gtk2/