pax_global_header00006660000000000000000000000064121143674620014520gustar00rootroot0000000000000052 comment=1c56777bc886287be32806d81fc71e6ca26d6a8e ruby-pgplot-0.1.9/000077500000000000000000000000001211436746200140135ustar00rootroot00000000000000ruby-pgplot-0.1.9/.gitignore000066400000000000000000000003121211436746200157770ustar00rootroot00000000000000ext/Makefile mkmf.log .config rb_pgplot.c *.o *.so lib*.a cpgplot.h *~ */*~ */*/*~ InstalledFiles pkg build_pgplot .RUBYARCHDIR.time ext/build_lib/build ext/build_lib/drivers.conf ext/build_lib/pgplot* ruby-pgplot-0.1.9/FuncUsage000066400000000000000000000024371211436746200156240ustar00rootroot00000000000000Here is a brief overview of Ruby/PGPLOT methods whose argument handling differs from the underlying PGPLOT functions. Methods that have the same arguments as the underlying functions are NOT shown here. stat = pgopen([device]) stat = pgbeg([device, [nxsub, [nysub]]]) pgask [true|false] pgenv xmin,xmax,ymin,ymax [,just, axis] pgline xarray, yarray pgpt xarray, yarray [,symbol] pgpnts xarray, yarray, symarray pgbin xarray, yarray [,center] pghist data, nbin [,range, flag] pgerrb dir, x, y, err [,tlen] pgerrx x1, x2, y [,tlen] pgerry x, y1, y2 [,tlen] pgcont map, cont [,tr] pgcons map, cont [,tr] pgconb map, cont [,blank, tr] pgconf map, cont_range [,tr] pgconl map, cont, label [,intval, minint, tr] pgimag array [,range, tr] pggray array [,range, tr] pgctab l, r,g,b [,contra,bright] pgpixl, array [,x1,x2,y1,y2] pgvect x, y [,scale, pos, tr, blank] value = pgqinf(item) type, descr, inter = pgqdt([ndev]) curs = pgband( mode, [ xref, yref, [x, y, [posn]]]) n = pgolin( x, y, [sym, [npt]] ) n = pgncur( x, y, [sym, [npt]] ) n = pglcur( x, y, [npt] ) pgtick x1, y1, x2, y2, v, [str], {"tickl", "tickr", "disp", "orient"} pgaxis x1, y1, x2, y2, v1, v2, {"opt", "step", "nsub", "tickl", "tickr", "frac", "disp", "orient"} ruby-pgplot-0.1.9/MANIFEST000066400000000000000000000012341211436746200151440ustar00rootroot00000000000000FuncUsage MANIFEST README README.ja cogen.rb depend extconf.rb kwarg.c pgdemo1.rb pgdemo15.rb pgdemo3.rb pgdemo4.rb pgdemo9.rb rb_pgplot.c.in ruby-pgplot.gemspec test/pgband.rb test/pgcurs.rb test/pggray.rb test/pglcur.rb test/pgline.rb test/pgncur.rb test/pgolin.rb test/pgtick.rb doc/Makefile doc/css.css doc/index.rd doc/install.ja.rd doc/method.ja.rd doc/mkdoc.rb doc/mkind.rb doc/myrd2html.rb doc/pgcont.rd doc/pgcont.png doc/pghist.rd doc/pghist.png doc/pgimag.rd doc/pgimag.png doc/pgline.rd doc/pgline.png doc/pgplot.png doc/plot1.png doc/rbpg-ind.rd doc/rbpg-ind.txt doc/rbpg-relabel.rb doc/rd2html-img-lib.rb doc/trailer.html doc/tutorial-01.ja.rd doc/up.sh ruby-pgplot-0.1.9/README000066400000000000000000000052511211436746200146760ustar00rootroot00000000000000= Ruby/PGPLOT Version 0.1.6 by Masahiro TANAKA 2012-02-18 == Description * Ruby interface to PGPLOT. It provides PGPLOT functions as a Ruby module. == Requirements * {PGPLOT ver 5.2.x}[http://astro.caltech.edu/~tjp/pgplot/] * Libraries which PGPLOT drivers use: * X11 library * PNG library * {GrWin Graphics Library for MS-Windows }[http://spdg1.sci.shizuoka.ac.jp/grwinlib/english/] * Ruby version 1.8.x/1.9.x/2.0.x * {NArray}[http://narray.rubyforge.org/] version 0.5.x/0.6.x == Installation * Install PGPLOT library - FORTRAN77 compiler required for source-compile. - C interface library (libcpgplot.a) is also required. - On Ubuntu, the required PGPLOT files can be installed via this command: $ sudo apt-get install pgplot5 * Install Ruby, NArray * Install Ruby/PGPLOT - To install via RubyGems (recommended!): $ sudo gem install pgplot - To install manually: - extract distribution. - compile and install by: $ ruby extconf.rb [options (see below)] $ make $ make site-install (or make install) - Options for `ruby extconf.rb': --with-pgplot-include=path : path to cpgplot.h --with-pgplot-lib=path : path to PGPLOT libraries. --with-grwin : for using GrWin (cygwin/mingw). example: ruby extconf.rb \ --with-pgplot-include=/usr/local/pgplot \ --with-pgplot-lib=/usr/local/pgplot == Usage * Environment variables for PGPLOT (csh) setenv PGPLOT_DIR /usr/local/lib/pgplot/ # pgxwin_server, rgb.txt setenv PGPLOT_FONT ${PGPLOT_DIR}/grfont.dat setenv PGPLOT_DEV /xwin * To load the Ruby/PGPLOT extension; require "pgplot" * Module name is 'Pgplot'. If you want to omit the module name; include Pgplot * Pgplot module method names are lower case of corresponding PGPLOT functions. To start plotting: pgbeg('/xwin') See PGPLOT manual for function usage. Arguments are not always same as the FORTRAN PGPLOT. {FuncUsage}[link:FuncUsage.html] file includes a list of functions with different arguments. == Platforms tested * 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) == License This program is free software. You can distribute/modify this program under the same terms as Ruby itself. NO WARRANTY. == Acknowledgment M.T. thanks to Tim Pearson for developing the useful PGPLOT library and giving me the permission to distribute the Ruby version of pgdemos. M.T. also thanks to the developers of the Ruby language for providing the wonderful language. ruby-pgplot-0.1.9/README.ja000066400000000000000000000055031211436746200152670ustar00rootroot00000000000000 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開発に携わった皆様に感謝します。 ruby-pgplot-0.1.9/Rakefile000066400000000000000000000004741211436746200154650ustar00rootroot00000000000000require 'rubygems' require 'rubygems/package_task' load './pgplot.gemspec' file 'ext/rb_pgplot.c' => ['ext/rb_pgplot.c.in', 'ext/cogen.rb'] do require './ext/cogen.rb' Dir.chdir('ext') do cogen_pgplot end end Gem::PackageTask.new(PGPLOT_GEMSPEC) do |pkg| pkg.need_zip = true pkg.need_tar = true end ruby-pgplot-0.1.9/demo/000077500000000000000000000000001211436746200147375ustar00rootroot00000000000000ruby-pgplot-0.1.9/demo/pgdemo1.rb000066400000000000000000000175721211436746200166340ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot include NMath PI = Math::PI TWOPI = PI*2 BLACK,WHITE,RED,GREEN,BLUE,CYAN,MAGENT,YELLOW = (0..7).to_a FULL,DASH,DOTDSH,DOTTED,FANCY = (1..5).to_a NORMAL,ROMAN,ITALIC,SCRIPT = (1..4).to_a SOLID,HOLLOW = (1..2).to_a # ====== Utility function ====== def indgen arg if arg.kind_of?(Range) return NArray.sfloat(arg.size).indgen!(arg.first) elsif arg.kind_of?(Numeric) return NArray.sfloat(arg).indgen! else raise ArgumentError, "invalid argument" end end def randomn n=1 rr = NArray.sfloat(n) xx = NArray.sfloat(n) idx= NArray.int(n).indgen! i = 0 while i0 then xo3 = x[idx1]/3.0 t = xo3**2 r[idx1] = 1.0 + t*(-2.2499997 + t*( 1.2656208 + t*(-0.3163866 + t*( 0.0444479 + t*(-0.0039444 + t*( 0.0002100)))))) end if idx2.size>0 then xx = x[idx2] t = 3.0/xx f0 = 0.79788456 + t*(-0.00000077 + t*(-0.00552740 + t*(-0.00009512 + t*( 0.00137237 + t*(-0.00072805 + t*( 0.00014476)))))) theta0 = xx - 0.78539816 + t*(-0.04166397 + t*(-0.00003954 + t*( 0.00262573 + t*(-0.00054125 + t*(-0.00029333 + t*( 0.00013558)))))) r[idx2] = f0*cos(theta0)/sqrt(xx) end return r end def bessel_j1 arg r = NArray.sfloat(arg.size) x = arg.abs idx1,idx2 = (x<=3).where2 if idx1.size>0 then xo3 = x[idx1]/3.0 t = xo3**2 f = 0.5 + t*(-0.56249985 + t*( 0.21093573 + t*(-0.03954289 + t*( 0.00443319 + t*(-0.00031761 + t*( 0.00001109)))))) r[idx1] = f * arg[idx1] end if idx2.size>0 then xx = x[idx2] t = 3.0/xx f1 = 0.79788456 + t*( 0.00000156 + t*( 0.01659667 + t*( 0.00017105 + t*(-0.00249511 + t*( 0.00113653 + t*(-0.00020033)))))) theta1 = xx - 2.35619449 + t*( 0.12499612 + t*( 0.00005650 + t*(-0.00637879 + t*( 0.00074348 + t*( 0.00079824 + t*(-0.00029166)))))) r[idx2] = f1*cos(theta1)/sqrt(xx) end idx = (arg<0).where #p idx #p r[idx] r[idx] = -r[idx] if idx.size>0 return r end def pgex10 pgbbuf pgsave pgsci(YELLOW) # PGFUNX(PGBSJ0,500,0.0,10.0*PI,0) x = indgen(500)/50*PI y = bessel_j0(x) pgenv 0,PI*10, y.min,y.max pgline x,y pgsci(RED) pgsls(DASH) # PGFUNX(PGBSJ1,500,0.0,10.0*PI,1) pgline x, bessel_j1(x) pgsci(GREEN) pgsls(FULL) pglab('\fix', '\fiy', '\frPGPLOT Example 10: routine PGFUNX') pgmtxt('T', -4.0, 0.5, 0.5, '\frBessel Functions') pgarro(8.0, 0.7, 1.0, bessel_j0(NArray[1.0])[0]) pgarro(12.0, 0.5, 9.0, bessel_j1(NArray[9.0])[0]) pgstbg(GREEN) pgsci(0) pgptxt(8.0, 0.7, 0.0, 0.0, ' \fiy = J\d0\u(x)') pgptxt(12.0, 0.5, 0.0, 0.0, ' \fiy = J\d1\u(x)') pgunsa pgebuf end # ====== Demo start ====== raise "device not found" if pgopen<0 pgex0 pgex1 pgex2 pgex3 pgsubp 2,1 pgex4 pgex5 pgsubp 1,1 pgex6 pgex7 pgex8 pgex9 pgex10 pgclos exit ruby-pgplot-0.1.9/demo/pgdemo15.rb000066400000000000000000000037571211436746200167210ustar00rootroot00000000000000require 'narray' require 'pgplot' include NMath include Pgplot #----------------------------------------------------------------------- # Demonstration program for PGPLOT vector field plot. # # Program to demonstrate the use of PGVECT along with # PGCONB by illustrating the flow around a cylinder with circulation. #----------------------------------------------------------------------- twopi = 2*Math::PI blank = -1.0e10 # number of points in the x and y directions nx = 31 ny = 31 # cylinder radius a = 1.0 # circulation strength gamma = 2.0 # freestream velocity vinf = 1.0 # max and min x and y xmax = 3.0*a xmin = -3.0*a ymax = 3.0*a ymin = -3.0*a # point spacing dx = (xmax-xmin)/(nx-1) dy = (ymax-ymin)/(ny-1) # compute the stream function, Cp, and u and v velocities a2 = a**2 x = NArray.sfloat(nx,1).indgen!*dx + xmin y = NArray.sfloat(1,ny).indgen!*dy + ymin r2 = x**2 + y**2 r2[(r2.eq 0).where] = 1e-10 psi = vinf * y * (1-a2/r2) + gamma/twopi*0.5*log(r2/a) u = vinf * (1 + a2/r2 - 2*a2*(x/r2)**2) + gamma/twopi * y/r2 v = vinf * x * (-2*a2*y/r2**2) + gamma/twopi * x/r2 cp = 1 - (u**2+v**2)/vinf**2 idx = (r2 < a2).where u[idx] = v[idx] = blank # # start drawing # pgbeg pgenv( x[0], x[-1], y[0], y[-1], 1 ) pgiden pglab('X','Y','Flow About a Cylinder with Circulation') # # contour plot of the stream function (streamlines) # tr = [ x[0]-dx, dx, 0.0, y[0]-dy, 0.0, dy ] level = [ 1.0, 0.5, 0.0, -0.5, -1.0 ] pgcont( psi, level, tr ) # # draw cylinder # pgbbuf pgsci(0) pgsfs(1) pgcirc(0.0, 0.0, a*1.1) pgsfs(2) pgsci(14) pgcirc(0.0, 0.0, a) pgsci(1) pgebuf # # vector plot # pgsah(2, 45.0, 0.7) pgsch(0.3) tr = [ x[0], dx, 0.0, y[0], 0.0, dy ] pgvect( u[1..-2,1..-2], v[1..-2,1..-2], 0.0, 0, tr, -1.0e10 ) pgsch(1.0) # # finish # ruby-pgplot-0.1.9/demo/pgdemo3.rb000066400000000000000000000073541211436746200166330ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot include NMath def main exit unless pgbeg('?',1,1) print " Routine PGCONT\n" pgex31 print " Routine PGCONS\n" pgex32 print " Routine PGCONB\n" pgex33 print " Routine PGCONT with PGCONL labels\n" pgex36 #print " Routine PGCONX with arrow labels\n" #pgex37 #print " Routine PGCONX\n" #pgex34 print " Routine PGCONF\n" pgexx1 pgend end # ====== Utility ====== class PgLinestyle attr_accessor :width attr_accessor :color attr_accessor :style def initialize(opt=nil) @width = 1 @color = 1 @style = 1 if opt.is_a?(Hash) @width = opt[:width] || @width @width = opt['width'] || @width @color = opt[:color] || @color @color = opt['color'] || @color @style = opt[:style] || @style @style = opt['style'] || @style end end def set pgslw @width pgsci @color pgsls @style end end # class PgLinestyle NC=21 Pgline_default = PgLinestyle.new $sty = (1..NC).collect{|i| if i<10 x = PgLinestyle.new(:width =>1, :color =>2, :style =>2) else x = PgLinestyle.new(:width =>1, :color =>3, :style =>1) end if i%5==0 x.width = 5 end x } i = NArray.sfloat(40,1).indgen!(1) j = NArray.sfloat(1,40).indgen!(1) $f = cos( 0.3*sqrt(i*2)-0.4*j/3 ) * cos( 0.4*i/3 ) + (i-j)/40.0 $lv = NArray.sfloat(NC).indgen!*($f.max-$f.min)/NC+$f.min #NArray.span($f.minmax,NC) # ====== Exsample routine ====== def pgex31 pgpage pgsvp(0.05,0.95,0.05,0.95) pgswin(1.0,40.0,1.0,40.0) pgbox('bcts',0.0,0,'bcts',0.0,0) pgmtxt('t',1.0,0.0,0.0,'Contouring using PGCONT') pgbbuf for i in 0...NC $sty[i].set pgcont $f, $lv[i] end Pgline_default.set pgebuf end def pgex32 pgpage pgsvp(0.05,0.95,0.05,0.95) pgswin(1.0,40.0,1.0,40.0) pgbox('bcts',0.0,0,'bcts',0.0,0) pgmtxt('t',1.0,0.0,0.0,'Contouring using PGCONS') pgbbuf for i in 0...NC $sty[i].set pgcons $f, $lv[i] end Pgline_default.set pgebuf end def pgex33 pgpage pgsvp(0.05,0.95,0.05,0.95) pgswin(1.0,40.0,1.0,40.0) pgbox('bcts',0.0,0,'bcts',0.0,0) pgmtxt('t',1.0,0.0,0.0,'Contouring using PGCONB') pgbbuf blank = -65536.0 f = $f.dup i = NArray.sfloat(40,1).indgen!(1) j = NArray.sfloat(1,40).indgen!(1) r = sqrt((i-20.5)**2 + (j-20.5)**2) idx = ((r>20).or(r<3.0)).where f[idx] = blank pgsci 1 pgpt( (i+NArray.int(1,40))[idx], (j+NArray.int(40,1))[idx], 1 ) for i in 0...NC $sty[i].set pgconb f, $lv[i], blank end Pgline_default.set pgebuf end def pgex36 pgpage pgsvp(0.05,0.95,0.05,0.95) pgswin(1.0,40.0,1.0,40.0) pgbox('bcts',0.0,0,'bcts',0.0,0) pgmtxt('t',1.0,0.0,0.0,'Contouring using PGCONT and PGCONL labels') pgbbuf for i in 0...NC $sty[i].set pgcons $f, $lv[i] end pgslw 1 pgsls 1 1.step(20,2) {|i| pgsci $sty[i].color pgconl $f,$lv[i],"%2i"%(i+1),16,8 } Pgline_default.set pgebuf end def pgexx1 nx=ny=51 c = [3.0, 3.2, 3.5, 3.6, 3.766413, 4.0 ,5.0, 10.0, 100.0] xmin =-2.0 xmax = 2.0 ymin =-2.0 ymax = 2.0 mu = 0.3 dx = (xmax-xmin)/(nx-1) dy = (ymax-ymin)/(ny-1) tr = [xmin-dx, dx, 0.0, ymin-dy, 0.0, dy] x = tr[0] + NArray.sfloat(nx,1).indgen!(1)*tr[1] y = tr[3] + NArray.sfloat(1,ny).indgen!(1)*tr[5] z = (1.0-mu)*(2.0/sqrt((x-mu)**2+y**2)+(x-mu)**2+y**2) + mu*(2.0/sqrt((x+1.0-mu)**2+y**2)+(x+1.0-mu)**2+y**2) pgpage pgvstd pgwnad(xmin, xmax, ymin, ymax) pgsfs(1) for i in 0..c.size-2 r = 0.5+0.5*(i-1)/(c.size-1) pgscr(i+10, r, r, r) pgsci(i+10) pgconf(z,c[i]..c[i+1],tr) end pgsci(3) pgcont(z,c,tr) pgsci(1) pgsch(0.6) pgbox('bctsin',1.0,10,'bctsinv',1.0,10) pgsch(1.0) pgmtxt('t',1.0,0.0,0.0,'Contour filling using PGCONF') end main ruby-pgplot-0.1.9/demo/pgdemo4.rb000066400000000000000000000034501211436746200166250ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot include NMath def setvp pgsvp(0.0, 1.0, 0.0, 1.0) vpx1, vpx2, vpy1, vpy2 = pgqvp(1) d = [vpx2-vpx1, vpy2-vpy1].min/40.0 vpx1 = vpx1 + 5.0*d vpx2 = vpx2 - 2.0*d vpy1 = vpy1 + 8.0*d vpy2 = vpy2 - 2.0*d pgvsiz(vpx1, vpx2, vpy1, vpy2) end def palett contra,bright rl =[-0.5, 0.0, 0.17, 0.33, 0.50, 0.67, 0.83, 1.0, 1.7] rr =[ 0.0, 0.0, 0.0, 0.0, 0.6, 1.0, 1.0, 1.0, 1.0] rg =[ 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.6, 0.0, 1.0] rb =[ 0.0, 0.3, 0.8, 1.0, 0.3, 0.0, 0.0, 0.0, 1.0] pgctab(rl, rr, rg, rb) end exit if pgopen('?') < 1 printf "PGPLOT device type: %s\n", pgqinf('TYPE') c1,c2 = pgqcir() printf "Number of color indices used for image: %d\n", nc=[0,c2-c1+1].max exit if nc<8 nx = 64 ny = 64 x = NArray.sfloat(nx,1).indgen!(1) y = NArray.sfloat(1,ny).indgen!(1) f = cos( sqrt(x*(80.0/nx))*0.6 - y*16.0/(3.0*ny) ) * cos( x*16.0/(3.0*nx) ) + (x/nx - y/ny) + sin(sqrt(x**2+y**2))*0.05 pgpage setvp pgwnad(0.0, 1.0+nx, 0.0, 1.0+ny) bright = 0.5 contra = 1.0 palett(contra, bright) pgimag(f) pgmtxt('t',1.0,0.0,0.0,'PGIMAG, PGWEDG, and PGCTAB') pgsch(0.6) pgbox('bcntsi',0.0,0,'bcntsiv',0.0,0) pgmtxt('b',3.0,1.0,1.0,'pixel number') pgwedg('BI', 4.0, 5.0, f.min,f.max, 'pixel value') pgsch(1.0) angle = 120.0/57.29578 c = cos(angle) s = sin(angle) tr = NArray[ -c-s, 2.0*c/nx, 2.0*s/ny, -c+s, -2.0*s/nx, 2.0*c/ny ] pgpage setvp pgwnad(-1.0, 1.0, -1.0, 1.0) pgsci(1) bright = 0.5 contra = 1.0 palett(contra, bright) pgimag(f,nil,tr) pgsci(1) pgcont(f,NArray.sfloat(21).indgen!*(f.max-f.min)/21+f.min, tr) pgsls(1) pgslw(1) pgsci(1) #outlin(1,mxi,1,mxj,tr) pgmtxt('t',1.0,0.0,0.0,'PGIMAG, PGCONT and PGWEDG') pgsch(0.6) pgbox('bctsn',0.0,0,'bctsn',0.0,0) pgwedg('BI', 4.0, 5.0, f.min, f.max, 'pixel value') pgsch(1.0) pgclos ruby-pgplot-0.1.9/demo/pgdemo9.rb000066400000000000000000000015361211436746200166350ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot include NMath n=64 ncol=32 nlev=9 pgbeg i = NArray.sfloat(n,1).indgen!(1) j = NArray.sfloat(1,n).indgen!(1) f = cos(0.6*sqrt(i*2)-(0.4/3)*j) * cos((0.4/3)*i) + (i-j)/n fmin = f.min fmax = f.max ia = (f-fmin)/(fmax-fmin)*(ncol-1)+16 ci1,ci2 = pgqcol if ci2 < 15+ncol raise 'This program requires a device with at least %d colors'%(15+ncol) end pgpage pgscr(0, 0.0, 0.3, 0.2) pgsvp(0.05,0.95,0.05,0.95) pgwnad(0.0, 1.0, 0.0, 1.0) for i in 1..ncol r = 0.8*(i-1)/(ncol-1) + 0.2 g = 2.0*(i-1-ncol/2)/(ncol-1) g = 0 if g<0 b = 0.2 + 0.4*(ncol-i)/ncol pgscr(i+15, r, g, b) end pgpixl(ia,0,1,0,1) pgsci(1) pgmtxt('t',1.0,0.0,0.0,'Test of PGPIXL') pgbox('bcnts',0.0,0,'bcnts',0.0,0) clev = NArray.sfloat(nlev).indgen!(1) * ((fmax-fmin)/nlev) + fmin pgcont(f, clev, NArray[-1.0, 1, 0, -1, 0, 1]/(n-1)) ruby-pgplot-0.1.9/doc/000077500000000000000000000000001211436746200145605ustar00rootroot00000000000000ruby-pgplot-0.1.9/doc/Makefile000066400000000000000000000030131211436746200162150ustar00rootroot00000000000000.SUFFIXES: .rd .html .ja.rd .html.ja .rb $(SUFFIXES) rd2=ruby myrd2html.rb .rd.html: $(rd2) --lang=en --kw="Ruby,PGPLOT,NArray" $(opt) $< > $@ .ja.rd.html.ja: $(rd2) --lang=ja --kw="Ruby,PGPLOT,NArray" $(opt) $< > $@ all=index.html \ pgline.html \ pgcont.html \ pgimag.html \ pghist.html \ rbpgplot.html \ rbpg-ind.html \ install.html.ja \ tutorial-01.html.ja \ method.html.ja all: $(all) # Examples index.html: opt= --title="Ruby/PGPLOT" pgline.html: opt= --title="pgline : Line plot" pgcont.html: opt= --title="pgcont : Histogram plot" pgimag.html: opt= --title="pgimag : Contour plot" pghist.html: opt= --title="pghist : Image map" rbpgplot.html: opt= --title="Ruby/PGPLOT: Method Index and Description" rbpg-ind.html: opt= --title="Ruby/PGPLOT: Categorized Method Index" install.html.ja: opt= --title="Ruby/PGPLOT: Installation (ja)" tutorial-01.html.ja: opt= --title="Ruby/PGPLOT: Tutorial 01 (ja)" method.html.ja: opt= --title="Ruby/PGPLOT: Method Reference (ja)" pgline.html: pgline.rd trailer.html pgcont.html: pgcont.rd trailer.html pgimag.html: pgimag.rd trailer.html pghist.html: pgimag.rd trailer.html install.html.ja: trailer.html tutorial-01.html.ja: tutorial-01.ja.rd trailer.html # Method description rbpgplot.html: mkdoc.rb #ruby -Kn mkdoc.rb $(HOME)/2012/src/pgplot/src rbpgplot.html ruby mkdoc.rb rbpgplot.html # Method index categolized rbpg-ind.rd: rbpg-ind.txt mkind.rb trailer.html ruby mkind.rb rbpg-ind.txt rbpg-ind.rd rbpg-ind.html: rbpg-ind.rd up: sh up.sh clean: rm -f *~ rbpg-ind.rd $(all) ruby-pgplot-0.1.9/doc/css.css000066400000000000000000000034441211436746200160670ustar00rootroot00000000000000p { text-indent: 0.75em; margin: 0.25em 1em 0.25em 1em; } address { text-align: right; } dl { margin-left: 1em; margin-right: 2em; padding: 2pt 1em 2pt 0.5em; border-width: thin 0 thin thin; border-color: #aaaaff; color: #000055; } dt { margin-left: 0.5em; margin-right: 2em; padding: 2pt 1em 2pt 0.5em; font-weight: bold; color: #444488; background-color: #eeeeee; border-color: #aaaaaa; } blockquote { background-color: #eeeeee; color: #444444; border-color: #aaaaaa; border-style: dotted; border-width: 2px; padding: 0.5em 0.5em; } p.noindent { text-indent: 0em; } p.center { text-indent: 0em; text-align: center; } p.last-modified { text-indent: 0em; font-size: smaller; } p.lang-navigator { text-align: right; font-size: small; } body { background-color: White; } pre { border-style: solid; border-width: 0 0 0 thick; border-color: #7f7f7f; color: #222222; background-color: #eeeeee; white-space: pre; margin-right: 4em; margin-left: 2em; padding: 0.2em 0.5em; } h1 { padding: 0.2em 0.5em 0.2em 0.5em; border-style: solid; border-width: thin thick thin thick; border-color: #bbbbff; color: #444444; background-color: #eeeeff; } h2 { padding: 0 0.75em 0 0.5em; border-style: solid; text-indent: 0em; background-color: #eeffee; border-color: #88bb88; color: #444444; border-width: 0 0 thin 7pt; } h3 { padding: 0 2em 0pt 0.25em; border-style: solid; border-color: #bb88ff; color: #444444; border-width: 0 0 thin thick; } h4 { border-style: solid; text-indent: 0.25em; color: #334433; border-color: #88bb88; border-width: 0 0 1px 0; margin-left: 0.5em; } h5 { margin-left: 1em; } a:link { } a:visited { } a:active { } a:hover { background: #ffeecc; } a:focus{ } ul { padding-left: 1em; } li { padding-left: 0em; } ruby-pgplot-0.1.9/doc/index.rd000066400000000000000000000023671211436746200162260ustar00rootroot00000000000000=begin = Ruby/PGPLOT A Ruby interface to the (()) graphics library. * (()) == Requirement * (()) * GNU FORTRAN compiler * (()) version 0.5/0.6 == Download * (()) == Installation * PGPLOT * (()) * (()) * Install Ruby/PGPLOT * (()) * (()) == Examples * ((<(({pgline})) : Line plot|URL:pgline.html>)) * ((<(({pghist})) : Histogram plot|URL:pghist.html>)) * ((<(({pgcont})) : Contour map|URL:pgcont.html>)) * ((<(({pgimag})) : Image map|URL:pgimag.html>)) == Manual * (()) * (()) * (()) (in Japanese) * (()) (in Japanese) == Link * (()) - simple mongo-like plotting library using Ruby/PGPLOT. =end ruby-pgplot-0.1.9/doc/install.ja.rd000066400000000000000000000105571211436746200171560ustar00rootroot00000000000000=begin = PGPLOTのインストール PGPLOTは configure を使わないのでインストールが若干面倒です。 以下は Solaris、GCC という環境でPGPLOTをコンパイル、 インストールする手順を説明します。 他のOSでもUNIXならほとんど同じようにしてインストールできると思います。 ((<本家のインストール説明のページ|URL:http://www.astro.caltech.edu/~tjp/pgplot/install.html>)) もご覧下さい。 === PGPLOTのソースを用意 (()) から ((<ソースコード|URL:ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz>)) をダウンロード、展開し、pgplotのディレクトリに移動します。 gunzip -c pgplot5.2.tar.gz | tar xvf - cd pgplot === 作業ディレクトリを作成 作業ディレクトリを作ります。ここでは build という名前にします。 mkdir build cd build === drivers.listを編集 PGPLOTで描画を出力するドライバを選択します。 drivers.list というファイルをコピーしてエディタで開き、 使いたいドライバの行の頭の ! の文字を削除します。 cp ../drivers.list . vi drivers.list ドライバはお好みで選択できますが、UNIXなら PNG, PPM, Postscipt, XWD, XWINDOW, XSERVE, XTERM あたりを選んでおくのが一般的でしょう。 PNG driverを組み込むには、 (()) が必要です。 他にもたくさんのドライバが含まれていますが、 プリンタドライバの中にはコンパイルの時にエラーが出るものがあったり、 GIFはライセンスに引っ掛かったりします。 === makefile 作成 次のコマンドで makefile を作成します。 ../makemake .. sol2 g77_gcc 1番目の引数はソースのあるディレクトリの指定です。 ここではソースディレクトリの下にいるので、((%..%)) を指定します。 2番目の引数はOSの種類で、ソースディレクトリにある ((%sys_*%)) というディレクトリの中の ((%*%)) の部分を指定します。 3番目の引数はコンパイラなどの設定で、sys_* の下にある ((%*.conf%)) というファイルの ((%*%)) の部分を指定します。 もしこの中になければ、最も近そうなやつを選びます。 makefile を作成したら、ざっと見て設定が正しいかチェックします。 ここで、PGPLOT ver 5.2.2 で PNG driverを使う場合、 吐き出された makefile は、 pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h というまずい設定になっているので、この行を削除します。 === コンパイル makefile を編集したら、ライブラリをコンパイルします。 make make cpg === インストール make install が用意されていないので、手動でコピーします。 必要なら root になってください。 まずインストール先のディレクトリを環境変数にセットします。 csh系なら、 setenv PREFIX /usr/local setenv PGPLOT_DIR ${PREFIX}/pgplot インストール先は自由に選べますが、 コンパイル時にパス指定が必要になるかもしれません。 次に必要なファイルをコピーします。 cp -p libpgplot.a libpgplot.so* libcpgplot.a ${PREFIX}/lib cp -p cpgplot.h ${PREFIX}/include mkdir ${PGPLOT_DIR} cp -p grfont.dat rgb.txt pgxwin_server ${PGPLOT_DIR} これでインストール終了です。 === デモの実行 コンパイルがうまくいったかどうかデモプログラムを走らせてみましょう。 コンパイルしたディレクトリに pgdemo1 から pgdemo17 までと cpgdemo という実行ファイルができているはずです。それらを実行できれば正しく コンパイルされているはずです。 === ユーザ設定 PGPLOTを使うユーザは、環境変数へ次の設定しておくとよいでしょう。 setenv PGPLOT_DIR /usr/local/pgplot setenv PGPLOT_DEV /xwin PGPLOT_DIR は上でインストールしたディレクトリと同じ、 PGPLOT_DEV はデフォルトのデバイスです。 その他の環境変数は特に設定しなくてもいいと思いますが、詳しくは ((<ここ|URL:http://www.astro.caltech.edu/~tjp/pgplot/chapter1.html#ENV>)) をご覧下さい。 <<< trailer =end ruby-pgplot-0.1.9/doc/method.ja.rd000066400000000000000000000116311211436746200167620ustar00rootroot00000000000000=begin = module Pgplot == モジュールメソッド === 操作 --- pgopen([device]) PGPLOTセッションを開始する。戻り値としてステータスを返す。 --- pgbeg([device, [nxsub, [nysub]]]) (obsolete) PGPLOTセッションを開始する。戻り値としてステータスを返す。 --- pgask( [true|false] ) --- pgenv( xmin,xmax,ymin,ymax [,just, axis] ) === 線・マーカの描画 --- pgline( xarray, yarray ) xarray, yarray を結ぶ線を描く。 xarray, yarray はそれぞれ X, Y 座標の配列。 --- pgpt( xarray, yarray [,symbol] ) xarray, yarray の位置に、symbol のマーカを描く。 --- pgpnts( xarray, yarray, symarray ) xarray, yarray の位置に、対応する symarray のマーカをそれぞれ描く。 === ヒストグラム --- pgbin( xarray, yarray [,center] ) --- pghist( data, nbin [,range, flag] ) === エラーバー --- pgerrb( dir, x, y, err [,tlen] ) エラーバーを描く。 tlen に端点に描くバーの長さを指定。 + 片側エラーバー: * dir = 1 for +X (X to X+err) * dir = 2 for +Y (Y to Y+err) * dir = 3 for -X (X to X-err) * dir = 4 for -Y (Y to Y-err) + 両側エラーバー: * dir = 5 for +/-X (X-err to X+err) * dir = 6 for +/-Y (Y-err to Y+err) --- pgerrx( x1, x2, y [,tlen] ) x1 から x2 までを結ぶエラーバーを描く。 tlen に端点に描くバーの長さを指定。 --- pgerry( x, y1, y2 [,tlen] ) y1 から y2 までを結ぶエラーバーを描く。 tlen に端点に描くバーの長さを指定。 === 等高線 --- pgcont( map, cont [,tr] ) map で与えた2次元マップの等高線を描く。 cont には等高線のレベルまたはその配列を与える。 --- pgcons( map, cont [,tr] ) PGCONTより速いアルゴルズムで描くんだそうな。 --- pgconb( map, cont [,blank, tr] ) blankで与えた値を欠損値として等高線を描く。 --- pgconf( map, cont_range [,tr] ) cont_range に Rangeクラスオブジェクトで与えた範囲のレベルを塗り潰す。 --- pgconl( map, cont, label [,intval, minint, tr] ) 等高線にラベルをつける。 === 画像 --- pgimag( array [,range, tr] ) カラースケールで array (2次元配列) の画像を描く。 --- pgctab( l, r,g,b [,contra,bright] ) pgimag で使用するカラーテーブルを設定する。 --- pggray( array [,range, tr] ) グレースケールで array (2次元配列) の画像を描く。 --- pgpixl( array [,x1,x2,y1,y2] ) array (2次元配列) の画像を、長方形のpixel 1つ1つで描く。 --- pgvect( x, y [,scale, pos, tr, blank] ) ベクトル場を描く。 === 座標軸の描画 --- pgtick( x1, y1, x2, y2, v, [str], {"tickl", "tickr", "disp", "orient"} ) --- pgaxis( x1, y1, x2, y2, v1, v2, {"opt", "step", "nsub", "tickl", "tickr", "frac", "disp", "orient"} ) === カーソル入力 --- pgcurs([x,y]) クリックまたはキータイプのイベントを取得する。 x,y を指定すると始めにその位置にカーソルを移動する。 イベントを取得すると カーソル位置(WC)と文字を PgCursorクラスのインスタンスで返す。 --- pgband( mode, [ xref, yref, [x, y, [posn]]]) クリックまたはキータイプのイベントを取得する。 x,y を指定すると始めにその位置にカーソルを移動する。 xref, yref はアンカー点の位置(後述)で、省略すると現在位置となる。 イベントを取得すると カーソル位置(WC)と文字を PgCursorクラスのインスタンスで返す。 modeによりカーソル入力中の描画方法を指定できる。 * mode=0 : 描画なし。 * mode=1 : アンカー点とカーソルを結ぶ線。 * mode=2 : アンカー点とカーソルを対角とする長方形。 * mode=3 : アンカー点とカーソル位置それぞれを通る2本の水平線。 * mode=4 : アンカー点とカーソル位置それぞれを通る2本の垂直線。 * mode=5 : カーソル位置を通る水平線。 * mode=6 : カーソル位置を通る垂直線。 * mode=7 : カーソル位置を通る十字線。 --- pgolin( x, y, [sym, [npt]] ) マウスカーソルで座標を連続して入力する。 x,y にはあらかじめ NArray::SFLOAT 型の配列を与えておき、 そこへクリックした順番に座標を記録していく。 入力できる個数はこの配列のサイズで制限される。 カーソルで入力した点は、マーカ sym で描画される。 npt を指定すると、あらかじめ npt 個の点が入力されているとみなす。 戻り値は入力した点の数。 --- pgncur( x, y, [sym, [npt]] ) x,yに記録される順番が x の小さい順であることを除き、pgolin と同じ。 --- pglcur( x, y, [npt] ) 入力した点を結ぶ線が描かれることを除いて、pgolin と同じ。 === ステータスを返す --- pgqinf(item) value = pgqinf(item) --- pgqdt([ndev]) type, descr, inter = pgqdt([ndev]) =end ruby-pgplot-0.1.9/doc/mkdoc.rb000066400000000000000000000162341211436746200162100ustar00rootroot00000000000000class Formatter def initialize(stream) @stream = stream end def <<(a) @stream << a end def print(*a) @stream << String(a) end def stream @stream end end class FormatterRD < Formatter def printhead @stream << " =begin = Ruby/PGPLOT method descriptions This page contains descriptions of Ruby/PGPLOT method whose arguments are modified from original PGPLOT subroutines. " end def printtrail print " <<< trailer =end " end def subject(x) @stream << x.sub(/^\s*(PG\w+)/){'=== ((*%s*))' % $1.downcase} end def methoddoc(x) s='' x=[x] if String===x x.each{|line| s << line} @stream << s end def docbegin; end def docend; end end class FormatterHTML < Formatter def encode(a) a = a.gsub(/&/,'&') a.gsub!(//,'>') a.gsub!(/\b(PG(?!PLOT)[A-Z0-9]+)/) { '%s' % [$1,$1] } a end def <<(a) @stream << encode(a) end def printhead @stream <<' index

Ruby/PGPLOT method descriptions

Most part of this document is from the original PGPLOT distribution and copyrighted by Dr. Tim Pearson. Do not redistribute this document separately from Ruby/PGPLOT distribution without his permission.

Index

' end def printtrail @stream << < EOL end def subject(x) @stream << '

' << x.sub(/^\s*(PG\w+)/) { '%s' % [$1,$1.downcase] } << "

\n" $1.downcase end def printindex(x) @stream << x.chomp.sub(/^\s*(PG\w+)/) { '
  • %s' % [$1,$1.downcase] } << "\n" end def methoddoc(x) s='' if String===x x = [x] end line = x.shift if line =~ /\(/ while line !~ /\(.*\)/m line << x.shift end end if line =~ /^---\s*(pg.*)/m @stream << "
    %s
    \n" % encode($1) while x[0]=~/^\s*$/ x.shift end if !x.empty? @stream << "
    \n--- Ruby notes ---\n"
    	x.each{|i| @stream << i}
    	@stream << "
    \n" end end @stream << "
    \n"
      end
    
      def docbegin
        #@stream << "
    \n"
      end
      def docend
        @stream << "
    \n
    \n" end end class PgDoc def autofunclist pgfunc_auto = %w( pgend:: pgbbuf:: pgebuf:: pgpage:: pgpap:1,1: pgupdt:: pgpanl:1,1: pgclos:: pgbox:2,1,0,2,1,0: pgtbox:2,1,0,2,1,0: pgvsiz:1,1,1,1: pgvstd:: pgwnad:1,1,1,1: pgsubp:0,0: pgwedg:2,1,1,1,1,2: # Draw Funcs pgdraw:1,1: pgmove:1,1: pgrect:1,1,1,1: pgarro:1,1,1,1: pgcirc:1,1,1: pgpt1:1,1,0: pgerr1:0,1,1,1,1: pglab:2,2,2: pgptxt:1,1,1,1,2: pgtext:1,1,2: pgmtxt:2,1,1,1,2: pgetxt:: pgiden:: pgldev:: pgsave:: pgunsa:: pgeras:: # Set Funcs pgsch:1: pgscf:0: pgsci:0: pgsfs:0: pgsls:0: pgslw:0: pgsclp:0: pgsitf:0: pgslct:0: pgstbg:0: pgscr:0,1,1,1: pgshls:0,1,1,1: pgsah:0,1,1: pgscrl:1,1: pgscir:0,0: pgscrn:0,2:0 pgshs:1,1,1: pgsvp:1,1,1,1: pgswin:1,1,1,1: # Query Funcs pgqch::1 pgqcf::0 pgqci::0 pgqfs::0 pgqls::0 pgqlw::0 pgqclp::0 pgqid::0 pgqitf::0 pgqndt::0 pgqtbg::0 pgqcr:0:1,1,1 pgqvp:0:1,1,1,1 pgqwin::1,1,1,1 pgqcol::0,0 pgqcir::0,0 pgqpos::1,1 pgqvsz:0:1,1,1,1 ).grep(/:.*:/).collect{|i| i.split(":",3)} @autofunc={} pgfunc_auto.each do |x| @autofunc[x[0]] = x[1..2].collect{|i| i.split(",").size} end end def manualfunclist @manualfunc={} curfunc=nil File.open("../rb_pgplot.c.in").each do |line| case line when %r'^/\* (PG\w+)' curfunc = $1.downcase @manualfunc[curfunc] = [] line.sub!(%r'^/\*\s*','') when %r'^\*/' curfunc = nil else if h = @manualfunc[curfunc] h << line end end end end def mergefunclist @mergefunc = @manualfunc.keys @autofunc.each_key do |x| @mergefunc << x end @mergefunc.sort! end def initialize(formatter, srcdir) @srcdir = srcdir autofunclist manualfunclist mergefunclist @indx = formatter.new('') @head = formatter.new('') @body = formatter.new('') @tail = formatter.new('') end def defmode() funcdef='' while @doc[0] !~ /^C/ line = @doc.shift line.chomp! if line.sub!(/^\s+SUBROUTINE /,'--- ') || line.sub!(/^\s+[A-Z0-9\s]+ FUNCTION /,'--- ') || line.sub!(/^ [^ ]\s*/,' ') funcdef << line.downcase end end #p [funcdef,@doc[0]] if @manualfunc[@name] # Definded in rb_pgplot.c.in @body.methoddoc(@manualfunc[@name]) else # Automatically generated #p [@name,@autofunc[@name]] nin = @autofunc[@name][0] nout = @autofunc[@name][1] funcdef =~ /\(\s*(\w+\s*(?:,\s*\w+\s*)*)\s*\)/ if s = $1 a = s.split(/\s*,\s*/) funcdef = "--- #{@name}" b = a[0,nin].join(', ') funcdef << "( " << b << " )" if b.size>0 b = a[nin,nout] funcdef << " #=> " << b.join(', ') if b.size>0 end @body.methoddoc(funcdef) end end def docmode() while line = @doc.shift case line when /^C%/ # C definition when /^C\+/ defmode() while @doc[0] =~ /^C\s*$/ @doc.shift end when /^C/ line.sub!(/^( :)/, ' \1') line.sub!(/^C.?/,'') @body << line << "\n" end end end def docextr(fin) @doc = [] fin.each do |line| return @doc if line =~ /^C--/ @doc << line.chomp end @doc end def doit @head.printhead @mergefunc.each do |f| if name = f[/(pg\w+)/] begin fin = open(@srcdir+'/'+name+'.f') rescue fin = nil end if fin fin.each do |line| if line.sub!(/^C\*/,'') @indx.printindex(line) @name = @body.subject(line) @body.docbegin @doc = docextr(fin) docmode() @body.docend end end end #@body << "\n\n" end end @tail.printtrail b = @head.stream b << "
      \n" << @indx.stream << "

    \n

    Descriptions

    \n" << @body.stream << @tail.stream b end end #PgDoc.new(FormatterRD.new(File.open(ARGV[0],"w"))).doit #PgDoc.new(FormatterHTML.new(File.open(ARGV[0],"w"))).doit File.open(ARGV[1],"w") << PgDoc.new(FormatterHTML,ARGV[0]).doit ruby-pgplot-0.1.9/doc/mkind.rb000066400000000000000000000016271211436746200162150ustar00rootroot00000000000000funcs = %w[ pgopen pgbeg pgask pgenv pgline pgpt pgpnts pgbin pghist pgerrb pgerrx pgerry pgcont pgcons pgconb pgconf pgconl pgimag pggray pgctab pgpixl pgvect pgband pgolin pgncur pglcur pgtick pgaxis ] rbpg={} funcs.each{|f| rbpg[f.upcase]=true } fin=open(ARGV[0]) fout=open(ARGV[1],"w") fout.print " =begin = Ruby/PGPLOT categorized method index " fin.each do |line| line.chomp! name = line[/(^PG[A-Z0-9]+)/] #line.sub!(/^# /, "===") line.sub!(/^(PG[A-Z0-9]+)/, '* (({\1}))') #if rbpg[name] # line.gsub!(/\b(PG(?!PLOT)[A-Z0-9]+)/) do |x| # '((<%s|URL:rbpg-doc.html#%s>))' % [x.downcase,x] # end # line << ' ( (()) )' % name #else line.gsub!(/\b(PG(?!PLOT)[A-Z0-9]+)/) do |x| '((<%s|URL:rbpgplot.html#%s>))' % [x.downcase,x] end #end fout.puts(line) end fout.print " <<< trailer =end " ruby-pgplot-0.1.9/doc/myrd2html.rb000066400000000000000000000016701211436746200170330ustar00rootroot00000000000000while /^--/ =~ ARGV[0] a = ARGV.shift case a when /^--title=(.*)/ $title = $1 when /^--lang=(.*)/ $lang = $1 when /^--kw=(.*)/ $kw = $1 when /^--rt/ $rt = true end end rdfile = ARGV.shift $date = File.mtime(rdfile).strftime("%b %d %Y") case $lang when 'ja' rd2 = 'rd2 -r ./rd2html-img-lib.rb --html-lang=ja --with-css=./css.css --out-code=utf8' else rd2 = 'rd2 -r ./rd2html-img-lib.rb --html-lang=en --with-css=./css.css' end rd2 << " --html-title='#{$title}'" if $title rd2 << " -r rd/rt-filter --with-part=RT:rt" if $rt IO.popen("#{rd2} #{rdfile}", "r") do |f| until f.eof s = f.readline s.sub!(%r||io) do |x| x = %|\n| + x if $kw x = %|\n| + x x end s.sub!(%r||io) do |x| x = %|
    Last update: #{$date}
    \n| + x if $date x end puts s end end ruby-pgplot-0.1.9/doc/pgcont.png000066400000000000000000000223501211436746200165620ustar00rootroot00000000000000PNG  IHDRq PLTE~$wIDATxK8rYD Sh) xtZþa{_s W`0^] hJ)1DTt)r)r)r)r)r)r)r)r)r)r)roEMp@^ ~ B&oS>~_Ote3ݝ- M,t;}uǩe ~ܘN|u:ŗm st8XSI%tN0'tNN`X۔AR[um聠>.-OO0e||]>P3F%LMaHbBи n$t>tq:nLӹfhXZEǠ_ tU4 6㬴iX3䉂/ЉAGҖFc@`зhX v Q\gCU\"R .Pmr0 t3SvTBa zp- mh:h@vtZ&h ]h64h:>4@ a64 wQmډ3Xp³z L1 `% N%<=?Ah SЫ5 5Dt) %#*Eff@c74k ,V kI[Y -R kuӁCWЙG.I+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:IENDB`ruby-pgplot-0.1.9/doc/pgcont.rd000066400000000000000000000011101211436746200163720ustar00rootroot00000000000000=begin = Ruby/PGPLOT example: pgcont === code require "narray" require "pgplot" include Pgplot # Preparing data x = NArray.sfloat(40,1).indgen!(1) y = NArray.sfloat(1,40).indgen!(1) map = NMath.cos( NMath.sqrt(x*2)*0.3 - y*0.4/3 ) * NMath.cos( x*0.4/3 ) \ + (x-y)/40 n = 21 level = NArray.sfloat(n).indgen! * (map.max-map.min)/n + map.min # Draw contour map pgopen pgenv(1,40,1,40) # set "Plotter Environment" and draw box. pgsci(3) # set Color Index to Green. pgcont map, level === output <<< pgcont.png <<< trailer =end ruby-pgplot-0.1.9/doc/pghist.png000066400000000000000000000060771211436746200165760ustar00rootroot00000000000000PNG  IHDRq PLTEER IDATxKۺ`59j@]E DV]BFAIzEY|)*]ݖ#_iJEJ)D"H$D"H$D"H$$uR)yR[]TT5p}Q pobv@JkxzEOh}W@nшM[7p0PB t2ɀ b:=uHMkW ZjBkDMuWGЈQAmHSzh#4Q;08iH4_ q5:=Tn*XjԌnKSMC7V5_np62{Zݠ5ޣU 6mЊ`} h]EEm6y`UUMV03m7ǀz==Tj=@[c2m$tC~eRD"H>y*:Zf4Ah8!9eq42&O 죁^?\@^ƻ=dB<zz{u֫ty袲{: k^P-hAA ZDЂt]@-hAA : CЂ-hA ZЂ-hA ZЂt9h3ti&8f lh󍯤1COf=rMXF}uU?U_xJ]%6}1seBseb|jjC5nB@3ރfp5)zۘnEShM/7K`a?9e.twE f#h}nx2=F4KQ\fbJmyxmytmԇwAẄKyT&Z_ c{ШFE7NΈFNOw!ZAǡߔ#:1AߦvEW]T!hAosFc'n}vGh>O7!w[-P_ڧ}w2DC|~$jA w24h;r Fkw=zjFЂΎ&w<'8I z94=*8M^hso+AYg+rGM%%9't7iW x4  !m!eǐ ] ޗerÄ&E$^4}޽G hSxDCwxDjl: y_>u>A hs<[q>BC- Cs z^5 q.gPbtT0h=v?^ЛO:A{nK:YE y$ZǠkA1&hw4ŠAOSuZ qh7 +z%< #dshÊ-4Ek7о|h恱h8MG.$h m:Aߝ+VeWhGMAxۜn%MEѿ̷"Ĺ^$>DЛXeA?LFAabP9u4A{!O,'A z#  ąV m()]p@k49 hע=XC#z3rDk.ooh_^>6ɝkwA'zL! M̝;A.]7Z@3ty: ?+3}t͋޻KwJ=vFB{>Ft,hdFXĈ67~^7?q{O׍: =J'CFMo7/H8k);qMcM)xw#)_+~wRt')Ҡ?(!R7S_3E1,M/^bѐ#ӡu,ӡihJnԟ]"@ )ћH4Do7@VM#e=kMW`AifI~KS7.RUIȎңkv4G7(=>nZ. ^AZ-`DOZnYЪcD/'%G[>Fw3񠯻2іCP|7bBS$GSUhx0trZuˋ~ t:/sU z>dd ikZUtK TvR.C_k 7,< mV,;>^V {uZ5fgʏVK]5ݿ/dBg1/C)ңUy3 v4l?OhUg4jܒV& B/,{?h?͍òa#Mh&-?^~1O4 5-^>oOϲA)]L8]|.((þ-@1z͓TRl7JWVvxFh il<%l=gu x{BJ!!;[B0pNXݽڰ}6MUjM{cgbuT>+>D"H$D"9,筝כgd ӡB2ZjUvB}4'hBI i^D"H$D"H$D"ɘmR7n[tEXtcommentPGPLOT Window 1:IENDB`ruby-pgplot-0.1.9/doc/pghist.rd000066400000000000000000000014011211436746200164010ustar00rootroot00000000000000=begin = Ruby/PGPLOT example: pghist === code require 'narray' require 'pgplot' include Pgplot pgopen srand(1) # draw main Histogram of Normal distribution data = NArray.sfloat(1000).randomn! pghist(data, 31, -3.1..3.1, 0) # draw sub Histogram of Normal distribution with gray bars data = NArray.sfloat(200).randomn!*0.5 + 1 pgsci(15) pghist(data, 31, -3.1..3.1, 3) pgsci(0) # draw black frame pghist(data, 31, -3.1..3.1, 1) pgsci(1) pgbox('BST', 0.0, 0, ' ', 0.0, 0) pglab('Variate', ' ','PGPLOT Example 4: Histograms (Gaussian)') # draw Gaussian Curve x = NArray.sfloat(620).indgen!*0.01 - 3.1 y = NMath.exp(-(x**2)*0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 [0tx@.u&aoIENDB`ruby-pgplot-0.1.9/doc/pgline.rd000066400000000000000000000007771211436746200164000ustar00rootroot00000000000000=begin = Ruby/PGPLOT example: pgline === code require 'narray' require 'pgplot' include Pgplot n = 100 x = NArray.sfloat(n).indgen!/10 y = NMath.sin(x) pgopen # open PGPLOT session pgenv 0, n/10, -1, 1 # set "Plotter Environment" and draw box. pglab "x", "y", "PGPLOT Example: y = sin(x)" pgsci 2 # set Color Index = Red. pgslw 5 # set Line Width. pgline x, y # plot Line. === output <<< pgline.png <<< trailer =end ruby-pgplot-0.1.9/doc/pgplot.png000066400000000000000000001627071211436746200166100ustar00rootroot00000000000000PNG  IHDRTBTIDATx{-U8ܧueڒ%cHcdqHlbIHBH )` eQI8qlUTBrđE@dK`ٖt={usv׮}Ι=ӳfo}k-`׈ڡ>k5ڧ|Q+xHǹiiOc1~OW}jGڶbW;]UU]nڦ8xs 7pE{OD9@133s7̳lH??yK Roppp0Lsk>|3O>}K.]{zֳ988GX}^ c׵vtf>s̳.\ܹsgΜ|24W~O:uEf|M;m#ִw}+_3g|| }8~q'OG?׽G{_|wO<OO|ux/h4/ z ^~oOzkk_׿Ƙ?uwqu}3ẮkZO|0Tw{eZf~s_Wy{fk۾^ӧOu]og?^{?禛no___u_wܹ?gs~Fii-qox?:A~w}ׅ &o}[ַpOOW/ſ믿GQ7t^wu/{_ +;;׽u_%__e_ G>g ?믿wow圻kg8q.\xы^Ї6Me_eGnV>c7l6/忼U2|X}׿?7O|kk??YU//Oӷrˣ> tMO>mKK}Coxwy{ӛޔ O8{~md2?=`mEȾ5-Uz7~7s=zիwwG꫾}{w(ƏsXMozӕ+W>4Mg<b8}t?O~~}罿ޟ=ymۿ'?} "Ѿ~z;cyŞ:uk o=88xԩژ7oW~W|3yp 7@7tӿ뮻noo'>oڑm$eM @ _‡~'C=/{}/}K~ow]gΜ>p7p y{>O>#/zы>N&Wʙ3g~~'|ӛ}(胡:u[np77c~|\>c7pûg?ٿ]w|׼/x۾뮻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746200166220ustar00rootroot00000000000000 =begin = Ruby/PGPLOT categorized method index === Drawing primitives * (({(())})) -- draw a polyline (curve defined by line-segments) * (({(())})) -- draw a polygon, using fill-area attributes * (({(())})) -- draw one graph marker * (({(())})) -- draw several graph markers * (({(())})) -- draw several graph markers, not all the same * (({(())})) -- draw an arrow * (({(())})) -- draw a circle, using fill-area attributes * (({(())})) -- draw a rectangle, using fill-area attributes * (({(())})) -- move pen (change current pen position) * (({(())})) -- draw a line from the current pen position to a point === Axis * (({(())})) -- draw an axis * (({(())})) -- draw labeled frame around viewport * (({(())})) -- draw a single tick mark on an axis * (({(())})) -- draw frame and write (DD) HH MM SS.S labelling === Text * (({(())})) -- write labels for x-axis, y-axis, and top of plot * (({(())})) -- write text (horizontal, left-justified) * (({(())})) -- write text at position relative to viewport * (({(())})) -- write text at arbitrary position and angle * (({(())})) -- erase text from graphics display * (({(())})) -- write username, date, and time at bottom of plot * (({(())})) -- find length of a string in a variety of units * (({(())})) -- find bounding box of text string === Histgram * (({(())})) -- histogram of binned data * (({(())})) -- histogram of unbinned data === Error bar * (({(())})) -- horizontal or vertical error bar * (({(())})) -- horizontal or vertical error bar * (({(())})) -- horizontal error bar * (({(())})) -- vertical error bar === 2D drawing * (({(())})) -- contour map of a 2D data array (contour-following) * (({(())})) -- contour map of a 2D data array (fast algorithm) * (({(())})) -- contour map of a 2D data array, with blanking * (({(())})) -- fill between two contours * (({(())})) -- label contour map of a 2D data array * (({(())})) -- contour map of a 2D data array (non rectangular) (not implemented in Ruby/PGPLOT) * (({(())})) -- color image from a 2D data array * (({(())})) -- install the color table to be used by (()) * (({(())})) -- gray-scale map of a 2D data array * (({(())})) -- draw pixels * (({(())})) -- vector map of a 2D data array, with blanking * (({(())})) -- annotate an image plot with a wedge * (({(())})) -- cross-sections through a 2D data array === Cursor * (({(())})) -- read cursor position, with anchor * (({(())})) -- read cursor position * (({(())})) -- draw a line using the cursor * (({(())})) -- mark a set of points using the cursor * (({(())})) -- mark a set of points using the cursor === Control * (({(())})) -- open a graphics device * (({(())})) -- open a graphics device * (({(())})) -- close the selected graphics device * (({(())})) -- close all open graphics devices * (({(())})) -- set window and viewport and draw labeled frame * (({(())})) -- control new page prompting * (({(())})) -- advance to new page * (({(())})) -- erase all graphics from current page * (({(())})) -- begin batch of output (buffer) * (({(())})) -- end batch of output (buffer) * (({(())})) -- switch to a different panel on the view surface * (({(())})) -- change the size of the view surface * (({(())})) -- choose axis limits * (({(())})) -- save PGPLOT attributes * (({(())})) -- restore PGPLOT attributes * (({(())})) -- scroll window * (({(())})) -- subdivide view surface into panels * (({(())})) -- update display === Set attributes * (({(())})) -- set arrow-head style * (({(())})) -- set character font * (({(())})) -- set character height * (({(())})) -- set color index * (({(())})) -- set color index range * (({(())})) -- enable or disable clipping at edge of viewport * (({(())})) -- set color representation * (({(())})) -- set color representation by name * (({(())})) -- set fill-area style * (({(())})) -- set color representation using HLS system * (({(())})) -- set hatching style * (({(())})) -- set image transfer function * (({(())})) -- select an open graphics device * (({(())})) -- set line style * (({(())})) -- set line width * (({(())})) -- set text background color index * (({(())})) -- set viewport (normalized device coordinates) * (({(())})) -- set window * (({(())})) -- set viewport (inches) * (({(())})) -- set standard (default) viewport * (({(())})) -- set window and adjust viewport to same aspect ratio === Inquire attributes * (({(())})) -- list available device types on standard output * (({(())})) -- inquire arrow-head style * (({(())})) -- inquire character font * (({(())})) -- inquire character height * (({(())})) -- inquire color index * (({(())})) -- inquire color index range * (({(())})) -- inquire clipping status * (({(())})) -- inquire color capability * (({(())})) -- inquire color representation * (({(())})) -- inquire character height in a variety of units * (({(())})) -- inquire name of nth available device type * (({(())})) -- inquire fill-area style * (({(())})) -- inquire hatching style * (({(())})) -- inquire current device identifier * (({(())})) -- inquire PGPLOT general information * (({(())})) -- inquire image transfer function * (({(())})) -- inquire line style * (({(())})) -- inquire line width * (({(())})) -- inquire number of available device types * (({(())})) -- inquire current pen position * (({(())})) -- inquire text background color index * (({(())})) -- inquire viewport size and position * (({(())})) -- inquire size of view surface * (({(())})) -- inquire window boundary coordinates ==== Hereafter not implemented in Ruby/PGPLOT === Utility * (({(())})) -- convert a number into a plottable character string * (({(())})) -- find the smallest `round' number greater than x === Drawing function * (({(())})) -- function defined by X = F(T), Y = G(T) * (({(())})) -- function defined by Y = F(X) * (({(())})) -- function defined by X = F(Y) === Alias * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) * (({(())})) -- non-standard alias for (()) <<< trailer =end ruby-pgplot-0.1.9/doc/rbpg-ind.txt000066400000000000000000000130231211436746200170220ustar00rootroot00000000000000=== Drawing primitives PGLINE -- draw a polyline (curve defined by line-segments) PGPOLY -- draw a polygon, using fill-area attributes PGPT1 -- draw one graph marker PGPT -- draw several graph markers PGPNTS -- draw several graph markers, not all the same PGARRO -- draw an arrow PGCIRC -- draw a circle, using fill-area attributes PGRECT -- draw a rectangle, using fill-area attributes PGMOVE -- move pen (change current pen position) PGDRAW -- draw a line from the current pen position to a point === Axis PGAXIS -- draw an axis PGBOX -- draw labeled frame around viewport PGTICK -- draw a single tick mark on an axis PGTBOX -- draw frame and write (DD) HH MM SS.S labelling === Text PGLAB -- write labels for x-axis, y-axis, and top of plot PGTEXT -- write text (horizontal, left-justified) PGMTXT -- write text at position relative to viewport PGPTXT -- write text at arbitrary position and angle PGETXT -- erase text from graphics display PGIDEN -- write username, date, and time at bottom of plot PGLEN -- find length of a string in a variety of units PGQTXT -- find bounding box of text string === Histgram PGBIN -- histogram of binned data PGHIST -- histogram of unbinned data === Error bar PGERR1 -- horizontal or vertical error bar PGERRB -- horizontal or vertical error bar PGERRX -- horizontal error bar PGERRY -- vertical error bar === 2D drawing PGCONT -- contour map of a 2D data array (contour-following) PGCONS -- contour map of a 2D data array (fast algorithm) PGCONB -- contour map of a 2D data array, with blanking PGCONF -- fill between two contours PGCONL -- label contour map of a 2D data array PGCONX -- contour map of a 2D data array (non rectangular) (not implemented in Ruby/PGPLOT) PGIMAG -- color image from a 2D data array PGCTAB -- install the color table to be used by PGIMAG PGGRAY -- gray-scale map of a 2D data array PGPIXL -- draw pixels PGVECT -- vector map of a 2D data array, with blanking PGWEDG -- annotate an image plot with a wedge PGHI2D -- cross-sections through a 2D data array === Cursor PGBAND -- read cursor position, with anchor PGCURS -- read cursor position PGLCUR -- draw a line using the cursor PGNCUR -- mark a set of points using the cursor PGOLIN -- mark a set of points using the cursor === Control PGOPEN -- open a graphics device PGBEG -- open a graphics device PGCLOS -- close the selected graphics device PGEND -- close all open graphics devices PGENV -- set window and viewport and draw labeled frame PGASK -- control new page prompting PGPAGE -- advance to new page PGERAS -- erase all graphics from current page PGBBUF -- begin batch of output (buffer) PGEBUF -- end batch of output (buffer) PGPANL -- switch to a different panel on the view surface PGPAP -- change the size of the view surface PGRNGE -- choose axis limits PGSAVE -- save PGPLOT attributes PGUNSA -- restore PGPLOT attributes PGSCRL -- scroll window PGSUBP -- subdivide view surface into panels PGUPDT -- update display === Set attributes PGSAH -- set arrow-head style PGSCF -- set character font PGSCH -- set character height PGSCI -- set color index PGSCIR -- set color index range PGSCLP -- enable or disable clipping at edge of viewport PGSCR -- set color representation PGSCRN -- set color representation by name PGSFS -- set fill-area style PGSHLS -- set color representation using HLS system PGSHS -- set hatching style PGSITF -- set image transfer function PGSLCT -- select an open graphics device PGSLS -- set line style PGSLW -- set line width PGSTBG -- set text background color index PGSVP -- set viewport (normalized device coordinates) PGSWIN -- set window PGVSIZ -- set viewport (inches) PGVSTD -- set standard (default) viewport PGWNAD -- set window and adjust viewport to same aspect ratio === Inquire attributes PGLDEV -- list available device types on standard output PGQAH -- inquire arrow-head style PGQCF -- inquire character font PGQCH -- inquire character height PGQCI -- inquire color index PGQCIR -- inquire color index range PGQCLP -- inquire clipping status PGQCOL -- inquire color capability PGQCR -- inquire color representation PGQCS -- inquire character height in a variety of units PGQDT -- inquire name of nth available device type PGQFS -- inquire fill-area style PGQHS -- inquire hatching style PGQID -- inquire current device identifier PGQINF -- inquire PGPLOT general information PGQITF -- inquire image transfer function PGQLS -- inquire line style PGQLW -- inquire line width PGQNDT -- inquire number of available device types PGQPOS -- inquire current pen position PGQTBG -- inquire text background color index PGQVP -- inquire viewport size and position PGQVSZ -- inquire size of view surface PGQWIN -- inquire window boundary coordinates ==== Hereafter not implemented in Ruby/PGPLOT === Utility PGNUMB -- convert a number into a plottable character string PGRND -- find the smallest `round' number greater than x === Drawing function PGFUNT -- function defined by X = F(T), Y = G(T) PGFUNX -- function defined by Y = F(X) PGFUNY -- function defined by X = F(Y) === Alias PGADVANCE -- non-standard alias for PGPAGE PGBEGIN -- non-standard alias for PGBEG PGCURSE -- non-standard alias for PGCURS PGLABEL -- non-standard alias for PGLAB PGMTEXT -- non-standard alias for PGMTXT PGNCURSE -- non-standard alias for PGNCUR PGPAPER -- non-standard alias for PGPAP PGPOINT -- non-standard alias for PGPT PGPTEXT -- non-standard alias for PGPTXT PGVPORT -- non-standard alias for PGSVP PGVSIZE -- non-standard alias for PGVSIZ PGVSTAND -- non-standard alias for PGVSTD PGWINDOW -- non-standard alias for PGSWIN ruby-pgplot-0.1.9/doc/rbpg-relabel.rb000066400000000000000000000002201211436746200174350ustar00rootroot00000000000000#ARGF.each do |line| gsub!(/name="(.+?)"/, %Q[name="#{$1.upcase}"]) if $_=~/^

    (pg\w+?)<\/em>/ # end # print line #end ruby-pgplot-0.1.9/doc/rd2html-img-lib.rb000066400000000000000000000005161211436746200200010ustar00rootroot00000000000000require "rd/rd2html-lib" module RD class RD2HTMLVisitor # RDVisitor#apply_to_Include def apply_to_Include(content) if /^(.+\.(?:png|gif|jpg))(?::(.+))?$/ === content.filename m = %Q[

    $2

    \n] m else super end end end end ruby-pgplot-0.1.9/doc/trailer.html000066400000000000000000000000661211436746200171120ustar00rootroot00000000000000
    Ruby/PGPLOT by Masahiro Tanaka ruby-pgplot-0.1.9/doc/tutorial-01.ja.rd000066400000000000000000000064421211436746200175670ustar00rootroot00000000000000=begin = Ruby/PGPLOT 導入編 == 折れ線グラフを描く Ruby/PGPLOTで折れ線グラフを描く最小限のスクリプトは、以下のようになります。 require 'narray' require 'pgplot' include Pgplot pgopen # デバイスを開く pgenv( 0, 5, 0, 5 ) # 枠の設定と描画 pgline( [1,2,3,4], [1,4,1,4] ) # 折れ線の描画 以下このスクリプトについて詳しく説明します。 1行目、2行目で拡張ライブラリをロードします。 3行目では Pgplotモジュールをインクルードしています。 これをしないと Pgplotのメソッドを呼ぶとき、``Pgplot.pgopen'' というように モジュール名をメソッドの前に省略しないで書かなければなりません。 インクルードするかどうかは場合によります。 Pgplotモジュールのメソッド名は(今のところ)皆 ``pg'' で始まっているので、 気をつければ名前がぶつかる確率は低いと思いますが、 確実を期すならインクルードしない方がよいかもしれません。 4行目の pgopen で PGPLOT のグラフィクスデバイスを開きます。 ここで引数を書かないと使用するデバイスを聞いてきます。 Graphics device/type (? to see list, default /xwin): デフォルトのままで良ければ単にリターンキーを押します。 デフォルトのデバイスは環境変数 PGPLOT_DEV で設定したものになっています。 `?'とリターンを打ち込むと、使用できるデバイスの一覧が表示されるので、 その中から別のデバイスを選択することもできます。 例えば、PNGとしてファイルに書き出したいときは、 ``plot1.png/png'' のように「ファイル名/デバイス名」というように指定します。 5行目の pgenv( 0, 5, 0, 5 ) により、グラフの軸を決定し、枠と目盛を描画します。 引数は x-min, x-max, y-min, y-max の順です。 ここではX軸が0から5、Y軸が0から5までの範囲の枠を描きます。 以降はここで設定された座標をもとに描画します。 そしていよいよ、6行目の pgline( [1,2,3,4], [1,4,1,4] ) で、折れ線グラフを描きます。 引数には線を結ぶ点のX座標とY座標をそれぞれ配列で渡します。 ここまで成功すれば、このようなグラフが描かれているはずです。 <<< plot1.png 以上が折れ線グラフを描くのに最低限必要なメソッドです。 ところで、このスクリプトにはデバイスを閉じるメソッドがありません。 CかFORTRAN版のPGPLOTであれば、 ここで最後に pgend を呼んでデバイスを閉じる必要があります。 そうしないと、デバイスが Postscript などのとき、 終了処理がされないので、不完全なファイルができてしまいます。 しかし Ruby/PGPLOTでは、Rubyインタプリタ終了時に pgend を自動的に呼ぶようになっているので、 必ずしも最後に pgend を呼ぶ必要はありません。 ただしRubyの実行途中でPGPLOTを終了したいときのために Ruby版でも pgend メソッドは用意してあります。 以下続く(かもしれない) <<< trailer =end ruby-pgplot-0.1.9/doc/up.sh000066400000000000000000000004341211436746200155410ustar00rootroot00000000000000sftp rubyforge < # # This program is free software. # You can distribute/modify this program # under the same terms as Ruby itself. # NO WARRANTY. $pgfuncs = %w( pgend:: pgbbuf:: pgebuf:: pgpage:: pgpap:1,1: pgupdt:: pgpanl:1,1: pgclos:: pgbox:2,1,0,2,1,0: pgtbox:2,1,0,2,1,0: pgvsiz:1,1,1,1: pgvstd:: pgwnad:1,1,1,1: pgsubp:0,0: pgwedg:2,1,1,1,1,2: # Draw Funcs pgdraw:1,1: pgmove:1,1: pgrect:1,1,1,1: pgarro:1,1,1,1: pgcirc:1,1,1: pgpt1:1,1,0: pgerr1:0,1,1,1,1: pglab:2,2,2: pgptxt:1,1,1,1,2: pgtext:1,1,2: pgmtxt:2,1,1,1,2: pgetxt:: pgiden:: pgldev:: pgsave:: pgunsa:: pgeras:: # Set Funcs pgsch:1: pgscf:0: pgsci:0: pgsfs:0: pgsls:0: pgslw:0: pgsclp:0: pgsitf:0: pgslct:0: pgstbg:0: pgscr:0,1,1,1: pgshls:0,1,1,1: pgsah:0,1,1: pgscrl:1,1: pgscir:0,0: pgscrn:0,2:0 pgshs:1,1,1: pgsvp:1,1,1,1: pgswin:1,1,1,1: # Query Funcs pgqch::1 pgqcf::0 pgqci::0 pgqcs:0:1,1 pgqfs::0 pgqls::0 pgqlw::0 pgqclp::0 pgqid::0 pgqitf::0 pgqndt::0 pgqtbg::0 pgqcr:0:1,1,1 pgqvp:0:1,1,1,1 pgqwin::1,1,1,1 pgqcol::0,0 pgqcir::0,0 pgqpos::1,1 pgqvsz:0:1,1,1,1 ).grep(/:.*:/).collect{|i| i.split(":",3)} def pgfuncgen(name, inp, out) inp = inp.split(",").collect{|i| i.to_i} out = out.split(",").collect{|i| i.to_i} ninp = inp.size nout = out.size # int->0, float->1 val2 = ["NUM2INT","NUM2DBL","StringValuePtr"] type = ["int","float",nil] conv = ["INT2NUM","rb_float_new",nil] # Initialize Array prot = ["VALUE obj"] pass = [] vars = [] retn = [] inp.each_with_index { |i,x| prot << "VALUE arg#{x}" pass << "#{val2[i]}(arg#{x})" } out.each_with_index { |i,x| vars << "#{type[i]} var#{x};" pass << "&var#{x}" retn << "#{conv[i]}(var#{x})" } if nout==0 then retn = "Qtrue"; elsif nout>1 then retn = "rb_ary_new3(#{nout},"+retn.join(",")+")" else retn = retn.join("") end vars = vars.join("") prot = prot.join(",") pass = pass.join(",") return " static VALUE rb_pgplot_#{name}(#{prot}) { #{vars} c#{name}(#{pass}); return #{retn}; } " end def cogen_pgplot fin = open("rb_pgplot.c.in","r") fout = open("rb_pgplot.c","w") while l = fin.gets if /--- auto-generated funcs will be placed here ---/ =~ l $pgfuncs.each{|x| fout.print pgfuncgen(*x)} elsif /--- auto-generated defs will be placed here ---/ =~ l $pgfuncs.each{|x| n = x[1].split(",").size fout.print " rb_define_module_function(mPgplot,\"#{x[0]}\",rb_pgplot_#{x[0]},#{n});\n"} else fout.print end end end cogen_pgplot if $0 == __FILE__ ruby-pgplot-0.1.9/ext/depend000066400000000000000000000001421211436746200157720ustar00rootroot00000000000000rb_pgplot.c: rb_pgplot.c.in cogen.rb $(RUBY) cogen.rb rb_pgplot.o: rb_pgplot.c $(hdrdir)/ruby.h ruby-pgplot-0.1.9/ext/extconf-auto.rb000066400000000000000000000036631211436746200175640ustar00rootroot00000000000000# extconf.rb : Configure script for Ruby/PGPLOT # # Copyright (c) 2000,2001 Masahiro TANAKA # # This program is free software. # You can distribute/modify this program # under the same terms as Ruby itself. # NO WARRANTY. # # usage: ruby extconf.rb [configure options] # Narray is now Gem based, so require rubygems # so that we can use Gem class to find narray. load "./extconf.rb" exit if $have_pgplot exit unless %w[gfortran g77].any?{|cmd| system("which #{cmd}")} puts "enabling auto-build PGPLOT Library..." $subdir = 'build_lib' $CFLAGS = "-I#{$subdir}/build "+$CFLAGS $LDFLAGS = "-L#{$subdir}/build "+$LDFLAGS $libs = append_library($libs, "pgplot") $libs = append_library($libs, "cpgplot") $defs.push '-DPGPLOT_DIR=\\"$(PGPLOT_DIR)\\"' # Generate Makefile create_makefile("pgplot") # Append PGPLOT install task to Makefile if $makefile_created puts "appending extra install tasks to Makefile" File.open("Makefile","a") do |w| w.print < # # This program is free software. # You can distribute/modify this program # under the same terms as Ruby itself. # NO WARRANTY. # # usage: ruby extconf.rb [configure options] # Narray is now Gem based, so require rubygems # so that we can use Gem class to find narray. require "mkmf" #$DEBUG = true # configure options: # --with-x11-dir=path # --with-x11-include=path # --with-x11-lib=path dir_config("x11") # configure options: # --with-pgplot-dir=path # --with-pgplot-include=path # --with-pgplot-lib=path dir_config("pgplot") # Otherwise you can also specify: # --with-opt-dir=path # --with-opt-include=path # --with-opt-lib=path def find_dir_w_file(d,h) g = Dir.glob(RbConfig.expand(d+"/"+h)) File.dirname(g.last) if g and !g.empty? end def find_dir_in_gemspec begin require 'rubygems' if gemspec=Gem::Specification.find_by_path('narray') return File.join(gemspec.full_gem_path, gemspec.require_path) end rescue end nil end # Check NArray gems_dir="$(rubylibprefix)/gems/$(ruby_version)/gems/" narray_d="narray-0.[56].*" narray_h="narray.h" if narray_h_dir = find_dir_in_gemspec || find_dir_w_file("../"+narray_d,narray_h) || find_dir_w_file(gems_dir+narray_d,narray_h) || find_dir_w_file(CONFIG['sitearchdir'],narray_h) || find_dir_w_file(CONFIG['archdir'],narray_h) $CPPFLAGS = " -I#{narray_h_dir} " + $CPPFLAGS end exit unless have_header("narray.h") if RUBY_PLATFORM =~ /cygwin|mingw/ $LDFLAGS = " -L#{CONFIG['sitearchdir']} "+$LDFLAGS exit unless have_library("narray","na_make_object") end # Check FORTRAN Libraries # # SUN WorkShop FORTRAN 77 compiler ver5.0 # configure options: --with-sunws if with_config("sunws") $libs = "-lM77 -lsunmath "+$libs exit unless find_library("F77", "f77_init", "/opt/SUNWspro/lib") $defs.push "-DSPARC_FORTRAN" # # GNU FORTRAN v4 elsif have_library("gfortran") $CFLAGS = "-Wall "+$CFLAGS $defs.push "-DGNU_FORTRAN" # # GNU FORTRAN v3 elsif have_library("g77") $CFLAGS = "-Wall "+$CFLAGS $defs.push "-DGNU_FORTRAN" else puts "failed" exit end # Check GrWin Library (for cygwin (and mingw32?)) # configure options: --with-grwin if with_config("grwin") #$LDFLAGS = "-Wl,--subsystem,console "+$LDFLAGS if RUBY_PLATFORM =~ /cygwin|mingw/ $libs += " -mwindows" end exit unless have_library("GrWin", "GWinit") end $found_lib = [] # Check X11 Library if have_library("X11", "XOpenDisplay") $found_lib << 'X11' end # Check PNG Library libs_save = $libs $libs = append_library($libs, "z") if have_library("png","png_create_write_struct") $found_lib << 'png' else $libs = libs_save end $libs = append_library($libs, "pgplot") $have_pgplot = false # Check PGPLOT Header if have_header("cpgplot.h") # Check PGPLOT Library if find_library("cpgplot","cpgbeg", "/usr/lib", "/usr/local/lib", "/usr/local/pgplot" ) $have_pgplot = true end end $objs = %w(rb_pgplot.o kwarg.o) if $have_pgplot # Generate Makefile create_makefile("pgplot") end ruby-pgplot-0.1.9/ext/kwarg.c000066400000000000000000000032551211436746200160770ustar00rootroot00000000000000/* kwarg.c : Process keyword arguments for Ruby Copyright (c) 2001 Masahiro TANAKA This program is free software. You can distribute/modify this program under the same terms as Ruby itself. NO WARRANTY. */ #include /* void rb_scan_kw_args __((VALUE, ...)); */ static VALUE kw_hash_i(i, tmp) VALUE i, tmp; { VALUE key; key = RARRAY_PTR(i)[0]; if (TYPE(key)==T_SYMBOL) { key = rb_funcall(key, rb_intern("id2name"), 0); } else if (TYPE(key)!=T_STRING) { rb_raise(rb_eArgError, "keywords must be String or Symbol"); } rb_hash_aset(tmp, key, RARRAY_PTR(i)[1]); return Qnil; } #ifdef HAVE_STDARG_PROTOTYPES #include #define va_init_list(a,b) va_start(a,b) #else #include #define va_init_list(a,b) va_start(a) #endif void #ifdef HAVE_STDARG_PROTOTYPES rb_scan_kw_args(VALUE hash, ...) #else rb_scan_kw_args(hash, va_alist) VALUE hash; va_dcl #endif { char *key; VALUE *var, val, str, tmp; va_list vargs; va_init_list(vargs, hash); tmp = rb_hash_new(); if (TYPE(hash) == T_HASH) rb_iterate(rb_each, hash, kw_hash_i, tmp); else if (hash != Qnil) rb_fatal("rb_san_kw_args: non-hash arg passed"); for (;;) { key = va_arg(vargs, char*); if (!key) break; var = va_arg(vargs, VALUE*); str = rb_str_new2(key); val = rb_funcall(tmp, rb_intern("delete"), 1, str); if (var) *var = val; } if (rb_funcall(tmp, rb_intern("empty?"), 0)==Qfalse) { val = rb_funcall(tmp, rb_intern("keys"), 0); val = rb_funcall(val, rb_intern("join"), 1, rb_str_new2(",")); rb_raise(rb_eArgError, "unknown keywords: %s",StringValuePtr(val)); } va_end(vargs); } ruby-pgplot-0.1.9/ext/rb_pgplot.c.in000066400000000000000000001112361211436746200173600ustar00rootroot00000000000000/* rb_pgplot.c : Ruby/PGPLOT extension library Copyright (c) 2000,2001 Masahiro TANAKA This program is free software. You can distribute/modify this program under the same terms as Ruby itself. NO WARRANTY. */ #include #include #include #include "narray.h" #include "version.h" #define min(a,b) (((a)<(b))?(a):(b)) #define rb_pgplot_fltary(obj) na_cast_object(obj,NA_SFLOAT) #define rb_pgplot_intary(obj) na_cast_object(obj,NA_LINT) #define rb_pgplot_newary(rank,shape) na_make_object(NA_SFLOAT,rank,shape,cNArray) #define NA_PTR_FLT(dta) (float*)(((struct NARRAY*)DATA_PTR(dta))->ptr) #define NA_PTR_INT(dta) (int*)(((struct NARRAY*)DATA_PTR(dta))->ptr) #ifndef NA_RANK #define NA_RANK(dta) (((struct NARRAY*)DATA_PTR(dta))->rank) #endif #ifndef NA_TYPE #define NA_TYPE(dta) (((struct NARRAY*)DATA_PTR(dta))->type) #endif #ifndef NA_TOTAL #define NA_TOTAL(dta) (((struct NARRAY*)DATA_PTR(dta))->total) #endif #ifndef NA_SHAPE0 #define NA_SHAPE0(dta) (((struct NARRAY*)DATA_PTR(dta))->shape[0]) #endif #ifndef NA_SHAPE1 #define NA_SHAPE1(dta) (((struct NARRAY*)DATA_PTR(dta))->shape[1]) #endif static VALUE mPgplot; static VALUE cPgCursor; static VALUE ePgCursorError; static ID id_beg, id_end, id_x, id_y, id_char; #ifdef GNU_FORTRAN void MAIN__() {} /* Ruby has no 'MAIN__'! ; How should I handle this??? */ #endif /* Search Minimum and Maximum values of array */ static void rb_pgplot_minmax(VALUE na, float range[]) { int i; float *ptr = NA_PTR_FLT(na); range[0] = range[1] = *ptr; ptr++; for (i=NA_TOTAL(na)-1; i>0; i--,ptr++) { if (*ptrrange[1]) range[1] = *ptr; /* max */ } } /* PGASK -- control new page prompting pgask [true|false] */ static VALUE rb_pgplot_pgask( int argc, VALUE *argv, VALUE self) { VALUE vflag; rb_scan_args(argc, argv, "01", &vflag); if (RTEST(vflag)) cpgask(1); else cpgask(0); return Qnil; } /* PGOPEN -- open a graphics device stat = pgopen [device] */ static VALUE rb_pgplot_pgopen( int argc, VALUE *argv, VALUE self ) { VALUE vdev; const char *dev="?"; rb_scan_args(argc,argv, "01", &vdev); if (vdev!=Qnil) dev = StringValuePtr(vdev); return INT2NUM(cpgopen(dev)); } /* PGBEG -- open a graphics device */ static VALUE rb_pgplot_pgbeg( int argc, VALUE *argv, VALUE self ) { VALUE vdev, vnxs, vnys; int nxsub=1, nysub=1; const char *dev="?"; rb_scan_args(argc, argv, "03", &vdev,&vnxs,&vnys); if (vdev!=Qnil) dev = StringValuePtr(vdev); if (vnxs!=Qnil) nxsub = NUM2INT(vnxs); if (vnys!=Qnil) nysub = NUM2INT(vnys); if (cpgbeg(0, dev, nxsub, nysub) != 1) return Qnil; else return Qtrue; } /* PGENV -- set window and viewport and draw labeled frame pgenv xmin,xmax,ymin,ymax [, just [, axis]] xmin: the left of the viewport. xmax: the right of the viewport. ymin: the bottom of the viewport. ymax: the top of the viewport just: if just=1, the x and y axes is scaled equally, otherwise scaled independently. axis: controls of axes. */ static VALUE rb_pgplot_pgenv( int argc, VALUE *argv, VALUE self ) { VALUE x0, x1, y0, y1, vjust, vaxis; int just=0, axis=0; rb_scan_args(argc, argv, "42", &x0,&x1,&y0,&y1,&vjust,&vaxis); if (vjust!=Qnil) just = NUM2INT(vjust); if (vaxis!=Qnil) axis = NUM2INT(vaxis); cpgenv( NUM2DBL(x0), NUM2DBL(x1), NUM2DBL(y0), NUM2DBL(y1), just, axis ); return Qtrue; } /* PGLINE -- draw a polyline (curve defined by line-segments) pgline xarray, yarray */ static VALUE rb_pgplot_pgline(VALUE obj, VALUE v1, VALUE v2) { VALUE x, y; x = rb_pgplot_fltary( v1 ); y = rb_pgplot_fltary( v2 ); cpgline( min(NA_TOTAL(x),NA_TOTAL(y)), NA_PTR_FLT(x), NA_PTR_FLT(y) ); return Qtrue; } /* PGPOLY -- draw a polygon, using fill-area attributes pgpoly xarray, yarray */ static VALUE rb_pgplot_pgpoly(VALUE obj, VALUE v1, VALUE v2) { VALUE x, y; x = rb_pgplot_fltary( v1 ); y = rb_pgplot_fltary( v2 ); cpgpoly( min(NA_TOTAL(x),NA_TOTAL(y)), NA_PTR_FLT(x), NA_PTR_FLT(y) ); return Qtrue; } /* PGPT -- draw several graph markers pgpt xarray, yarray [,symbol] */ static VALUE rb_pgplot_pgpt( int argc, VALUE *argv, VALUE self ) { VALUE vx, vy, vsym; VALUE x, y; int sym=0; rb_scan_args(argc,argv, "21", &vx,&vy,&vsym); if (vsym!=Qnil) sym = NUM2INT(vsym); x = rb_pgplot_fltary( vx ); y = rb_pgplot_fltary( vy ); cpgpt( min(NA_TOTAL(x),NA_TOTAL(y)), NA_PTR_FLT(x), NA_PTR_FLT(y), sym ); return Qtrue; } /* PGPNTS -- draw several graph markers, not all the same pgpnts xarray, yarray, symarray */ static VALUE rb_pgplot_pgpnts( VALUE obj, VALUE vx, VALUE vy, VALUE vs ) { VALUE x, y, s; x = rb_pgplot_fltary( vx ); y = rb_pgplot_fltary( vy ); s = rb_pgplot_intary( vs ); cpgpnts( min(NA_TOTAL(x),NA_TOTAL(y)), NA_PTR_FLT(x), NA_PTR_FLT(y), NA_PTR_INT(s), NA_TOTAL(s) ); return Qtrue; } /* PGBIN -- histogram of binned data pgbin xarray, yarray [,center] x : abscissae of bins. y : data values of bins. center : if true, the X values denote the center of the bin; if false, the X values denote the lower edge (in X) of the bin. */ static VALUE rb_pgplot_pgbin( int argc, VALUE *argv, VALUE self ) { VALUE vx, vy, vcent; VALUE x, y; int cent; rb_scan_args(argc,argv, "21", &vx,&vy,&vcent); if (RTEST(vcent)) cent=1; else cent=0; x = rb_pgplot_fltary( vx ); y = rb_pgplot_fltary( vy ); cpgbin( min(NA_TOTAL(x),NA_TOTAL(y)), NA_PTR_FLT(x), NA_PTR_FLT(y), cent ); return Qtrue; } /* PGHIST -- histogram of unbinned data pghist, data, nbin [,range, flag] data : the data values. NBIN may not exceed 200. nbin : the number of bins to use range : the range for the histogram. flag : = 0 PGENV is called automatically = 1 the histogram is plotted in the current window. = 2,3 with a filled area style. = 4,5 simple line. */ static VALUE rb_pgplot_pghist( int argc, VALUE *argv, VALUE self ) { VALUE vdat,vnbin,vrange,vflag; VALUE na_dat; int flag=0; float range[2]; rb_scan_args(argc,argv, "22", &vdat,&vnbin,&vrange,&vflag); na_dat = rb_pgplot_fltary( vdat ); /* Data Range */ if (vrange!=Qnil) { range[0] = NUM2DBL(rb_funcall(vrange, id_beg, 0)); range[1] = NUM2DBL(rb_funcall(vrange, id_end, 0)); } else { rb_pgplot_minmax(na_dat,range); } /* PGFLAG */ if (vflag!=Qnil) flag = NUM2INT(vflag); cpghist( NA_TOTAL(na_dat), NA_PTR_FLT(na_dat), range[0], range[1], NUM2INT(vnbin), flag ); return Qtrue; } /* Collection of Error bars */ static void rb_pgplot_errorbar( int argc, VALUE *argv, int callid, int dir ) { VALUE v1,v2,v3,vt; VALUE a1,a2,a3; int size; float tlen=1; rb_scan_args(argc,argv, "31", &v1,&v2,&v3,&vt); a1 = rb_pgplot_fltary( v1 ); a2 = rb_pgplot_fltary( v2 ); a3 = rb_pgplot_fltary( v3 ); size = min(NA_TOTAL(a1),NA_TOTAL(a2)); size = min(size,NA_TOTAL(a3)); if (vt!=Qnil) tlen = NUM2DBL(vt); if (callid==1) cpgerrx( size, NA_PTR_FLT(a1), NA_PTR_FLT(a2), NA_PTR_FLT(a3), tlen ); else if (callid==2) cpgerry( size, NA_PTR_FLT(a1), NA_PTR_FLT(a2), NA_PTR_FLT(a3), tlen ); else cpgerrb( dir, size, NA_PTR_FLT(a1), NA_PTR_FLT(a2), NA_PTR_FLT(a3), tlen ); } /* PGERRB -- horizontal or vertical error bar pgerrb, dir, x, y, err [,tlen] dir : direction to plot the error bar relative to the data point. One-sided error bar: DIR is 1 for +X (X to X+E); 2 for +Y (Y to Y+E); 3 for -X (X to X-E); 4 for -Y (Y to Y-E). Two-sided error bar: DIR is 5 for +/-X (X-E to X+E); 6 for +/-Y (Y-E to Y+E). x : world x-coordinates of the data. y : world y-coordinates of the data. err : value of error bar distance to be added to the data position in world coordinates. tlen: length of terminals to be drawn at the ends of the error bar, as a multiple of the default length. */ static VALUE rb_pgplot_pgerrb( int argc, VALUE *argv, VALUE self ) { rb_pgplot_errorbar( argc-1, argv+1, 0, NUM2INT(argv[0]) ); return Qtrue; } /* PGERRX -- horizontal error bar pgerrx, x1, x2, y [,tlen] x1 : world x-coordinates of lower end of the error bars. x2 : world x-coordinates of upper end of the error bars. */ static VALUE rb_pgplot_pgerrx( int argc, VALUE *argv, VALUE self ) { rb_pgplot_errorbar( argc, argv, 1, 0 ); return Qtrue; } /* PGERRY -- vertical error bar pgerry, x, y1, y2 [,tlen] y1 : world y-coordinates of top end of the error bars. y2 : world y-coordinates of bottom end of the error bars. */ static VALUE rb_pgplot_pgerry( int argc, VALUE *argv, VALUE self ) { rb_pgplot_errorbar( argc, argv, 2, 0 ); return Qtrue; } static float * rb_pgplot_transform( VALUE val_tr ) { static float tr_default[6] = {0.0, 1.0, 0.0, 0.0, 0.0, 1.0}; static float tr[6] = {0.0, 1.0, 0.0, 0.0, 0.0, 1.0}; VALUE na_tr; /* Transform */ if (val_tr!=Qnil) { na_tr = rb_pgplot_fltary( val_tr ); if (NA_TOTAL(na_tr) != 6) rb_raise(rb_eArgError, "TR argument must be 6-elm (N)Array"); MEMCPY(tr, NA_PTR_FLT(na_tr), float, 6); return tr; } else { return tr_default; } } static void rb_pgplot_find_range(VALUE na, VALUE vrange, float range[]) { /* if Range class is set, extrant begin&end */ if (vrange!=Qnil) { range[0] = NUM2DBL(rb_funcall(vrange, id_beg, 0)); range[1] = NUM2DBL(rb_funcall(vrange, id_end, 0)); } else { /* if Range is not set, search min&max of array */ rb_pgplot_minmax(na,range); } } /* contour routine collection */ static void rb_pgplot_contour( int argc, VALUE *argv, int callid ) { VALUE vmap, vtr, vcont, vblank, vtmp; VALUE na_map, na_cont; float blank=0, *tr; rb_scan_args(argc, argv, "22", &vmap, &vcont, &vtr, &vblank ); if (callid==2) { /* for PGCONB */ /* Exchange */ vtmp=vblank; vblank=vtr; vtr=vtmp; /* Blanking */ if (vblank!=Qnil) blank=NUM2DBL(vblank); } /* Map Data */ na_map = rb_pgplot_fltary( vmap ); if (NA_RANK(na_map) != 2) rb_raise(rb_eArgError, "Image must be 2-D (N)Array"); /* Contour levels */ na_cont = rb_pgplot_fltary( vcont ); /* Transform */ tr = rb_pgplot_transform( vtr ); /* Show Contour */ if (callid==1) cpgcons( NA_PTR_FLT(na_map), NA_SHAPE0(na_map), NA_SHAPE1(na_map), 1, NA_SHAPE0(na_map), 1, NA_SHAPE1(na_map), NA_PTR_FLT(na_cont), NA_TOTAL(na_cont), tr ); else if (callid==2) cpgconb( NA_PTR_FLT(na_map), NA_SHAPE0(na_map), NA_SHAPE1(na_map), 1, NA_SHAPE0(na_map), 1, NA_SHAPE1(na_map), NA_PTR_FLT(na_cont), NA_TOTAL(na_cont), tr, blank ); else cpgcont( NA_PTR_FLT(na_map), NA_SHAPE0(na_map), NA_SHAPE1(na_map), 1, NA_SHAPE0(na_map), 1, NA_SHAPE1(na_map), NA_PTR_FLT(na_cont), NA_TOTAL(na_cont), tr ); } /* PGCONT -- contour map of a 2D data array (contour-following) pgcont, map, cont [,tr] map : 2-D array of map data cont : array of contour levels tr : transformation matrix between array grid and world coordinates. */ static VALUE rb_pgplot_pgcont( int argc, VALUE *argv, VALUE self ) { rb_pgplot_contour( argc, argv, 0 ); return Qtrue; } /* PGCONS -- contour map of a 2D data array (fast algorithm) pgcons, map, cont [,tr] map : 2-D array of map data cont : array of contour levels tr : transformation matrix */ static VALUE rb_pgplot_pgcons( int argc, VALUE *argv, VALUE self ) { rb_pgplot_contour( argc, argv, 1 ); return Qtrue; } /* PGCONB -- contour map of a 2D data array, with blanking pgconb, map, cont [, blank, tr] map : 2-D array of map data cont : array of contour levels tr : transformation matrix blank : elements of array A that are equal to this value are blanked. */ static VALUE rb_pgplot_pgconb( int argc, VALUE *argv, VALUE self ) { rb_pgplot_contour( argc, argv, 2 ); return Qtrue; } /* PGCONF -- fill between two contours pgconf, map, cont_range [,tr] map : 2-D array of map data cont_range : range of two contour levels tr : transformation matrix */ static VALUE rb_pgplot_pgconf( int argc, VALUE *argv, VALUE self ) { VALUE vmap, vtr, vcont; VALUE na_map; float crange[2], *tr; rb_scan_args(argc, argv, "21", &vmap, &vcont, &vtr ); /* Map Data */ na_map = rb_pgplot_fltary( vmap ); if (NA_RANK(na_map) != 2) rb_raise(rb_eArgError, "Image must be 2-D (N)Array"); /* Contour range */ rb_pgplot_find_range( na_map, vcont, crange ); /* Transform */ tr = rb_pgplot_transform( vtr ); /* Show Contour */ cpgconf( NA_PTR_FLT(na_map), NA_SHAPE0(na_map), NA_SHAPE1(na_map), 1, NA_SHAPE0(na_map), 1, NA_SHAPE1(na_map), crange[0], crange[1], tr ); return Qtrue; } /* PGCONL -- label contour map of a 2D data array pgconl, map, cont, label [,intval, minint, tr] map : 2-D array of map data cont : contour level tobe labeld label : label string intval : spacing along the contour between labels, in grid cells. minint : contours that cross less than MININT cells will not be labelled. tr : transformation matrix */ static VALUE rb_pgplot_pgconl( int argc, VALUE *argv, VALUE self ) { VALUE vmap, vcnt, vlab, vint, vmin, vtr; VALUE na_map; float *tr; int intval=20, minint=10; /* recomended default */ rb_scan_args(argc, argv, "33", &vmap,&vcnt,&vlab,&vint,&vmin,&vtr ); /* Map Data */ na_map = rb_pgplot_fltary( vmap ); if (NA_RANK(na_map) != 2) rb_raise(rb_eArgError, "Image must be 2-D (N)Array"); /* spacing of labels */ if (vint!=Qnil) intval = NUM2INT(vint); if (vmin!=Qnil) minint = NUM2INT(vmin); /* Transform */ tr = rb_pgplot_transform( vtr ); /* Show Contour */ cpgconl( NA_PTR_FLT(na_map), NA_SHAPE0(na_map), NA_SHAPE1(na_map), 1, NA_SHAPE0(na_map), 1, NA_SHAPE1(na_map), NUM2DBL(vcnt), tr, StringValuePtr(vlab), intval, minint); return Qtrue; } /* PGVECT -- vector map of a 2D data array, with blanking pgvect, x, y [, scale, pos, tr, blank ] x : horizontal component data array. y : vertical component data array. scale : scale factor for vector lengths, if 0.0, C will be set so that the longest vector is equal to the smaller of TR(2)+TR(3) and TR(5)+TR(6). pos : vector positioning code. <0 vector head positioned on coordinates >0 vector base positioned on coordinates =0 vector centered on the coordinates tr : transformation matrix blank : elements of arrays A or B that are exactly equal to this value are ignored (blanked). */ static VALUE rb_pgplot_pgvect( int argc, VALUE *argv, VALUE self ) { VALUE vx,vy,vscl,vpos,vtr,vblank; VALUE na_x, na_y; int pos=0; float scale=0, blank=0, *tr; rb_scan_args(argc, argv, "24", &vx,&vy,&vscl,&vpos,&vtr,&vblank); /* Vector Data */ na_x = rb_pgplot_fltary( vx ); na_y = rb_pgplot_fltary( vy ); if (NA_RANK(na_x) != 2 || NA_RANK(na_y) != 2 ) rb_raise(rb_eArgError, "Vector arrays must be 2-D (N)Array"); if (NA_SHAPE0(na_x) != NA_SHAPE0(na_y) || NA_SHAPE1(na_x) != NA_SHAPE1(na_y) ) rb_raise(rb_eArgError, "Vector array sizes must be same"); /* Options */ if (vscl!=Qnil) scale = NUM2DBL(vscl); if (vpos!=Qnil) pos = NUM2INT(vpos); if (vblank!=Qnil) blank = NUM2DBL(vblank); /* Transform */ tr = rb_pgplot_transform( vtr ); /* Show Contour */ cpgvect( NA_PTR_FLT(na_x), NA_PTR_FLT(na_y), NA_SHAPE0(na_x), NA_SHAPE1(na_x), 1, NA_SHAPE0(na_x), 1, NA_SHAPE1(na_x), scale, pos, tr, blank ); return Qtrue; } /* static void rb_pgplot_palett() { float gl[2]={0.,1.}; float gr[2]={0.,1.}; float gg[2]={0.,1.}; float gb[2]={0.,1.}; float contra=1.0, bright=0.5; cpgctab(gl, gr, gg, gb, 2, contra, bright); } */ /* collection of PGIMAG and PGGRAY */ static VALUE rb_pgplot_mapimage( int argc, VALUE *argv, VALUE self, int callid ) { VALUE vimage, vtr, vrange; VALUE na; float range[2], *tr; rb_scan_args(argc,argv, "12", &vimage, &vrange, &vtr ); /* Image */ na = rb_pgplot_fltary( vimage ); if (NA_RANK(na) != 2) rb_raise(rb_eArgError, "Image must be 2-D (N)Array"); /* Transform */ tr = rb_pgplot_transform( vtr ); /* Range */ rb_pgplot_find_range(na, vrange, range); /* Show Image */ /*rb_pgplot_palett();*/ if (callid==0) cpgimag( NA_PTR_FLT(na), NA_SHAPE0(na), NA_SHAPE1(na), 1, NA_SHAPE0(na), 1, NA_SHAPE1(na), range[0], range[1], tr ); else cpggray( NA_PTR_FLT(na), NA_SHAPE0(na), NA_SHAPE1(na), 1, NA_SHAPE0(na), 1, NA_SHAPE1(na), range[0], range[1], tr ); return Qtrue; } /* PGIMAG -- color image from a 2D data array pgimag, array [,range ,tr] range : range of array value to be drawn TR : transformation matrix. */ static VALUE rb_pgplot_pgimag( int argc, VALUE *argv, VALUE self ) { rb_pgplot_mapimage( argc, argv, self, 0 ); return Qtrue; } /* PGGRAY -- gray-scale map of a 2D data array pggray, array [, range, tr] range : range of array value to be drawn TR : transformation matrix. */ static VALUE rb_pgplot_pggray( int argc, VALUE *argv, VALUE self ) { rb_pgplot_mapimage( argc, argv, self, 1 ); return Qtrue; } /* PGCTAB -- install the color table to be used by PGIMAG pgctab, l,r,g,b [,contra,bright] l : An array of NC normalized ramp-intensity levels corresponding to the RGB primary color intensities in R(),G(),B(). Colors on the ramp are linearly interpolated from neighbouring levels. Levels must be sorted in increasing order. 0.0 places a color at the beginning of the ramp. 1.0 places a color at the end of the ramp. Colors outside these limits are legal, but will not be visible if CONTRA=1.0 and BRIGHT=0.5. r,g,b : array of normalized red,green,blue intensities. contra : The contrast of the color ramp (normally 1.0). Negative values reverse the direction of the ramp. bright : The brightness of the color ramp. This is normally 0.5 but can sensibly hold any value between 0.0 and 1.0. */ static VALUE rb_pgplot_pgctab( int argc, VALUE *argv, VALUE self ) { VALUE vl, vr, vg, vb, vcnt, vbrt; VALUE l, r, g, b; float contra=1.0, bright=0.5; int n; rb_scan_args(argc,argv, "42", &vl,&vr,&vg,&vb,&vcnt,&vbrt); l = rb_pgplot_fltary( vl ); r = rb_pgplot_fltary( vr ); g = rb_pgplot_fltary( vg ); b = rb_pgplot_fltary( vb ); /* Optional Args */ if (vcnt!=Qnil) contra = NUM2INT(vcnt); if (vbrt!=Qnil) bright = NUM2INT(vbrt); n = min(NA_TOTAL(l),NA_TOTAL(r)); n = min(NA_TOTAL(g),n); n = min(NA_TOTAL(b),n); cpgctab( NA_PTR_FLT(l), NA_PTR_FLT(r), NA_PTR_FLT(g), NA_PTR_FLT(b), n, contra, bright); return Qtrue; } /* PGWEDG -- annotate an image plot with a wedge pgwedg side, disp, width, fg, bg, label side : The first character must be one of the characters 'B', 'L', 'T', or 'R' signifying the Bottom, Left, Top, or Right edge of the viewport. The second character should be 'I' to use PGIMAG to draw the wedge, or 'G' to use PGGRAY. disp : the displacement of the wedge from the specified edge of the viewport, measured outwards from the viewport in units of the character height. Use a negative value to write inside the viewport, a positive value to write outside. width : The total width of the wedge including annotation, in units of the character height. fg : The value which is to appear with shade 1 ("foreground"). Use the values of FG and BG that were supplied to PGGRAY or PGIMAG. bg : the value which is to appear with shade 0 ("background"). label : Optional units label. */ /* PGPIXL -- draw pixels pgpixl, array [,x1,x2,y1,y2] x1, y1 : world coordinates of one corner of the output region x2, y2 : world coordinates of the opposite corner of the output region */ static VALUE rb_pgplot_pgpixl( int argc, VALUE *argv, VALUE self ) { VALUE na; float x1, x2, y1, y2; if (argc<1) rb_raise(rb_eArgError, "wrong # of arguments (%d for 1 or 5)", argc); na = rb_pgplot_intary(argv[0]); if (NA_RANK(na) != 2) rb_raise(rb_eArgError, "Image must be 2-D (N)Array"); if (argc==5) { x1 = NUM2DBL(argv[1]); x2 = NUM2DBL(argv[2]); y1 = NUM2DBL(argv[3]); y2 = NUM2DBL(argv[4]); } else if (argc==1) { x1 = 0; x2 = NA_SHAPE0(na); y1 = 0; y2 = NA_SHAPE1(na); } else rb_raise(rb_eArgError, "wrong # of arguments (%d for 1 or 5)", argc); cpgpixl( NA_PTR_INT(na), NA_SHAPE0(na), NA_SHAPE1(na), 1, NA_SHAPE0(na), 1, NA_SHAPE1(na), x1, x2, y1, y2 ); return Qtrue; } /* PGQINF -- inquire PGPLOT general information value = pgqinf item item : character string defining the information value : character string containing the requested information. */ static VALUE rb_pgplot_pgqinf( VALUE obj, VALUE vitem ) { int value_len=20; char *item, *value; item = StringValuePtr(vitem); value = ALLOCA_N(char,value_len); cpgqinf( item, value, &value_len ); return rb_str_new(value,value_len); } /* PGQDT -- inquire name of nth available device type type, descr, inter = pgqdt [,ndev] ndev : the number of the device type (1..maximum). type : receives the character device-type code of the Nth device type. descr : receives a description of the device type. inter : receives 1 if the device type is an interactive one, 0 otherwise. */ static VALUE rb_pgplot_pgqdt( int argc, VALUE *argv, VALUE self ) { VALUE vdev; int ndev=1, type_len=9, descr_len=65, inter; char *type, *descr; type = ALLOCA_N(char,type_len); descr = ALLOCA_N(char,descr_len); rb_scan_args(argc, argv, "01", &vdev); if (vdev!=Qnil) ndev = NUM2INT(vdev); cpgqdt( ndev, type, &type_len, descr, &descr_len, &inter ); return rb_ary_new3( 3, rb_str_new(type,type_len), rb_str_new(descr,descr_len), INT2NUM(inter) ); } /* PGQTXT -- find bounding box of text string xbox, ybox = pgqtxt(x,y,angle,fjust,text) */ static VALUE rb_pgplot_pgqtxt(VALUE obj, VALUE x, VALUE y, VALUE ang, VALUE fjust, VALUE text) { VALUE vx,vy; int i; float xbox[4], ybox[4]; char *txt = StringValuePtr(text); cpgqtxt( NUM2DBL(x),NUM2DBL(y),NUM2DBL(ang),NUM2DBL(fjust),txt, xbox, ybox ); vx = rb_ary_new2(4); vy = rb_ary_new2(4); for (i=0;i<4;i++) { rb_ary_push(vx, rb_float_new(xbox[i])); rb_ary_push(vy, rb_float_new(ybox[i])); } return rb_ary_new3(2,vx,vy); } /* Construct PgCursor-class instance */ static void pgcursor_init(VALUE obj, VALUE x, VALUE y, VALUE ch) { rb_ivar_set(obj, id_x, x); rb_ivar_set(obj, id_y, y); rb_ivar_set(obj, id_char, ch); } static VALUE pgcursor_initialize(int argc, VALUE *argv, VALUE obj) { VALUE x, y, ch; rb_scan_args(argc,argv, "21", &x,&y,&ch); pgcursor_init(obj,x,y,ch); return Qnil; } static VALUE pgcursor_new(VALUE x, VALUE y, VALUE ch) { VALUE obj; obj = rb_obj_alloc(cPgCursor); pgcursor_init(obj,x,y,ch); return obj; } static VALUE pgcursor_to_ary(VALUE obj) { return rb_ary_new3( 3, rb_ivar_get(obj, id_x), rb_ivar_get(obj, id_y), rb_ivar_get(obj, id_char) ); } /* PGCURS -- read cursor position result = pgcurs([x,y]) PgCursorError is raised if some error occurs. result : instance of PgCursor-class. Attrs are; x : the world x-coordinate of the cursor. y : the world y-coordinate of the cursor. char : the character typed by the user; nil if the device has no cursor or if some other error occurs. */ static VALUE rb_pgplot_pgcurs( int argc, VALUE *argv, VALUE self ) { float x, y, x2, y2; char ch[2] = " "; switch (argc) { case 0: cpgqwin(&x,&x2,&y,&y2); x = (x+x2)/2; y = (y+y2)/2; break; case 2: x = NUM2DBL(argv[0]); y = NUM2DBL(argv[1]); break; default: rb_raise(rb_eArgError, "wrong # of arguments (%d for 0 or 2)", argc); } if (!cpgcurs(&x, &y, ch)) rb_raise(ePgCursorError, "failure in getting cursor position"); return pgcursor_new( rb_float_new(x), rb_float_new(y), (ch[0]==0) ? Qnil : rb_str_new(ch,1) ); } /* PGBAND -- read cursor position, with anchor result = pgband( mode, [xref, yref, [x, y, [posn]]] ) PgCursorError is raised if some error occurs. result : instance of PgCursor-class. see pgcurs. */ static VALUE rb_pgplot_pgband( int argc, VALUE *argv, VALUE self ) { int mode=0, posn=0; float x, y, xr, yr; char ch[2] = " "; if (argc<5) { cpgqwin(&x,&xr,&y,&yr); xr = x = (x+xr)/2; yr = y = (y+yr)/2; } switch (argc) { case 6: if (RTEST(argv[5])) { if (argv[5]==Qtrue) posn = 1; else posn = NUM2INT(argv[5]); } case 5: x = NUM2DBL(argv[3]); y = NUM2DBL(argv[4]); case 3: xr = NUM2DBL(argv[1]); yr = NUM2DBL(argv[2]); case 1: mode = NUM2INT(argv[0]); break; default: rb_raise(rb_eArgError, "wrong # of arguments (%d for 1/3/5)", argc); } if (!cpgband(mode, posn, xr, yr, &x, &y, ch)) rb_raise(ePgCursorError, "failure in getting cursor position"); return pgcursor_new( rb_float_new(x), rb_float_new(y), (ch[0]==0) ? Qnil : rb_str_new(ch,1) ); } /* PGOLIN -- mark a set of points using the cursor result = pgolin( x, y, [sym, [npt]] ) x : NArray.sfloat of x-coordinates. y : NArray.sfloat of y-coordinates. sym : code number of symbol to use for marking entered points (see PGPT). npt : number of points entered; should be zero on first call. result: number of points entered. */ static VALUE rb_pgplot_pgolin( int argc, VALUE *argv, VALUE self ) { VALUE x, y, vsym, vnpt; int sym=0, npt=0; rb_scan_args(argc,argv, "22", &x,&y,&vsym,&vnpt); if (vsym!=Qnil) sym = NUM2INT(vsym); if (vnpt!=Qnil) npt = NUM2INT(vnpt); if (NA_TYPE(x)!=NA_SFLOAT || NA_TYPE(y)!=NA_SFLOAT) rb_raise(rb_eArgError, "Array must NArray.sfloat"); cpgolin( min(NA_TOTAL(x),NA_TOTAL(y)), &npt, NA_PTR_FLT(x), NA_PTR_FLT(y), sym ); return INT2NUM(npt); } /* PGNCUR -- mark a set of points using the cursor result = pgncur( x, y, [sym, [npt]] ) x : NArray.sfloat of x-coordinates. y : NArray.sfloat of y-coordinates. sym : code number of symbol to use for marking entered points (see PGPT). npt : number of points entered; should be zero on first call. result: number of points entered. */ static VALUE rb_pgplot_pgncur( int argc, VALUE *argv, VALUE self ) { VALUE x, y, vsym, vnpt; int sym=0, npt=0; rb_scan_args(argc,argv, "22", &x,&y,&vsym,&vnpt); if (vsym!=Qnil) sym = NUM2INT(vsym); if (vnpt!=Qnil) npt = NUM2INT(vnpt); if (NA_TYPE(x)!=NA_SFLOAT || NA_TYPE(y)!=NA_SFLOAT) rb_raise(rb_eArgError, "Array must NArray.sfloat"); cpgncur( min(NA_TOTAL(x),NA_TOTAL(y)), &npt, NA_PTR_FLT(x), NA_PTR_FLT(y), sym ); return INT2NUM(npt); } /* PGLCUR -- PGLCUR -- draw a line using the cursor result = pglcur( x, y, [npt] ) x : NArray.sfloat of x-coordinates. y : NArray.sfloat of y-coordinates. npt : number of points entered; should be zero on first call. result: number of points entered. */ static VALUE rb_pgplot_pglcur( int argc, VALUE *argv, VALUE self ) { VALUE x, y, vnpt; int npt=0; rb_scan_args(argc,argv, "21", &x,&y,&vnpt); if (vnpt!=Qnil) npt = NUM2INT(vnpt); if (NA_TYPE(x)!=NA_SFLOAT || NA_TYPE(y)!=NA_SFLOAT) rb_raise(rb_eArgError, "Array must NArray.sfloat"); cpglcur( min(NA_TOTAL(x),NA_TOTAL(y)), &npt, NA_PTR_FLT(x), NA_PTR_FLT(y) ); return INT2NUM(npt); } void rb_scan_kw_args __((VALUE, ...)); /* PGTICK -- draw a single tick mark on an axis pgtick( x1, y1, x2, y2, v, [str], {"tickl", "tickr", "disp", "orient"}) Example: pgtick( 0,0,0,1, 0.5, "half", "tickr"=>1, "disp"=>2, "orient"=>90 ) Draw and label single tick mark on a graph axis. The tick mark is a short line perpendicular to the direction of the axis (which is not drawn by this routine). The optional text label is drawn with its baseline parallel to the axis and reading in the same direction as the axis (from point 1 to point 2). Current line and text attributes are used. Arguments: X1, Y1 : world coordinates of one endpoint of the axis. X2, Y2 : world coordinates of the other endpoint of the axis. V : draw the tick mark at fraction V (0<=V<=1) along the line from (X1,Y1) to (X2,Y2). STR : text of label (may be blank). Keyword Arguments: TICKL : length of tick mark drawn to left of axis (as seen looking from first endpoint to second), in units of the character height. TICKR : length of major tick marks drawn to right of axis, in units of the character height. DISP : displacement of label text to right of axis, in units of the character height. ORIENT : orientation of label text, in degrees; angle between baseline of text and direction of axis (0-360 deg) */ static VALUE rb_pgplot_pgtick( int argc, VALUE *argv, VALUE self ) { const char *str=""; VALUE val=Qnil; VALUE x1, y1, x2, y2, v, vstr; VALUE tickl, tickr, disp, orient; if (argc>0 && TYPE(argv[argc-1]) == T_HASH) val = argv[--argc]; rb_scan_kw_args( val, "tickl", &tickl, "tickr", &tickr, "disp", &disp, "orient", &orient, (char *)0); rb_scan_args(argc,argv, "51", &x1,&y1, &x2,&y2, &v, &vstr); if (tickl ==Qnil) tickl = INT2FIX(0); if (tickr ==Qnil) tickr = INT2FIX(0); if (disp ==Qnil) disp = INT2FIX(1); if (orient==Qnil) orient= INT2FIX(0); if (vstr !=Qnil) str = StringValuePtr(vstr); cpgtick( NUM2DBL(x1),NUM2DBL(y1),NUM2DBL(x2),NUM2DBL(y2), NUM2DBL(v), NUM2DBL(tickl),NUM2DBL(tickr), NUM2DBL(disp), NUM2DBL(orient), str ); return Qnil; } /* PGAXIS -- draw an axis pgaxis( x1, y1, x2, y2, v1, v2, {opt, step, nsub, tickl, tickr, frac, disp, orient} ) Example: pgaxis( 1, 1, 9, 5, 0, 3, "tickl"=>1, "opt"=>"NL2" ) Draw a labelled graph axis from world-coordinate position (X1,Y1) to (X2,Y2). Normally, this routine draws a standard LINEAR axis with equal subdivisions. The quantity described by the axis runs from V1 to V2; this may be, but need not be, the same as X or Y. If the 'L' option is specified, the routine draws a LOGARITHMIC axis. In this case, the quantity described by the axis runs from 10**V1 to 10**V2. A logarithmic axis always has major, labeled, tick marks spaced by one or more decades. If the major tick marks are spaced by one decade (as specified by the STEP argument), then minor tick marks are placed at 2, 3, .., 9 times each power of 10; otherwise minor tick marks are spaced by one decade. If the axis spans less than two decades, numeric labels are placed at 1, 2, and 5 times each power of ten. If the axis spans less than one decade, or if it spans many decades, it is preferable to use a linear axis labeled with the logarithm of the quantity of interest. Arguments: x1, y1 : world coordinates of one endpoint of the axis. x2, y2 : world coordinates of the other endpoint of the axis. v1 : axis value at first endpoint. v2 : axis value at second endpoint. Keyword Argnuments: opt : a string containing single-letter codes for various options. The options currently recognized are: L : draw a logarithmic axis N : write numeric labels 1 : force decimal labelling, instead of automatic choice (see PGNUMB). 2 : force exponential labelling, instead of automatic. step : major tick marks are drawn at axis value 0.0 plus or minus integer multiples of STEP. If STEP=0.0, a value is chosen automatically. nsub : minor tick marks are drawn to divide the major divisions into NSUB equal subdivisions (ignored if STEP=0.0). If NSUB <= 1, no minor tick marks are drawn. NSUB is ignored for a logarithmic axis. tickl : length of major tick marks drawn to left of axis (as seen looking from first endpoint to second), in units of the character height. tickr : length of major tick marks drawn to right of axis, in units of the character height. frac : length of minor tick marks, as fraction of major. disp : displacement of baseline of tick labels to right of axis, in units of the character height. orient : orientation of label text, in degrees; angle between baseline of text and direction of axis (0-360 */ static VALUE rb_pgplot_pgaxis( int argc, VALUE *argv, VALUE self ) { const char *opt=""; float frac=0.5; VALUE val=Qnil; VALUE x1, y1, x2, y2, v1, v2; VALUE vopt, step, nsub, tickl, tickr, vfrac, disp, orient; if (argc>0 && TYPE(argv[argc-1]) == T_HASH) val = argv[--argc]; rb_scan_kw_args( val, "opt",&vopt, "step",&step, "nsub",&nsub, "tickl",&tickl, "tickr",&tickr, "frac",&vfrac, "disp",&disp, "orient",&orient, (char *)0); rb_scan_args(argc,argv, "60", &x1,&y1, &x2,&y2, &v1,&v2); if (step ==Qnil) step = INT2FIX(0); if (nsub ==Qnil) nsub = INT2FIX(0); if (tickl ==Qnil) tickl = INT2FIX(0); if (tickr ==Qnil) tickr = INT2FIX(0); if (disp ==Qnil) disp = INT2FIX(1); if (orient==Qnil) orient= INT2FIX(0); if (vopt !=Qnil) opt = StringValuePtr(vopt); if (vfrac !=Qnil) frac = NUM2DBL(vfrac); cpgaxis( opt, NUM2DBL(x1),NUM2DBL(y1),NUM2DBL(x2),NUM2DBL(y2), NUM2DBL(v1),NUM2DBL(v2),NUM2DBL(step),NUM2INT(nsub), NUM2DBL(tickl),NUM2DBL(tickr), frac, NUM2DBL(disp), NUM2DBL(orient) ); return Qnil; } /*--- auto-generated funcs will be placed here ---*/ void ruby_setenv(const char *name, const char *value); void Init_pgplot() { #ifdef PGPLOT_DIR ruby_setenv("PGPLOT_DIR",PGPLOT_DIR); #endif mPgplot = rb_define_module("Pgplot"); rb_define_const(mPgplot, "VERSION", rb_str_new2(RUBY_PGPLOT_VERSION)); /* The C application programming interface */ rb_define_module_function(mPgplot, "pgopen", rb_pgplot_pgopen,-1); rb_define_module_function(mPgplot, "pgbeg", rb_pgplot_pgbeg, -1); rb_define_module_function(mPgplot, "pgenv", rb_pgplot_pgenv, -1); rb_define_module_function(mPgplot, "pgask", rb_pgplot_pgask, -1); rb_define_module_function(mPgplot, "pgline", rb_pgplot_pgline, 2); rb_define_module_function(mPgplot, "pgpoly", rb_pgplot_pgpoly, 2); rb_define_module_function(mPgplot, "pgpt", rb_pgplot_pgpt, -1); rb_define_module_function(mPgplot, "pgpnts", rb_pgplot_pgpnts, 3); rb_define_module_function(mPgplot, "pgbin", rb_pgplot_pgbin, -1); rb_define_module_function(mPgplot, "pghist", rb_pgplot_pghist, -1); rb_define_module_function(mPgplot, "pgerrb", rb_pgplot_pgerrb, -1); rb_define_module_function(mPgplot, "pgerrx", rb_pgplot_pgerrx, -1); rb_define_module_function(mPgplot, "pgerry", rb_pgplot_pgerry, -1); rb_define_module_function(mPgplot, "pgcont", rb_pgplot_pgcont, -1); rb_define_module_function(mPgplot, "pgcons", rb_pgplot_pgcons, -1); rb_define_module_function(mPgplot, "pgconb", rb_pgplot_pgconb, -1); rb_define_module_function(mPgplot, "pgconf", rb_pgplot_pgconf, -1); rb_define_module_function(mPgplot, "pgconl", rb_pgplot_pgconl, -1); rb_define_module_function(mPgplot, "pgvect", rb_pgplot_pgvect, -1); rb_define_module_function(mPgplot, "pgimag", rb_pgplot_pgimag, -1); rb_define_module_function(mPgplot, "pggray", rb_pgplot_pggray, -1); rb_define_module_function(mPgplot, "pgctab", rb_pgplot_pgctab, -1); rb_define_module_function(mPgplot, "pgpixl", rb_pgplot_pgpixl, -1); rb_define_module_function(mPgplot, "pgqinf", rb_pgplot_pgqinf, 1); rb_define_module_function(mPgplot, "pgqdt", rb_pgplot_pgqdt, -1); rb_define_module_function(mPgplot, "pgqtxt", rb_pgplot_pgqtxt, 5); rb_define_module_function(mPgplot, "pgcurs", rb_pgplot_pgcurs, -1); rb_define_module_function(mPgplot, "pgband", rb_pgplot_pgband, -1); rb_define_module_function(mPgplot, "pgolin", rb_pgplot_pgolin, -1); rb_define_module_function(mPgplot, "pgncur", rb_pgplot_pgncur, -1); rb_define_module_function(mPgplot, "pglcur", rb_pgplot_pglcur, -1); rb_define_module_function(mPgplot, "pgtick", rb_pgplot_pgtick, -1); rb_define_module_function(mPgplot, "pgaxis", rb_pgplot_pgaxis, -1); /*--- auto-generated defs will be placed here ---*/ rb_set_end_proc((void(*)(VALUE))(cpgend), Qnil); id_beg = rb_intern("begin"); id_end = rb_intern("end"); id_x = rb_intern("@x"); id_y = rb_intern("@y"); id_char = rb_intern("@char"); /*--- PgCursor ---*/ cPgCursor = rb_define_class_under(mPgplot, "PgCursor", rb_cObject); rb_define_method(cPgCursor, "initialize", pgcursor_initialize, -1); rb_define_method(cPgCursor, "to_ary", pgcursor_to_ary, 0); rb_attr(cPgCursor, rb_intern("x"), 1, 0, Qtrue); rb_attr(cPgCursor, rb_intern("y"), 1, 0, Qtrue); rb_attr(cPgCursor, rb_intern("char"), 1, 0, Qtrue); ePgCursorError = rb_define_class("PgCursorError", rb_eStandardError); } ruby-pgplot-0.1.9/ext/version.h000066400000000000000000000000441211436746200164470ustar00rootroot00000000000000#define RUBY_PGPLOT_VERSION "0.1.9" ruby-pgplot-0.1.9/pgplot.gemspec000066400000000000000000000042451211436746200166720ustar00rootroot00000000000000open("ext/version.h") do |f| f.each_line do |l| if /RUBY_PGPLOT_VERSION "([\d.]+)"/ =~ l PKG_VERSION=$1 break end end end PGPLOT_GEMSPEC = Gem::Specification.new do |s| s.name = "pgplot" s.version = PKG_VERSION s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Masahiro Tanaka"] s.date = Time.now.strftime("%F") s.description = "PGPLOT wrapper for Ruby" s.email = "masa16.tanaka@gmail.com" s.extensions = ["ext/extconf-auto.rb"] s.homepage = "http://pgplot.rubyforge.org/" s.require_paths = ["."] s.rubyforge_project = "pgplot" s.rubygems_version = "2.0.0" s.summary = "PGPLOT wrapper for Ruby. The PGPLOT library needs to be " \ "installed in advance using GNU FORTRAN compiler" s.files = %w[ README README.ja FuncUsage demo/pgdemo1.rb demo/pgdemo15.rb demo/pgdemo3.rb demo/pgdemo4.rb demo/pgdemo9.rb ext/cogen.rb ext/depend ext/extconf.rb ext/extconf-auto.rb ext/kwarg.c ext/rb_pgplot.c.in ext/version.h ext/build_lib/Makefile ext/build_lib/download.rb ext/build_lib/drivers.rb ext/build_lib/makefile.rb test/pgband.rb test/pgcurs.rb test/pggray.rb test/pglcur.rb test/pgline.rb test/pgncur.rb test/pgolin.rb test/pgtick.rb ] s.add_dependency('narray', '>= 0.5.0') if s.respond_to? :specification_version then s.specification_version = 2 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then else end else end # Documentation TODO s.rdoc_options = %w[ --title Ruby/PGPLOT --main README --exclude demo/ --exclude test/ --exclude pgplot/ --exclude ext/build_lib/ --exclude ext/Makefile --exclude ext/build-pgplot.rb --exclude ext/cogen.rb --exclude ext/cpgplot.h --exclude ext/depend --exclude ext/extconf.rb --exclude ext/extconf-auto.rb --exclude ext/kwarg.c --exclude ext/rb_pgplot.c.in --exclude ext/version.h --exclude .*\.o --exclude pgplot\.so ] s.has_rdoc = true s.extra_rdoc_files = %w[README README.ja FuncUsage ext/rb_pgplot.c] end ruby-pgplot-0.1.9/test/000077500000000000000000000000001211436746200147725ustar00rootroot00000000000000ruby-pgplot-0.1.9/test/pgband.rb000066400000000000000000000005521211436746200165540ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot pgbeg pgenv 0, 1, 0, 1 pglab '','','Demo of PGBAND' c = PgCursor.new(0,0) for mode in 0..7 puts 'Mode %d: Enter key or click on the window'%mode c = pgband(mode, c.x, c.y) p c end x = y = 0 for mode in 0..7 puts 'Mode %d: Enter key or click on the window'%mode x,y = pgband(mode, x, y) p [x,y] end ruby-pgplot-0.1.9/test/pgcurs.rb000066400000000000000000000003561211436746200166260ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot pgbeg pgenv 0, 1, 0, 1 pglab '','','Demo of PGCURS' c = PgCursor.new(0,0) for mode in 0..7 puts 'Enter a key on the window:' c = pgcurs(c.x, c.y) pgpt1(c.x, c.y, c.char[0].ord) end ruby-pgplot-0.1.9/test/pggray.rb000066400000000000000000000010071211436746200166060ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot n = 100 x = NArray.sfloat(n,1).indgen!/10 y = NArray.sfloat(1,n).indgen!/10 a = NMath.sin(x) * NMath.cos(y) pgbeg pgenv 0,(n+1)/10.0, 0,(n+1)/10.0, 1 # scales of X and Y are equal pglab "(x)", "(y)", "PGGRAY Demo: sin(x)*cos(y)" pgscir 16,64 pggray a, -1..1, [0,0.1,0,0,0,0.1] pgenv 0,(n+1)/10.0, 0,(n+1)/10.0 # independent scales pglab "(x)", "(y)", "PGIMAG Demo: sin(x)*cos(y)" pgscir 16,64 pgctab [0,1],[0,1],[0,1],[0,1] pgimag a, -1..1, [0,0.1,0,0,0,0.1] ruby-pgplot-0.1.9/test/pglcur.rb000066400000000000000000000003451211436746200166150ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot n = 10 x = NArray.sfloat(n).indgen! y = NMath.sin(NArray.sfloat(n).indgen!)*3+n/2 pgbeg pgenv 0, 10, 0, 10 pglab '','','Demo of PGLCUR' n = pglcur(x,y,n/2) p x[0...n], y[0...n] ruby-pgplot-0.1.9/test/pgline.rb000066400000000000000000000003131211436746200165720ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot n = 100 x = NArray.sfloat(n).indgen!/10 y = NMath.sin(x) pgbeg() pgenv 0, n/10, -1, 1 pglab "(x)", "(y)", "PGPLOT Example 1: y = x\\u2\\d" pgline x, y ruby-pgplot-0.1.9/test/pgncur.rb000066400000000000000000000003261211436746200166160ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot n = 10 x = NArray.sfloat(n).indgen! y = NArray.sfloat(n).indgen! pgbeg pgenv 0, 10, 0, 10 pglab '','','Demo of PGNCUR' n = pgncur(x,y,2,n/2) p x[0...n], y[0...n] ruby-pgplot-0.1.9/test/pgolin.rb000066400000000000000000000003261211436746200166100ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot n = 10 x = NArray.sfloat(n).indgen! y = NArray.sfloat(n).indgen! pgbeg pgenv 0, 10, 0, 10 pglab '','','Demo of PGOLIN' n = pgolin(x,y,2,n/2) p x[0...n], y[0...n] ruby-pgplot-0.1.9/test/pgtick.rb000066400000000000000000000004771211436746200166100ustar00rootroot00000000000000require 'narray' require 'pgplot' include Pgplot pgbeg pgenv 0,10, 0,10 pgtick( 0, 7, 10, 7, 0.25, "quarter" ) pgtick( 0, 7, 10, 7, 0.5, "half", "tickr"=>1, "disp"=>2, "orient"=>90 ) pgtick( 0, 7, 10, 7, 0.75, "3quarter", "tickl"=>1, "disp"=>-2, "orient"=>180 ) pgaxis( 1, 1, 9, 5, 0, 3, "tickl"=>1, "opt"=>"NL2" )