# # sgpk01.rb # # $Id: sgpk01.rb,v 1.1 2000/11/21 03:02:07 keiko Exp $ # require "narray" require "numru/dcl" include NumRu include Math #-- graph --- iws = (ARGV[0] || (puts ' WORKSTATION ID (I) ? ;'; DCL::sgpwsn; gets)).to_i DCL::sgopn iws DCL::sgfrm # <-- ページを用意する. x1 = 0.1 x2 = 0.9 DCL::sglnv(x1, 0.9, x2, 0.9) # <-- デフォルトのLine indexで直線描画 DCL::sgslni(2) # <-- line index を2に設定 DCL::sglnv(x1, 0.8, x2, 0.8) DCL::sgslni(3) DCL::sglnv(x1, 0.7, x2, 0.7) DCL::sgslni(4) DCL::sglnv(x1, 0.6, x2, 0.6) DCL::sglnzv(x1, 0.4, x2, 0.4, 1 ) # <-- line index を指定して描画 DCL::sglnzv(x1, 0.3, x2, 0.3, 2) DCL::sglnzv(x1, 0.2, x2, 0.2, 3) DCL::sglnzv(x1, 0.1, x2, 0.1, 4) DCL::sgcls