Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

help.f

Go to the documentation of this file.
00001 
00002 c     
00003 c     Copyright (c) 1986,1987,1988,1989,1990,1991,1992,1993,
00004 c     by Steve McMillan, Drexel University, Philadelphia, PA.
00005 c     
00006 c     All rights reserved.
00007 c     
00008 c     Redistribution and use in source and binary forms are permitted
00009 c     provided that the above copyright notice and this paragraph are
00010 c     duplicated in all such forms and that any documentation,
00011 c     advertising materials, and other materials related to such
00012 c     distribution and use acknowledge that the software was developed
00013 c     by the author named above.
00014 c     
00015 c     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
00016 c     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
00017 c     WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00018 c     
00019 
00020 c------------------------------------------------------------------------
00021 c     
00022 c     Simple on-line help routines.
00023 c     
00024 c     Contents:    help
00025 c     wr
00026 c     fullhelp
00027 c     
00028 c------------------------------------------------------------------------
00029 
00030       subroutine help(keyword)
00031 c     
00032       character*(*) keyword
00033 c     
00034 c     Describe available options.
00035 c     
00036       call wrinit(keyword)
00037 c     
00038       call wr('!{range}: reexecute {historical }command(s)')
00039       call wr('!n^x"y": {reexecute n and }subs{titute} y for x')
00040       call wr('?: {type }short help{ info}')
00041       call wr('={#}: specify box{ location and size}')
00042       call wr('*: suppress most output')
00043       call wr('2d{ array}: 2-D plot{ of the data in the'//
00044      &        ' specified array}')
00045       call wr('3d{ array}: 3-D plot{ of the data in the'//
00046      &        ' specified array}')
00047       call wr('a+(-*/^){ array1 array2 [array3]}: array1{ }'//
00048      &        '+{ }array2 (etc){ --> array2 [array3]}')
00049       call wr('a>{ array1 array2 [array3]}: max(array1,{ }'//
00050      &        'array2){ --> array2 [array3]}')
00051       call wr('a<{ array1 array2 [array3]}: min(array1,{ }'//
00052      &        'array2){ --> array2 [array3]}')
00053       call wr('a={ array1 array2}: array assignment'//
00054      &        '{ (array2 = array1)}')
00055       call wr('a\\{ array}: reverse array{ [array(1) <-->'//
00056      &        ' array(n), etc.]}')
00057       call wr('a!{ array nskip}: array compress'//
00058      &        '{ (select every (nskip+1)-th element)')
00059       call wr('aa{ array}: {array --> }abs(array)')
00060       call wr('ac{ array min max}: array clip'//
00061      &        '{ to min and max}')
00062       call wr('ai{ array}: invert array{ [array(i) --> 1/array(i)]}')
00063       call wr('an{ angle}: specify angle{ for strings}')
00064       call wr('an-: restore{ previous} angle{ for strings}')
00065       call wr('ao{ array offset}: offset array{ by specified'//
00066      &        ' amount [array(i+offset) = array(i)]}')
00067       call wr('ar{ xt yt xh yh}: draw an arrow{ from (xt,yt)'//
00068      &        ' to (xh,yh)}')
00069       call wr('arh{ size}: specify arrowhead size{ in screen units}')
00070       call wr('as{ ratio}: define aspect ratio')
00071       call wr('au{ array}: autocorrelation{ of specified array}')
00072       call wr('b: draw box{ (all parameters settable)}')
00073       call wr('b-{ n flag}: restore earlier box{ parameters}')
00074       call wr('bb: draw unadorned box')
00075       call wr('bc: {toggle attempt to }make "=n" frames closer')
00076       call wr('bi: increase box size')
00077       call wr('bn: scale, without {actually drawing }a box')
00078       call wr('bo{ x y scale}: offset{ and scale} box')
00079       call wr('bs: list box stack')
00080       call wr('c{ col#1 col#2}: input columns{ to x and y}')
00081       call wr('cb{ color}: set background{ color,'//
00082      &        ' if applicable}')
00083       call wr('cd{ directory}: change{ working} directory')
00084       call wr('cm{ file}: show {(or specify) }colormap'//
00085      &        '{ (if filename supplied)}')
00086       call wr('co{ color}: specify color{ of lines and text}')
00087       call wr('co-: restore{ previous} color{ of lines and text}')
00088       call wr('cu{ array}: {replace array by its }cumulative sum')
00089       call wr('cx(y,z){ filename}: read image{ file contining x(y,z)}')
00090       call wr('d {x y}: draw line{ to (x y)}')
00091       call wr('da {x y}: draw line{ to absolute (x y)}')
00092       call wr('dd: draw dashed line{ (set pattern with "t")}')
00093       call wr('de{ device}: specify {graphics }device{ or new window}')
00094       call wr('diff{ a1 a2 a3}: differentiate array{ a2 with'//
00095      &        ' respect to a1, place in a3 (def: a2)}')
00096       call wr('dx(y,z): {x(y,z) --> }10**x(y,z)')
00097       call wr('e[a]: erase {entire }screen')
00098       call wr('eb: erase {interior of }box')
00099       call wr('ec{ string}: echo input')
00100       call wr('el: erase label')
00101       call wr('er{ [xmin xmax ymin ymax]}: erase rectangle'//
00102      &        '{ [no argument ==> erase all]}')
00103       call wr('erc{ size}: {specify }error-bar cap{ size}')
00104       call wr('erp{ direction #sides}: {as for }"err", {but }limited'//
00105      $        ' by {the current }point size}')
00106       call wr('err{ direction #sides}: draw error bars{ from z}')
00107       call wr('ex(y,z): {x(y,z) --> }exp(x[y,z])')
00108       call wr('f{ filename [\\nh]}: specify filename'//
00109      &        '{ [and header length] for x, y and z input}')
00110       call wr('fc: close{ currently open data} file')
00111       call wr('f1[p]{ [xl xu]}: {linear }fit [+ plot]'//
00112      &        '{ in [xl, xu]}')
00113       call wr('f2[p]{ [xl xu]}: {linear }fit [+ plot]'//
00114      &        '{ in [xl, xu], weighted by z}')
00115       call wr('fo: toggle{ between plain and fancy}'//
00116      &        ' numeric labels')
00117       call wr('fp[p]{ m [xl xu]}: {m-th order polynomial }fit'//
00118      &        ' [+ plot]{ in [xl, xu]}')
00119       call wr('ft[p]{ m [xl xu]}: {m-th order trigonometric '//
00120      &        'polynomial }fit [+ plot]{ in [xl, xu]}')
00121       call wr('fz[p]{ m [xl xu]}: {m-th order polynomial }fit'//
00122      &        ' [+ plot]{ in [xl, xu], weighted by z}')
00123       call wr('g: get graphic input{ (and save location)}')
00124       call wr('gc: get color{ from color bar}')
00125       call wr('gd(m): g and draw (move)')
00126       call wr('gs{ prompt}: {prompt and }get string from stdin')
00127       call wr('h: {type }long help{ information}')
00128       call wr('h?: report {current }height{ setting}s{ (hn, hs, hp)}')
00129       call wr('hg{[n] del [ref]}: draw{ [normalized]} z histogram')
00130       call wr('hg1{[n] del [ref]}: draw{ another} z histogram')
00131       call wr('hg2: draw{ another} z histogram')
00132       call wr('hgxy: draw histogram{ from x and y}')
00133       call wr('hge: toggle{/set histogram} error-bars')
00134       call wr('hgm: toggle{/set} histo{gram} mode')
00135       call wr('hgs: toggle{/set} histo{gram} save{ mode}')
00136       call wr('hh: {type }complete help{ information}')
00137       call wr('hi{ range}: list {range of }history')
00138       call wr('hk{ string}: keyword help{ on the specified string}')
00139       call wr('hl: horizontal y-label')
00140       call wr('hn{ height}: set number heights')
00141       call wr('hn*{ factor}: increase hn{ by specified factor}')
00142       call wr('hn/{ factor}: reduce hn{ by specified factor}')
00143       call wr('hn-: restore{ previous} hn')
00144       call wr('hp{ height}: set point heights')
00145       call wr('hp*{ factor}: increase hp{ by specified factor}')
00146       call wr('hp/{ factor}: reduce hp{ by specified factor}')
00147       call wr('hp-: restore{ previous} hp')
00148       call wr('hs{ height}: set symbol heights')
00149       call wr('hs*{ factor}: increase hs{ by specified factor}')
00150       call wr('hs/{ factor}: reduce hs{ by specified factor}')
00151       call wr('hs-: restore{ previous} hs')
00152       call wr('i{ [array1]}: info on array(s)'//
00153      &        '{ [no argument ==> x and y]}')
00154       call wr('ic{ [comment-char]}: {toggle }comments in data '//
00155      &        'file{ [and specify comment character]}')
00156       call wr('id: idle{ (wait for graphic input)}')
00157       call wr('im: toggle input mode{ to allow non-numeric columns}')
00158       call wr('in{ filename}: take input from {specified }file')
00159       call wr('int{ a1 a2 a3}: integrate array{ a2 with respect'//
00160      &        ' to a1, place in a3 (def = a2)}')
00161       call wr('iw{ window}: iconify{ specified output} window')
00162       call wr('j{ jth}: set jth')
00163       call wr('ki{ window}: kill {specified X-}window')
00164       call wr('kw{ window}: kill {specified X-}window')
00165       call wr('l{ [xmin xmax ymin ymax]}: get x,y limits'//
00166      &        '{ [arguments ==> limits forced]}')
00167       call wr('l=: {choose }box from {loop }counter')
00168       call wr('la{ label}: draw overall label')
00169       call wr('lc: set color from loop{ counter}')
00170       call wr('lgx(y,z): {x(y,z) --> }log10(x[y,z])')
00171       call wr('ln: set n-gons from loop{ counter}')
00172       call wr('lnx(y,z): {x(y,z) --> }ln(x[y,z])')
00173       call wr('lo{ offset}: {specify }label offset'//
00174      &        '{ above top of box}')
00175       call wr('loop{ lower upper inc}: loop {as specified }over'//
00176      &        ' {the remaining }commands')
00177       call wr('lp: print loop{ counter}')
00178       call wr('lw: set weight from loop{ counter}')
00179       call wr('ly: read y from loop{ (counter gives column)}')
00180       call wr('m{ x y}: move pointer{ to (x,y)}')
00181       call wr('ma{ x y}: move pointer{ to absolute (x,y)}')
00182       call wr('mo{ modex modey}: specify {frame }modes')
00183       call wr('mv{ array1 array2}: move array')
00184       call wr('n{ #}: specify ngons')
00185       call wr('nc: toggle{ use of} comma {as delimiter in "smart" '//
00186      &        'input mode}')
00187       call wr('np{ x y}: plot an ngon{ at (x,y)}')
00188       call wr('nx{ value}: set x dimension')
00189       call wr('nxy{ value}: set x & y{ dimensions}')
00190       call wr('nxyz{ value}: set x, y, & z{ dimensions}')
00191       call wr('ny{ value}: set y dimension')
00192       call wr('nz{ value}: set z dimension')
00193       call wr('o{ frx fry}: {specify }strpos offsets')
00194       call wr('o-: restore{ previous strpos} offsets')
00195       call wr('of{ dx dy dz}: set offsets{ for x, y, z data}')
00196       call wr('p{ i1 i2}: plot graph{ from i1 to i2 (line '//
00197      &        'type set by "t")}')
00198       call wr('pa: new page')
00199       call wr('pc{ i1 i2}: plot graph, z-colored')
00200       call wr('pf{ color}: fill polygons{ with specified color}')
00201       call wr('po: plot points only{ (same as "j -1")}')
00202       call wr('pr: PostScript print{ and reinitialize output file}')
00203       call wr('prc: PostScript print{ and close current output file}')
00204       call wr('ps: power spectrum of y(x){, replace x by frequency}')
00205       call wr('psc: {toggle use of }color {in }Postscript')
00206       call wr('psq: close {current }Postscript {output }file')
00207       call wr('psr: toggle {forced }rewriting of {long }Postscript'//
00208      $        '{ files}')
00209       call wr('pwd: print {working }directory')
00210       call wr('px{ x1 x2}: plot graph{ from x1 to x2}')
00211       call wr('pz {z1 z2}: plot, subject to z'//
00212      &        '{ (z1 .le. z .le. z2)}')
00213       call wr('q: quit')
00214       call wr('q1: wait {(e.g. for graphic input) }and quit')
00215       call wr('qc: terminate graphics{, but don''t quit}')
00216       call wr('quiet: suppress {most }output')
00217       call wr('ra{ array}: assign ramp{ to array}')
00218       call wr('reb{ array interval}: rebin array'//
00219      &        '{ to specified interval}')
00220       call wr('rep{ range}: replay {specified }command range')
00221       call wr('res: reset graphics')
00222       call wr('rn{ array}: {assign }random numbers{ in [0,1) to array}')
00223       call wr('rp: register print')
00224       call wr('rr{ line1 line2}: specify read range{ for file input}')
00225       call wr('rs{ value}: register set')
00226       call wr('rx{[y,z] i}: save x{[y,z](i)} in register ')
00227       call wr('s[s]{ string}: draw a {[X/PostScript/SUN]}string')
00228       call wr('s+(-*/^){ array1 scalar [array2]}: scalar'//
00229      &        ' add, etc{ [result to array2]}')
00230       call wr('s={ array scalar}: array set{ to scalar value}')
00231       call wr('sa{ filename}: save x,y and z{ data in filename}')
00232       call wr('sb{ ib ie fr}: set symbol-box{ parameters'//
00233      &        ' (border, erase, fraction)}')
00234       call wr('sc{ sx sy sz}: set scaling{ for x, y, z data}')
00235       call wr('sl{ time}: sleep{ for a specified number of seconds}')
00236       call wr('sm{ factor}: decrease box size'//
00237      &        '{ by specified amount}')
00238       call wr('smo{ dx iopt1 iopt2}: smooth y(x) --> z')
00239       call wr('so{ array}: array {ascending }sort')
00240       call wr('so-{ array}: array {descending }sort')
00241       call wr('so2{ array1 array2}: array sort{ with baggage}')
00242       call wr('stat: print status {of graphics system}')
00243       call wr('sw{ array1 array2}: swap arrays')
00244       call wr('sy{ command}: {execute a }UNIX command')
00245       call wr('t{ [i1 i2 i3 i4]}: specify line type'//
00246      &        '{ [no argument ==> solid]}')
00247       call wr('ti{ [level]}: {specify }tick-mark level')
00248       call wr('tx{[y,z] n}: type {first n elements of'//
00249      &        ' specified }array')
00250       call wr('u: unplot graph')
00251       call wr('v: invert plot mode')
00252       call wr('vl: vertical y-label')
00253       call wr('w{ width}: {specify }line widths')
00254       call wr('w-: restore{ previous}line widths')
00255       call wr('wi{ window}: {specify }output window')
00256       call wr('x{ col#}: load x{ from specified column}')
00257       call wr('xl(p){ label}: specify {(and plot) }x-label')
00258       call wr('xoff: omit x-axis')
00259       call wr('xon: draw x-axis')
00260       call wr('xw: {print }current window')
00261       call wr('xx{ [#points]}: load x{, ignoring column structure}')
00262       call wr('y{ col#}: load y{ from specified column}')
00263       call wr('ya{ option}: specify y-axis mode')
00264       call wr('yh:{ (toggle) height of} y{-axis} numbers'//
00265      $        ' follow{s} x{-axis numbers}')
00266       call wr('yoff: omit y-axis')
00267       call wr('yon: draw y-axis')
00268       call wr('yl(p){ label}: specify {(and plot) }y-label')
00269       call wr('yy{ [#points]}: load y{, ignoring column structure}')
00270       call wr('z{ col#}: load z{ from specified column}')
00271       call wr('z-{ nout}: zoom out{ by specified number of frames}')
00272       call wr('z0: return to top {(unzoomed) }level')
00273       call wr('zoom: zoom in{ on cursor-specified region}')
00274       call wr('zs: display{ the} zoom stack')
00275       call wr('zz{ [#points]}: load z{, ignoring column structure}')
00276 c     
00277       call wrend
00278 c     
00279       end
00280 
00281       
00282       subroutine wr(string)
00283       save
00284 c     
00285       character*(*) string
00286       character in*100,out*80,key*80,keyword*80
00287       common /hlevel/ ihelp
00288       character*2 hindx
00289       common /hindex/ hindx
00290 c     
00291       data key/' '/
00292 c     
00293       if (key(1:1).gt.' ') then
00294           if (index(string,key(1:nk)).le.0) return
00295       else
00296           if (hindx(1:1).gt.' '.and.hindx(1:1).ne.string(1:1)) return
00297           if (hindx(2:2).gt.' '.and.hindx(2:2).ne.string(2:2)) return
00298       end if
00299 c     
00300       l = len(string)
00301       in(1:l) = string
00302       loff = 0
00303       iex = 0
00304       do 10 i = 1,l
00305           if(iex.eq.0)in(i-loff:i-loff) = in(i:i)
00306           if(ihelp.eq.2)then
00307               if(in(i:i).eq.'{'.or.in(i:i).eq.'}')loff = loff+1
00308           else
00309               if(in(i:i).eq.'{')iex = 1
00310               if(iex.eq.1)loff = loff+1
00311               if(in(i:i).eq.'}')iex = 0
00312           end if
00313 10    continue
00314       l = l-loff
00315 c     
00316       if(ihelp.eq.2)then
00317           write(6,*)in(1:l)
00318       else
00319           out(ioff+1:ioff+l) = in(1:l)
00320           if (l.ge.26) out(ioff+26:ioff+l) = ' '
00321           kount = kount+1
00322           if(kount.eq.3)then
00323               write(6,*)out(1:min(78,ioff+l))
00324               kount = 0
00325               ioff = 0
00326               out = ' '
00327           else
00328               ioff = ioff+26
00329           end if
00330       end if
00331       return
00332 c     
00333       entry wrinit(keyword)
00334 c     
00335       key = keyword
00336 c     
00337       kount = 0
00338       ioff = 0
00339       out = ' '
00340       write(6,*)
00341       if (key(1:1).gt.' ') then
00342           nk = len(key)
00343           do while (key(nk:nk).le.' ')
00344               nk = nk - 1
00345           end do
00346           if (nk.le.0) then
00347               nk = 1
00348               key(1:1) = ' '
00349           end if
00350       end if
00351       return
00352 c     
00353       entry wrend
00354 c     
00355       if (kount.gt.0) write(6,*)out(1:ioff+l)
00356       write(6,*)
00357 c     
00358       end
00359 
00360 
00361       subroutine fullhelp
00362       save
00363 c     
00364 c     Type out the contents of the mcdraw primer...
00365 c     
00366       parameter (NDIR = 10)
00367       character*120 directory(NDIR)
00368       dimension ldir(NDIR)
00369 c     
00370       character*100 line
00371 c     
00372       logical UNIX
00373       parameter (UNIX = .true.)
00374 c     
00375 c     Look in the same places as for the simbol fonts.
00376 c     
00377       nd = NDIR
00378       call listdir(directory,ldir,nd,iunit)
00379       if (iunit.lt.0) return
00380 c     
00381       do 100 idir=1,nd
00382           if (ldir(idir).gt.0) then
00383               open(iunit,file=directory(idir)(1:ldir(idir))
00384      &                //'/READ_ME',
00385      &                status='old',form='formatted',err=100)
00386 c             
00387 c             Print out the contents of the help file.
00388 c             
00389               write(6,*)'Found help file ',
00390      &                directory(idir)(1:ldir(idir))//'/READ_ME'
00391 c             
00392               if (UNIX) then
00393 c                 
00394 c                 Suppress this, because unit 0 isn't always stderr!
00395 c                 
00396 c                 write(0,*)'(Spawning a subshell',
00397 c                 &                    ' to display the help file...)'
00398                   call system('more '//directory(idir)(1:ldir(idir))
00399      &                    //'/READ_ME')
00400                   return
00401               else
00402 c                 
00403 c                 Brain-dead systems...
00404 c                 
00405 30                read(iunit,'(a)',err=200,end=200)line
00406 c                 
00407                   do 50 i=100,1,-1
00408                       if (line(i:i).gt.' ') then
00409                           write(6,'(a)')line(1:i)
00410                           go to 30
00411                       end if
00412 50                continue
00413 c                 
00414                   write(6,*)
00415                   go to 30
00416               end if
00417           end if
00418 100   continue
00419 c     
00420 200   return
00421       end

Generated at Sun Feb 24 09:57:04 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001