home *** CD-ROM | disk | FTP | other *** search
- /* This script scales the X values and X errors of a selected set
- by a given amount */
-
- port= 'MULTIPLOT.01'
- RESULT=''
- RC=0
-
- /* Check Multiplot is running */
- options results
- if(~show('p',port)) then do
- say "Please start Multiplot first"
- exit 1
- end
- address value port
- 'QUERY'
- if(rc ~=0) then do
- say "QUERY command failed!"
- exit 1
- end
-
- /* Check a PLOT WINDOW is activated */
- if(compare('PLOWIN',RESULT)<6) then do
- 'SAY Please select a PLOT WINDOW first'
- exit 1
- end
-
- /* Check a Data Set is selected and find out which one */
- 'PEEK 1 NOVALS'
- if(rc ~=0) then do
- 'SAY Please select a Data Set first'
- exit 1
- end
- 'LAUNCH'
- 'QUE'
- setno=word(RESULT,words(RESULT))
- 'STOP'
-
- /* Get scale factor and change Y values */
- 'PULL AREXX: Please enter scaling factor'
- scal=RESULT
- do i=1 to NOVALS
- 'SELECT SET 'setno
- 'SELECT POINT ' i
- 'SELECT REPLACE'
- 'PEEK 1'
-
- xvar=WORD(POINT,1)
- yvar=WORD(POINT,2)
- xhier=WORD(POINT,3)
- xloer=WORD(POINT,4)
-
- POINT=DELWORD(POINT,1,4)
-
- xlower= xloer * scal
- POINT=INSERT(' ',POINT)
- POINT=INSERT(xlower,POINT)
-
- xhier= xhier * scal
- POINT=INSERT(' ',POINT)
- POINT=INSERT(xhier,POINT)
-
- POINT=INSERT(' ',POINT)
- POINT=INSERT(yvar,POINT)
-
- xvar= xvar * scal
- POINT=INSERT(' ',POINT)
- POINT=INSERT(xvar,POINT)
- POKE 1
- end
-
- /* Replot */
- 'FULLPLOT'
-