File: README.ja

package info (click to toggle)
ruby-pgplot 0.1.9-3
  • links: PTS, VCS
  • area: contrib
  • in suites: buster, stretch
  • size: 604 kB
  • ctags: 144
  • sloc: ruby: 1,607; makefile: 76; ansic: 57; sh: 17
file content (91 lines) | stat: -rw-r--r-- 2,883 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
      Ruby/PGPLOT ver 0.1.6 by Masahiro TANAKA  2012-02-18

= 概要

  * PGPLOTをRubyから使うための拡張ライブラリ。

= 必要なもの

  * PGPLOT ver 5.2.x
     (http://astro.caltech.edu/~tjp/pgplot/)
  * PGPLOTのドライバが使うライブラリ (必要に応じて):
    ** X11ライブラリ
    ** PNGライブラリ
    ** GrWinグラフィクスライブラリ for MS-Windows (Cygwinでのみ動作確認)
     (http://spdg1.sci.shizuoka.ac.jp/grwinlib/)
  * Ruby ver 1.8.x/1.9.x
  * NArray ver 0.5.x/0.6.x
     (http://www.ruby-lang.org/en/raa-list.rhtml?name=NArray)

= インストール方法

  * PGPLOT をインストール

    - FORTRAN77が必要です (gfortranでもOK)。
    - C言語インタフェースライブラリ(cpgplot)を作成する必要があります。

  * Ruby, NArray をインストール

  * Ruby/PGPLOT をインストール

    - ソースを展開

    - コンパイル・インストール:
      ruby extconf.rb [オプション(下記参照)]
      make
      make site-install
      (または make install)

    - ruby extconf.rb のオプション:
       --with-pgplot-include=path : cpgplot.hのディレクトリ。
       --with-pgplot-lib=path	  : PGPLOTライブラリのディレクトリ。
       --with-x11-dir=path	  : X11のpath
       --with-grwin : for using GrWin (cygwin/mingw).
       --with-sunws : PGPLOTをSun WorkShopのf77を使って
		      コンパイルした場合。指定しない時はg77。
     例:
       ruby extconf.rb --with-x11-dir=/usr/X11R6 \
	--with-pgplot-include=/usr/local/pgplot \
	--with-pgplot-lib=/usr/local/pgplot

= 使用方法

  * PGPLOTの環境変数設定(csh)

      setenv PGPLOT_DIR  /usr/local/lib/pgplot/ # pgxwin_server, rgb.txt
      setenv PGPLOT_FONT ${PGPLOT_DIR}/grfont.dat
      setenv PGPLOT_DEV  /xwin

  * 拡張ライブラリをロードするには:

      require "pgplot"

  * モジュール名は`Pgplot'です。モジュール名を省略したいときは:

      include Pgplot

  * Pgplotモジュールのメソッドは、PGPLOTの関数と同じ名前(小文字)です。
    プロットを開始するには:

      pgbeg('/xwin')

    詳細は PGPLOTのマニュアルを参照して下さい。
    引数は必ずしもFORTRAN版と同じではありません。
    引数が違う関数のリストは、"FuncUsage"というファイルにあります。

= 動作確認

  * ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
  * ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
  * NArray 0.6.0.1
  * gcc/gfortran version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)

= 配布条件

  Ruby本体と同じです。
  無保証です。

= 謝辞

  PGPLOTを開発し、Ruby版pgdemoの配布許可を下さった Tim Pearson氏
  に感謝します。Ruby開発に携わった皆様に感謝します。