Topdrawer

NOTE: This is an automatic translation from "TOPDRAWER.DOC", the original reference manual of the VMS-verion. Some features are lost in the port to UNIX made at FNAL, although most of them are restored in the present version. The enhanced features, such as the extended fonts and the symbols, will be demonstrated by "whatsnew.top" in the directory "examples"






                     TOPDRAWER
         Version 5.12 ( Rice Bonner Lab )
                     July 1993

            Fermilab Document PP0005.1
               Author:  John Clement
             Support level:  5 (full)





    TOPDRAWER is a keyword-driven interface to the SLAC
    Unified Graphics system, designed  specifically  to
    generate  physics  graphs  with  minimal specifica-
    tions.  Reasonable defaults are  assumed  for  axis
    scales,  tic  locations,  label locations and size,
    etc.

    Topdrawer  originated  at  the  Stanford Linear Ac-
    celerator Center.  The  manual  for  this  modified
    version            is           online           in
    TOPDRAWERROOT:[DOC]TOPDRAWER.DOC,  and  via   HELP,
    both at the VMS level and within the Topdrawer pro-
    gram.  The original SLAC document  number  is  CTGM
    178.

    Many  devices are supported, including Xwindows and
    Tektronix displays,  and  Postscript,  QMS1200  and
    EXCL printers.


Table of Contents

CHAPTER 1 PREFACE CHAPTER 2 SETUP CHAPTER 3 INTRODUCTION CHAPTER 4 PHILOSOPHY CHAPTER 5 OPERATION 5.1 FILENAME 5.2 DEVICES 5.3 OPTIONS CHAPTER 6 DEVICES 6.1 LIST_OF_DEVICES CHAPTER 7 INPUT CHAPTER 8 OUTPUT CHAPTER 9 SET_UP CHAPTER 10 DATA 10.1 EXPRESSIONS 10.1.1 Constants 10.1.2 Functions 10.1.3 Operators 10.1.4 Filenames 10.1.5 Examples 10.2 ORDER 10.3 NUMBERS 10.4 POINTS 10.5 SYMBOLS 10.6 TIME-ANGLES-DATES 10.7 TYPES 10.8 ON|OFF 10.9 EXAMPLES CHAPTER 11 COORDINATE_FRAME CHAPTER 12 FONTS 12.1 LIST_OF_FONTS 12.2 ROMAN 12.3 GREEK 12.4 CYRILLIC 12.5 PUNCTUATION 12.6 MATH_SYMBOLS 12.7 THEORETIC 12.8 ARROWS 12.9 PHYSICS 12.10 ASTRONOMICAL 12.14 SUBSCRIPT 12.15 CHARACTER_SIZE 12.16 POSITION 12.17 EXAMPLES 12.18 SETTING_FONTS CHAPTER 13 3-DIMENSIONAL_PLOTS 13.1 AXES_EXAMPLE CHAPTER 14 HISTOGRAMS CHAPTER 15 COMMANDS 15.1 FORMAT_OF_COMMANDS 15.2 QUESTION_MARK 15.3 LIST_OF_COMMANDS 15.4 OPTIONS 15.4.1 APPEND 15.4.2 CYCLE 15.4.3 EXPAND 15.4.4 FILL 15.4.5 HIDE 15.4.6 LOG 15.4.7 NAME 15.4.8 POINTS|COLUMNS 15.4.9 SELECT 15.4.10 SETS 15.4.11 SOLID... 15.4.12 SLICES 15.5 TITLE 15.6 WHITE... 15.7 ADD 15.8 SUBTRACT 15.8.1 APPEND 15.8.2 AVERAGE 15.8.3 CHECK 15.8.4 ERROR 15.8.5 FIT 15.8.6 LIMITED 15.8.7 LOG 15.8.8 VECTOR 15.8.9 WEIGHT-EWEIGHT 15.8.10 X|Y 15.8.11 Notes 15.8.12 Example 15.9 ARROW 15.9.1 Options 15.9.2 Example 15.10 BARGRAPH 15.11 BIN 15.11.1 Introduction 15.11.2 Options 15.11.3 AVERAGE 15.11.4 APPEND 15.11.5 ERRORS 15.11.6 FROM... 15.11.7 LIMITED 15.11.8 MESH 15.11.9 MONITOR 15.11.10 NORMAL 15.11.11 X... 15.11.12 VALUES 15.11.13 Histograms 15.11.14 Example 15.12 BOX 15.12.1 AT 15.12.2 FROM-TO 15.12.3 FILL 15.12.4 CURSOR 15.12.5 DATA 15.12.6 DSIZE 15.12.7 ROTATE 15.12.8 SIZE 15.12.9 SQUARE 15.12.10 SOLID... 15.12.11 INTENSITY 15.12.12 WHITE... 15.12.13 Example 15.13 CASE 15.14 CIRCLE 15.15 CONTOUR 15.15.1 N1... 15.15.2 COLOR 15.15.3 CYCLE 15.15.4 EXPAND 15.15.5 FROM|TO|BY|N 15.15.6 INTENSITY 15.15.7 LABEL 15.15.8 OUTSIDE 15.15.9 INSIDE 15.15.10 DOUBLE 15.15.11 PARALLEL 15.15.12 PERPENDICULAR 15.15.13 PRIMARY|SECONDARY 15.15.14 SAVE 15.15.15 SIZE 15.15.16 SOLID... 15.15.17 Example 15.16 CONVOLUTE 15.16.1 Options 15.16.2 Errors 15.17 CREATE 15.18 DATA 15.18.1 Example 15.19 DELETE 15.19.1 DATA 15.19.2 HISTOGRAMS 15.20 DEFINE 15.20.1 COMMAND 15.20.2 HISTOGRAMS 15.20.3 KEY 15.20.4 STRING 15.20.5 VALUE 15.21 DIAMOND 15.21.1 AT 15.21.2 FROM-TO 15.21.3 FILL 15.21.4 CURSOR 15.21.5 DATA 15.21.6 DSIZE 15.21.7 ROTATE 15.21.8 SIZE 15.21.9 SOLID... 15.21.10 INTENSITY 15.21.11 WHITE... 15.22 DIVIDE 15.22.1 APPEND 15.22.2 CHECK 15.22.3 EFFICIENCY 15.22.4 ERROR 15.22.5 FIT 15.22.6 LIMITED 15.22.7 LOG 15.22.8 WEIGHT-EWEIGHT 15.22.9 Notes 15.23 DU 15.24 DV 15.25 DW 15.26 DX 15.27 DY 15.28 DZ 15.29 ELLIPSE 15.29.1 AT 15.29.2 FROM-TO 15.29.3 FILL 15.29.4 CURSOR 15.29.5 DSIZE 15.29.6 ROTATE 15.29.7 SIZE 15.29.8 SQUARE 15.29.9 DATA 15.29.10 ANGLE 15.29.11 SOLID... 15.29.12 INTENSITY 15.29.13 WHITE... 15.30 ELSE 15.31 ENDFILE 15.32 ENDIF 15.33 ENDREPEAT 15.34 CLEAR 15.35 FFT 15.35.1 Restrictions 15.35.2 Interpretation 15.36 FILL 15.36.1 Options 15.37 FIT 15.37.1 Options 15.37.2 AGAIN 15.37.3 EQUATION 15.37.4 POLYNOMIAL 15.37.5 INVERSE 15.37.6 SINE 15.37.7 COSINE 15.37.8 LEGENDRE 15.37.9 EXPONENTIAL 15.37.10 GAUSSIAN 15.37.11 DGAUSSIAN 15.37.12 DPOLYNOMAIL 15.37.13 USER 15.37.14 COEFFICIENTS|ERRORS 15.37.15 CURVE 15.37.16 EXCLUDE/INCLUDE 15.37.17 LIMITED 15.37.18 NONLINEAR 15.37.19 LOG/FULL 15.37.20 OFFSET 15.37.21 MESH 15.37.22 NAME 15.37.23 MONITOR 15.37.24 POINTS 15.37.25 SCALE 15.37.26 SETS 15.37.27 ORDER/TERMS 15.37.28 Y|Z 15.37.29 Warning 15.37.30 Yerrors 15.37.31 Examples 15.38 FLUSH 15.39 FREQUENCY 15.40 HISTOGRAM 15.40.1 CYCLE 15.40.2 DEPTH 15.40.3 EXPAND 15.40.4 FILL 15.40.5 FRAME 15.40.6 GRID 15.40.7 HIDE 15.40.8 POINTS|COLUMNS 15.40.9 SETS 15.40.10 SOLID 15.40.11 X|Y|Z|BLOCK 15.40.12 XY 15.40.13 CROSS|RANDOM 15.40.14 DX 15.40.15 SLICES 15.40.16 3-d_histograms 15.40.17 Variables 15.40.18 Limits 15.40.19 Shading_example 15.41 HELP 15.42 IF 15.43 INTERPOLATE 15.43.1 Options 15.43.2 Notes 15.44 JOIN 15.44.1 Level 15.44.2 CYCLE 15.44.3 ERRORS 15.44.4 EXPAND 15.44.5 FILL 15.44.6 HIDE 15.44.7 SPLINE|GENERAL 15.44.8 TEXT 15.44.9 LINES 15.44.10 POINTS|COLUMNS 15.44.11 SETS 15.44.12 INTENSITY 15.44.13 WHITE... 15.44.14 SOLID... 15.44.15 X|Y|Z 15.44.16 SLICES 15.44.17 3-d_plot 15.45 LIST 15.45.1 DATA 15.45.2 FIT 15.45.3 HISTOGRAMS 15.46 MERGE 15.47 MONITOR 15.47.1 AVAILABLE 15.47.2 EXACT 15.47.3 EXPAND 15.47.4 ENTRIES 15.47.5 FILE 15.47.6 IDENT 15.47.7 INTERVAL 15.47.8 LOG 15.47.9 MESH 15.47.10 NAME 15.47.11 OVERFLOWS 15.47.12 PAUSE 15.47.13 REPEAT 15.47.14 RESCALE 15.47.15 SECTION 15.47.16 SCAN 15.47.17 SKIP 15.47.18 STATISTICS 15.47.19 SHOW 15.47.20 TIME 15.47.21 TREE 15.47.22 WINDOWS 15.48 MORE 15.49 MULTIPLY 15.49.1 APPEND 15.49.2 CHECK 15.49.3 ERROR 15.49.4 FIT 15.49.5 LIMITED 15.49.6 LOG 15.49.7 VECTOR 15.49.8 WEIGHT-EWEIGHT 15.49.9 Notes 15.50 NEW_FRAME 15.50.1 ALIAS 15.50.2 Comment 15.50.3 RESET 15.51 NDU 15.52 NDV 15.53 NDW 15.54 NDX 15.55 NDY 15.56 NDZ 15.57 PAUSE 15.57.1 FOR 15.58 PLOT 15.58.1 Options 15.58.2 AXES|GRID 15.58.3 COUNTS 15.58.4 CYCLE 15.58.5 EXPAND 15.58.6 FILL 15.58.7 INTENSITY 15.58.8 LIMITED 15.58.9 ERRORS 15.58.10 RANDOM 15.58.11 SOLID... 15.58.12 LINES|ROWS 15.58.13 OUTLINE 15.58.14 POINTS|COLUMNS 15.58.15 SETS 15.58.16 SLICES 15.58.17 SYMBOL 15.58.18 SIZE 15.58.19 TABLE 15.58.20 VARIABLE 15.58.21 VECTOR 15.58.22 WHITE... 15.58.23 3-d 15.59 PROJECT 15.59.1 ADD|AVERAGE 15.59.2 APPEND 15.59.3 INTEGRATE 15.59.4 SPLIT 15.59.5 X|Y|Z 15.59.6 LOG 15.59.7 SETS 15.59.8 Examples 15.60 READ 15.60.1 POINTS 15.60.2 MESH 15.61 REPEAT 15.61.1 Examples 15.61.2 Warning 15.62 RESTORE 15.62.1 DATA 15.62.1.1 APPEND 15.62.1.2 CONFIRM 15.62.1.3 SELECT 15.62.1.4 SETS 15.62.2 FIT 15.62.3 HISTOGRAMS 15.62.3.1 Options 15.63 SAVE 15.63.1 FIT 15.63.2 DATA 15.63.3 HISTOGRAMS 15.63.3.1 Options 15.64 SET 15.64.1 Introduction 15.64.2 Options 15.64.3 AREA 15.64.4 ARROW 15.64.5 AXES 15.64.5.1 Options 15.64.5.2 Example 15.64.6 BAR 15.64.6.1 ALL-X-Y-Z 15.64.6.2 SIZE 15.64.6.3 BREAK 15.64.6.4 SUPPRESS 15.64.6.5 PERMANENT 15.64.6.6 Examples 15.64.7 BOX 15.64.8 BLINK 15.64.9 CARD 15.64.10 CHARACTER 15.64.11 CIRCLE 15.64.12 CLEAR 15.64.13 COLOR 15.64.14 COMMAND 15.64.15 Ctrl_Z 15.64.16 CYCLE 15.64.16.1 Options 15.64.16.2 Examples 15.64.16.3 Defaults 15.64.17 DATE 15.64.18 DEVICE 15.64.18.1 Names 15.64.18.2 COLOR 15.64.18.3 LANDSCAPE-PORTRAIT 15.64.18.4 TEST 15.64.18.5 CALCOMP 15.64.18.6 EXCL 15.64.18.7 GKS 15.64.18.8 GRINNELL 15.64.18.9 HPGL 15.64.18.10 IMAGEN 15.64.18.11 POSTSCRIPT 15.64.18.12 PRINTRONIX 15.64.18.13 QMS-1200 15.64.18.14 REGIS 15.64.18.15 SIXELS 15.64.18.16 TEKTRONIX 15.64.18.17 TEK4027 15.64.18.18 VERSATEC 15.64.18.19 Xwindows 15.64.18.20 String 15.64.18.21 ADD 15.64.18.22 FILE 15.64.18.23 WIDTH|HEIGHT 15.64.18.24 IDENT 15.64.18.25 INTERACTIVE 15.64.18.26 NUMBER 15.64.18.27 ORIENTATION 15.64.18.28 REVERSE 15.64.18.29 SIDEWAYS 15.64.18.30 PERMANENT 15.64.18.31 UNIT 15.64.18.32 Example 15.64.19 DIAMOND 15.64.20 DIGITS 15.64.21 ELLIPSE 15.64.22 ERRORS 15.64.23 EXACT 15.64.24 FILE 15.64.24.1 INPUT 15.64.24.2 LIST 15.64.24.3 JOURNAL 15.64.24.4 Filename 15.64.24.5 Example 15.64.25 FILL 15.64.26 FIT 15.64.27 FLUSH 15.64.28 FONT 15.64.29 FORMAT 15.64.30 GRID 15.64.30.1 Options 15.64.30.2 Example 15.64.31 HISTOGRAM 15.64.31.1 Options 15.64.31.2 APPEND 15.64.31.3 AREA|DIRECTORY 15.64.31.4 CHECK 15.64.31.5 CONFIRM 15.64.31.6 ENTRIES 15.64.31.7 ERRORS 15.64.31.8 FILE 15.64.31.9 HISTOGRAM 15.64.31.10 LOG 15.64.31.11 MESH 15.64.31.12 NTUPLES 15.64.31.13 NUMBER 15.64.31.14 OVERFLOWS 15.64.31.15 CURRENT|NEXT|PREVIOUS|FIRST|LAST 15.64.31.16 SECTION 15.64.31.17 SELECT 15.64.31.18 TITLE 15.64.31.19 TREE 15.64.31.20 WILD 15.64.31.21 WRAP 15.64.31.22 Lexicals 15.64.31.23 Restrictions 15.64.31.24 Examples 15.64.32 INPUT 15.64.33 INTENSITY 15.64.34 LABELS 15.64.34.1 ALL|TOP|BOTTOM|LEFT|RIGHT 15.64.34.2 X|Y|Z 15.64.34.3 CHARACTERS 15.64.34.4 INSIDE 15.64.34.5 SIZE 15.64.34.6 SHIFT 15.64.34.7 ON|OFF 15.64.34.8 INTENSITY 15.64.34.9 WHITE... 15.64.34.10 PERMANENT 15.64.34.11 Examples 15.64.35 LIMITS 15.64.35.1 SCALE 15.64.35.2 CURSOR 15.64.35.3 PERMANENT 15.64.35.4 Example 15.64.36 MODE 15.64.36.1 AUTOPLOT 15.64.36.2 ABORT 15.64.36.3 APPEND 15.64.36.4 CONFIRM 15.64.36.5 CHECK 15.64.36.6 DATAVECTOR 15.64.36.7 DEBUG 15.64.36.8 ECHO 15.64.36.9 ERASE 15.64.36.10 EXPAND 15.64.36.11 FILECASE 15.64.36.12 HARDTEXTURE 15.64.36.13 JOURNALING 15.64.36.14 LISTING 15.64.36.15 LOG 15.64.36.16 MONITOR 15.64.36.17 PROPORTIONAL 15.64.36.18 QUICK 15.64.36.19 SHOW 15.64.36.20 TITLE 15.64.36.21 TRACE 15.64.36.22 TREE 15.64.36.23 VECTOR 15.64.36.24 VLOG 15.64.37 MONITOR 15.64.38 NAME 15.64.39 ORDER 15.64.39.1 Options 15.64.39.2 Examples 15.64.40 OUTLINE 15.64.40.1 Options 15.64.41 PATTERN 15.64.41.1 Example 15.64.42 PAUSE 15.64.43 PEN 15.64.44 POLAR 15.64.45 PROMPT 15.64.45.1 Examples 15.64.46 REVISION 15.64.47 SECONDARY 15.64.48 SEGMENTS 15.64.49 SCALE 15.64.49.1 X|Y|Z|ALL 15.64.49.2 BASE 15.64.49.3 DAYS 15.64.49.4 LABELS 15.64.49.5 LINEAR 15.64.49.6 LOGARITHMIC 15.64.49.7 MINUTES 15.64.49.8 MONTHS 15.64.49.9 NORMAL 15.64.49.10 POWER|ROOT 15.64.49.11 REVERSE 15.64.49.12 SECONDS 15.64.49.13 TICKS 15.64.49.14 TIME-HOURS 15.64.49.15 USER 15.64.49.16 YEARS 15.64.49.17 PERMANENT 15.64.49.18 Example 15.64.50 SHADOW 15.64.50.1 Options 15.64.50.2 Example 15.64.51 SHIELD 15.64.52 SIZE 15.64.52.1 X,y 15.64.52.2 UNITS 15.64.52.3 CM.... 15.64.52.4 MAGNIFY|REDUCE 15.64.52.5 ORIENTATION 15.64.52.6 SIDEWAYS 15.64.52.7 MARGINS 15.64.52.8 LEFT|RIGHT|TOP|BOTTOM 15.64.52.9 Examples 15.64.53 SPHERICAL 15.64.54 STATISTICS 15.64.54.1 LIMITED 15.64.54.2 LINES|ROWS 15.64.54.3 POINTS|COLUMNS 15.64.54.4 SETS 15.64.55 STORAGE 15.64.56 SYMBOL 15.64.56.1 Xx 15.64.56.2 ANGLE 15.64.56.3 SIZE 15.64.56.4 THETA 15.64.57 PERMANENT 15.64.57.1 PHI 15.64.57.2 3-d 15.64.57.3 Example 15.64.58 TEXTURE 15.64.58.1 Example 15.64.59 THREE 15.64.59.1 Options 15.64.59.2 CENTER 15.64.59.3 DIRECTION 15.64.59.4 DISTANCE,SCRD,RDIST 15.64.59.5 REDUCE|MAGNIFY 15.64.59.6 ON|OFF|AUTOMATIC 15.64.59.7 ORIGIN 15.64.59.8 PERMANENT 15.64.59.9 SEPARATION 15.64.59.10 VERTICAL 15.64.59.11 WORLD 15.64.59.12 XAXIS 15.64.59.13 Revisions 15.64.59.14 Examples 15.64.60 TICKS 15.64.60.1 Options 15.64.60.2 Examples 15.64.61 TITLES 15.64.61.1 Options 15.64.61.2 ALL|TOP|BOTTOM|LEFT|RIGHT|X|Y 15.64.61.3 INDEX 15.64.61.4 INTENSITY 15.64.61.5 LINES 15.64.61.6 MARGIN 15.64.61.7 PERMANENT 15.64.61.8 SCALE 15.64.61.9 SIZE 15.64.61.10 WHITE... 15.64.61.11 Windows 15.64.61.12 ESCAPE 15.64.61.13 SUBSTITUTE 15.64.61.14 Examples 15.64.62 UNITS 15.64.62.1 CM.... 15.64.62.2 REDUCE 15.64.62.3 ALL... 15.64.63 WAIT 15.64.64 WIDTH 15.64.65 WINDOWS 15.64.65.1 ABSOLUTE 15.64.65.2 NUMBERED 15.64.65.3 RELATIVE 15.64.65.4 LEVEL 15.64.65.5 Labels 15.64.65.6 Examples 15.64.65.7 3-d 15.65 SHOW 15.65.1 Options 15.65.2 CURSOR 15.65.3 DATA 15.65.3.1 BRIEF... 15.65.3.2 LIMITED 15.65.3.3 LINES|ROWS 15.65.3.4 OUTPUT 15.65.3.5 POINTS|COLUMNS 15.65.3.6 SETS 15.65.3.7 Statistics 15.65.3.8 Example 15.65.4 ERRORS 15.65.5 FLAGS 15.65.6 HISTOGRAMS 15.65.6.1 Options 15.65.6.2 AREA|DIRECTORY 15.65.6.3 ALL|FULL 15.65.6.4 BRIEF 15.65.6.5 CONTENTS 15.65.6.6 CURRENT 15.65.6.7 ENTRIES 15.65.6.8 EXACT 15.65.6.9 FROM|TO 15.65.6.10 IDENT 15.65.6.11 HISTOGRAM 15.65.6.12 NTUPL 15.65.6.13 NLIMITS 15.65.6.14 NMASKS 15.65.6.15 MESH 15.65.6.16 SELECT 15.65.6.17 SEARCH 15.65.6.18 STATISTICS 15.65.6.19 TREE 15.65.6.20 Example 15.65.7 KEYS 15.65.8 LEXICALS 15.65.9 TIME 15.65.10 Example 15.66 SMOOTH 15.66.1 Options 15.66.2 Algorithm 15.67 SORT 15.68 SPAWN 15.69 STOP 15.70 SWAP 15.71 SYMBOL 15.72 TITLE 15.72.1 Xyz 15.72.2 ANGLE 15.72.3 LJUSTIFY|CENTER|RJUSTIFY 15.72.4 DATA|XDATA|YDATA|TEXT 15.72.5 DIGITS 15.72.6 Lexicals 15.72.7 TIME 15.72.8 TOP|BOTTOM|RIGHT|LEFT|GENERAL 15.72.9 X|Y|Z 15.72.10 LINES 15.72.11 SIZE 15.72.12 INDEX 15.72.13 SPACES 15.72.14 INTENSITY 15.72.15 WHITE... 15.72.16 CASE 15.72.17 3-d 15.72.18 Consecutive_titles 15.73 TRANSFORM 15.74 TYPE 15.75 U 15.76 V 15.77 W 15.78 X 15.78.1 APPEND 15.78.2 BINS|VALUES 15.78.3 ERROR 15.78.4 Expression 15.78.5 LINES|ROWS 15.78.6 LOG 15.78.7 NAME 15.78.8 POINTS|COLUMNS 15.78.9 POISSON|SQRT 15.78.10 SAMPLES 15.78.11 SETS 15.78.12 TIMES 15.78.13 PLUS 15.78.14 MINUS 15.78.15 DIVIDE 15.78.16 Warning 15.78.17 Examples 15.78.18 Mesh_examples 15.79 Y 15.80 Z CHAPTER 16 LEXICAL_VALUES 16.1 LIST_OF_NAMES 16.2 VALUES 16.3 REPEAT 16.4 EXAMPLES CHAPTER 17 EXAMPLES CHAPTER 18 SUBROUTINES 18.1 NAMES 18.2 STRINGS 18.3 UNIT_NUMBERS 18.4 LINKING 18.5 DEMO_PROGRAM 18.6 LIST_OF_SUBROUTINES 18.7 CPUTIM 18.8 CPULIM 18.9 HELP 18.10 INTRAC 18.11 SPAWN 18.12 TRACE 18.13 READPR 18.14 DEFKEY 18.15 TDARRO 18.16 TDCRCL 18.17 TDEND 18.18 TDFLSH 18.19 TDGETV 18.20 TDHIST 18.20.1 Example 18.21 TDJOIN 18.21.1 Example 18.22 TDLIMS 18.22.1 Example 18.23 TDNEW 18.24 TDNEWP 18.25 TDPLOT 18.25.1 Example 18.26 TDPLT 18.26.1 Example 18.27 TDSET 18.28 TDSETS 18.28.1 Example 18.29 TDSHOW 18.29.1 Example 18.30 TDTEXT 18.30.1 Example 18.31 TDTITL 18.31.1 Example 18.32 TDTSET 18.33 TD3JIN 18.34 TD3HST 18.35 TDVAX_PLOT 18.36 T2CURS 18.37 T2MAIN 18.38 T2UPCS 18.39 T2SQEZ 18.40 T2_TRAP CHAPTER 19 LINKING CHAPTER 20 REVISIONS 20.1 OBSOLETE_COMMANDS 20.2 86 20.3 87 20.4 88 20.5 89 20.6 90 20.7 91 CHAPTER 21 INSTALLATION CHAPTER 22 AUTHOR Index

CHAPTER 1 PREFACE

This is a program primarily designed to produce graphs of scientific data. It also has some calculation ability. You may create, modify, fit, combine, and smooth data sets. The results may be displayed in a variety of formats. In the documentation your response is underlined and optional syntax is enclosed inside square brakets [].

CHAPTER 2 SETUP

To use Topdrawer it may be necessary to set it up. To do this: $ SETUP TOPDRAWER If you wish to use the previous old version: $ SETUP TOPDRAWER.OLD If you wish to use the version currently being tested: $ SETUP TOPDRAWER.TEST

CHAPTER 3 INTRODUCTION

TOPDRAWER is fairly easy to use if you confine yourself to simple plots. First invoke TOPDRAWER by typing: $ TOPDRAWER You are then prompted: TD: You first enter your data as a set of X,Y,DX,DY values. The DX,DY may be omitted if no error bars are needed. Each data point is specified on a separate line. For example a line going from 0,0 to 1,1 is specified as: TD:0,0 TD:1,1 Then the data may be plotted as a set of points with error bars (if DX,DY are not zero) by typing the command: TD:PLOT If you wish to produce a histogram use the command: TD:HISTOGRAM On the other hand if you wish to plot a smooth curve type: TD:JOIN For series of straight lines connecting the points: TD:JOIN 1 (1 segment per interval) To put a title at the top: TD:TITLE TOP 'This is my title' To put a title at the bottom: TD:TITLE BOTTOM 'This is the X axis' To put a title on the left: TD:TITLE LEFT 'This is the Y axis' If you are done, you then type: TD:EXIT Now you liked the plot, but you wish to change a few things. The commands mistakes you made. You also should rename it: $ RENAME TD.TDJ MYPLOT.TOP and invoke TOPDRAWER again. Now instead of typing all the commands in, just type: $ SET FILE IN 'MYPLOT' TOPDRAWER will re-execute the commands in the file. Now you wish to get the plots out on the Postscript printer. so you type: TD:SET DEVICE POSTSCR Then replot the data by typing: TD:SET FILE IN 'MYPLOT' Finally type: TD:EXIT Now the plot is printed on the Talaris by: $ PRINT MYPLOT.PS More plots may be added to the first plot by entering more data, and then either PLOT, HISTOGRAM, or JOIN. Each command may be modified by extra commands to make the plot more pleasing. For example if you type: TD:HISTOGRAM DOTS RED Then the histogram will be formed with red dotted lines. This is useful to differentiate it from other previously plotted histograms.

CHAPTER 4 PHILOSOPHY

TOPDRAWER is designed to plot and manipulate data. It assumes that data consists of X vs Y with errors DX, DY. It may be X,Y vs Z with errors DX,DY,DZ. You may also specify NDX,NDY or NDZ the negative part of the error bars separately from DX,DY or DZ. The data may be a histogram in which case DX would be the bin width, or it may be a set of discrete points with unrelated errors. You may plot the data accordingly. There is also an auxiliary set of coordinates, that may be used for data manipulation, but not plotting. They are U,DU,NDU,V,DV,NDV,W,DW,NDW To plot the data in these coordinates they must be moved to X,Y,Z coordinates. This is easily done with the SWAP command. The basic plotting operations are: 1. PLOT plots the data with optional error bars. 2. JOIN joins the data points with line segments. 3. HISTOGRAM plot the data as a histogram. 4. BAR plots the data as a bar chart (similar to a histogram)

CHAPTER 5 OPERATION

The following command invokes TOPDRAWER: $ TOPDRAWER [filename [device1 [device2...]]] [/options] If the filename is omitted you are prompted with TD: You then start typing in commands to TOPDRAWER. If you start TOPDRAWER from a batch stream, the commands follow the $ TOPDRAWER command. 5.1 FILENAME TD:SET FILE INPUT filename If the optional filename is specified after TOPDRAWER, the commands are read from the specified file and both the journal and list file are not produced. 5.2 DEVICES This is a specification of the output device type to use when processing the input file. The device is specified the same as in the SET DEVICE command. You may specify up to 7 output devices by separating them by spaces. For example if you want to get postscript output in Portrait mode appropriate for use with TeX $ TOPDRAWER TD.TOP "POSTSCR,ORIENT=3" For example you want to get postscript, and view it in an X window $ TOPDRAWER TD.TOP XWINDOW POSTSCR 5.3 OPTIONS 1. /[NO]COMMAND[=file] - Specifies a file to get commands for TOPDRAWER setup. (Default:TDINIT.TOP) 2. /[NO]JOURNAL[=file] - Specifies a file to journal all interactive commands. (Default:TD.TDJ) 3. /[NO]LIST[=file] - Specifies a file to list the commands and error messages. (Default:TD.LIS)

CHAPTER 6 DEVICES

The device may be specified on the command line. Otherwise TD sets the output device according to the logical name PLOT_TERM or if it is not defined PLOT_DEVICE. If neither is defined the device is assumed to be a Talaris printer. Normally PLOT_TERM is automatically set when you log in. It is not defined for a batch job. This means that TD uses your terminal when in interactive mode, and the Talaris while in a batch stream. The login procedure defines PLOT_TERM by asking the terminal for its ANSWERBACK message. This message must be set properly inside the terminal. You need to know how to SET-UP the ANSWERBACK message. For more information see:COMMANDS SET DEVICE 6.1 LIST_OF_DEVICES To set your device use the command: TD:SET DEVICE options Options Device TEKTRONIX Tektronix 4010 terminal TEKTRONIX "CIT467" CIT-467 Color graphics terminal TEKTRONIX "RADM3A" ADM-3A with Retrographics TEKTRONIX "RVT100" VT-100 with retrographics TEKTRONIX "RVT100A" VT-100 with retrographics (Green screen) TEKTRONIX "RVT100,YPIXELS=3055" Falco infinity series (48 lines) TEKTRONIX "SEL100XL" Selanar HiREZ 100XL TEKTRONIX "VIS102" Visual 102 TEKTRONIX "TAL1590" Talaris 1590 laser printer TEKTRONIX "KERMIT" Kermit simulation of TEK-4010 with color TEKTRONIX "LSI7107" LSI model 7107 color terminal TEKTRONIX "TEK4207" Tektronix color terminal TEKTRONIX "TEEMTALK" Tektronix color terminal TEKTRONIX "VT240" C.ITOH 328 TEKTRONIX "TEK4010,RVT100,NSEGM" VersaTerm (Macintosh terminal emulation) TEK4027 Tektronix-4027 color term. TEKEMUL Tektronix 4010 emulator REGIS VT-240 REGIS "COLOR=WRGWWWWD" VT-241 color terminal EXCL Talaris 1590 VERSATEC Versatec printer plotter SIXELS "LN03" LN-03 Laser printer SIXELS "LN03HI" LN-03 High resolution SIXELS "LN03LO" LN-03 Low resolution SIXELS "LA50" LA-50 or LA-100 with 8.5" paper SIXELS "LA100" LA-100 14" paper QMS1200 QMS Lasergrafix 1200 laser printer IMAGEN Imagen laser printer POSTSCRIPT Postscript printer PRINTRONIX Printronix MVP printer/plotter. XWINDOWS X windows ( Decwindows, MOTIF ) Example TD:SET DEVICE TEKTRONIX "RVT100" See also:TOPDRAWER command set device

CHAPTER 7 INPUT

Normally TOPDRAWER gets primary input from either a batch file, or your terminal (SYS$INPUT). You may have secondary input files by using the command: TD:SET FILE INPUT filename If you run TOPDRAWER interactively, but from an indirect command file, the input will be from the file that invoked TOPDRAWER. If you wish to have input from the terminal, you may assign TT: to SYS$INPUT temporarily by: $ ASSIGN /USER TT: SYS$INPUT $ TOPDRAWER You should not do this in BATCH, as TT: is the default output for the graphics. You may get data from output files generated by histogram packages. For more information on this see:Command SET HISTOGRAM. Some input may be made via the cross hair cursor. For example SHOW CURSOR brings up the cursor on your terminal. Move the cursor to the location you desire, and press any key except "Return" The current location of the cursor will be typed and entered into the journal file as a comment. Some other commands that use the cursor are ARROW, BOX, CIRCLE, ELLIPSE, TITLE, SET WINDOW, and SET LIMITS. The input string may not be longer than 256 characters. If you need to omit columns or set up a special format for the commands: SET CARD and SET FORMAT. For more information see:TOPDRAWER DATA.

CHAPTER 8 OUTPUT

TD produces the following output: 1. Plot - This may be on your terminal, LPA0:, another terminal, or a file on disk. The plot data format and file is modified by the command: TD:SET DEVICE Plot output for a device other than your terminal is a file whose name matches the input file name, and whose type is assigned according to the device. If there is no input file name, the output file name is UGDEVICE. You can define logical name TOPDRAWER_OUTPUT to specify a name of your choice. File types are: CAL - Calcomp Microfiche HPGL - HPGL IMG - Imagen PS - Postscript PTX - Printronix Q - QMS REG - Regis, Gigi, etc. SIX - Sixels TEK - Tektronix VEP - Versatek XCL - Talarix EXCL 2. Listing - This lists all TD commands you used in a session. This is normally TD.LIS, but the name may be changed by the command: TD:SET FILE OUTPUT 'newfilename' If you do not want a list file: TD:SET MODE LIST OFF or... TD:SET FILE OUTPUT NL: 3. Journal - This file contains all commands entered interactively. It is normally file TD.TDJ, but the name may be changed by the command: TD:SET FILE JOURNAL 'newfilename' You may temporarily turn off journaling by: TD:SET MODE JOURNAL OFF 4. Errors - A temporary file TOPDRAWER_ERRORS.DAT is used to save the error messages for the current plot. This file is only opened for interactive sessions. 5. Data - You may use the LIST command to output data sets suitable for input to TOPDRAWER. If you do not specify the output file it goes to the Listing (TD.LIS).

CHAPTER 9 SET_UP

You may specify a setup file to initialize TOPDRAWER. This is done by specifying the logical name TOPDRAWER_INIT. TOPDRAWER_INIT should point to a file with TOPDRAWER commands to be executed when TD first starts. The default file name is TDINIT.TOP. If you have a setup file then then journal file and listing file are suppressed. You must start them in the setup file if you want them. example $ ASSIGN TDHBOOK TOPDRAWER_INIT The file TDHBOOK.TOP contains the commands: TD:SET HIST HBOOK FILE="hbook.dat" TD:DEFINE KEY PF3 "SET HIST TITLE PREV;NEW;HIST"/TERMINATE TD:DEFINE KEY PF4 "SET HIST TITLE NEXT;NEW;HIST"/TERMINATE TD:SET FILE JOURNAL HISTS.TDJ Now when you start TOPDRAWER your hbook histograms are already available, and keypad keys are defined to easily access them. Your journal file is HISTS.TDJ and you have no listing file. You assign: $ ASSIGN TOPDRAWER_INIT SYS$LOGIN The file TDINIT.TOP in your root default login directory is used as the TOPDRAWER initialization file.

CHAPTER 10 DATA

TOPDRAWER accepts data in a variety of forms. 10.1 EXPRESSIONS <expressions> An expression is an arithmetic computation enclosed inside angle brakets "<>". An expression uses similar syntax to FORTRAN. The syntax is not as rigid as FORTRAN and some syntactical elements may be omitted. Expression evaluation is very slow, so you should use them sparingly. 10.1.1 Constants Certain constants are built into TOPDRAWER. They are: 1. PI - 3.1416... example <2*PI> is 6.2831... 10.1.2 Functions Functions are expressed as: function<expression> The parenthesis around the argument of the function may be omitted if the argument is a number. All functions may be abbreviated. The available functions are: 1. [ARC]SINE - [inverse] Sine of angle in degrees 2. [A]COSINE - [inverse] Cosine of angle in degrees 3. [A]TANGENT - [inverse] Tangent of angle in degrees 4. RADIANS - Converts degrees to radians 5. DEGREES - Converts radians to degrees 6. GAMMA - GAMMA function (GAMMA(n)=(n-1)!) (Cern Library) 7. LOGARITHM - Log to the base 10 8. EXPONENTIAL - Power of e (inverse LN) 9. LN - Logarithm to the base e 10. SQRT - Square root 11. RANDOM - Random number. RAN(0) produces a random number. RAN(n) sets the seed to n and starts a new random number sequence. 12. ABSOLUTE - Absolute value 13. INTEGER - Integer part of a number 14. FRACTION - Fractional part of a number 15. NINTEGER - Nearest integer to a number 16. ERF - Error function (Cern Library) 17. ERFC - Error function (Cern Library) 18. FREQ - Frequency function (Cern Library) 10.1.3 Operators 1. + - Add 2. - - Subtract 3. * - Multiply 4. / - Divide 5. ** - Power These follow the same rules of precedence as in FORTRAN. For example: 1. 2*3/4 is the same as (2*3)/4 or 1.5 2. 2*3+4*5 is the same as (2*3)+(4*5) or 26 3. 2**2**3 is the same as 2**(2**3) or 256 4. 2**2*3 is the same as (2**2)*3 or 12 5. -2**2 is the same as -(2**2) or -4 Missing operators in the middle of an expression are assumed to be multiply "*". <2(3)> is the same as <2*(3)>. 10.1.4 Filenames TOPDRAWER will accept either VMS or UNIX style file specifications. Example VMS UNIX [dir.subdir]file /dir/subdir/file [.subdir]file subdir/file [-.subdir]file ../subdir/file 10.1.5 Examples <LOG(V_SUM)> the logarithm of the SUM. <SINE(V_SUM)> or... <SIN(V_SUM)> the sine of the SUM. <ARCSIN(V_SUM)> or... <ASIN(V_SUM)> the arcsine of the SUM. <4 SINE 30) is the number 2. <4(2+3)> is the number 24. 10.2 ORDER Data by default is entered in the following order. X Y DX DY SYMBOL Where: DX is the error or 1/2 bin width for X+-DX. DY is the error on Y+-DY. SYMBOL is the symbol to plot. You may change the actual order that data is entered with the SET ORDER command. 10.3 NUMBERS Data may be expressed in any legal FORTRAN format. For example 1 = 1.0 = +1.0E0 10.4 POINTS Data is entered in a series of lines one point to a line. Each number may be separated by spaces, tabs, or commas",". Numbers may also be run together without separators, provided they begin with either plus "+" or minus "-". If you wish to enter several data points on a single line then they may be separated by semicolons ";". Instead of a number you may also use expressions by enclosing it inside angle brakets "<>". If you omit data the last value is used. See: Command READ POINTS. 10.5 SYMBOLS Symbols are 0O to 9O or any legal UGSYS duplex character set pair. "NONE" indicates no symbol. " " or "DOT" produces a dot. If the symbol is omitted it is assumed to be NONE and the datum is plotted by default as a point rather than a symbol. This may be modified by SET SYMBOL. If you wish to use the number 1 as a symbol it must be enclosed in quotes or apostrophes ("1"). 10.6 TIME-ANGLES-DATES Time may be entered in hours in the format hh:mm:ss.nnn. You may also enter angles as dd:mm:ss.nn in degrees, minutes, seconds. Time or angle data must begin with a number. 0::1.5 is legal for 1.5 seconds after midnight, while ::1.5 is not legal. Dates may be entered in hours as YYYY\MM\DD. If omitted MM or DD are assumed to be 1. If you wish to enter both date and time the format is YYYY\MM\DD\HH:mm:ss.ss. See:Command SET DATE. If time is preceded by a sign, then all 3 HOURS,MINUTES, and SECONDS are considered negative. If a date or date\time is preceded by a sign it applies only to the YYYY (Year). Signs (+ -) may not be imbedding inside a date\time. Examples 10 (10 am) 10:00 (10 am) 15:30:25.2 (25.2 seconds past 3:30 pm) 0.5 (Half past midnight) 0:30 (Half past midnight) 24:30 (Half past midnight) 1987\12\25\12:30 (12:30 on Dec 25, 1987) -1:30:00 (10:30) 10.7 TYPES Data may either be X,Y,Z points or mesh data. A point consists of an X,Y,[Z] value with optional errors DX,DY,[DZ],[NDX], [NDY],[NDZ] Z and DZ are optional and may not necessarily be present. MESH data is a data set consisting of Z values as a function of X and Y. A mesh is essentially a square grid of data with X,Y vs Z. A mesh may also have optional DX, DY, and DZ values attached to it. Data may be subdivided into data sets. Each data set is numbered consecutively starting with 1. Within each data set the points are numbered from 1 to n. To create a new data set use the DATA SET command. Some commands such as FIT allow automatic creation of a new data set if the option APPEND is used. When plotting you may specify which data set you wish to plot with the option SET=n. For example PLOT SET=1 plots the first data set. You may also use FIRST,LAST,NEXT,PREVIOUS, or CURRENT to specify a data set. FIRST is always set number 1 while LAST is the number of data sets. CURRENT is the last set specified. NEXT is the current data set +1, while PREVIOUS is the current set -1. For example you may plot 2 sets by: TD:PLOT SET=FIRST TD:PLOT SET=NEXT You may also specify a range of sets. TD:PLOT SET=2 TO LAST plots all data sets except for number 1. Warning When plotting multiple data sets, the format of the plot is taken from the first data set. If the first set is a mesh, the plot will be 3-D. 10.8 ON|OFF A number of options use ON or OFF to modify them. For example: TD:SET MODE VECTOR=OFF Uses hardware characters whenever possible. Instead of ON, OFF you may also use T,F or TRUE,FALSE or YES,NO. 10.9 EXAMPLES The following will enter a series of data points in the order x,dx,y,dy,symbol. TD:SET ORDER X DX Y DY SYMBOL TD:+1+.5+10+.5'0o' TD:2 .5 25 .5 1o TD:3 .25 10 .01 2o TD:4 .1 5 1e-1 3o

CHAPTER 11 COORDINATE_FRAME

There are 2 different sets of frames used in creating plots. They are DATA and TEXT frames. TEXT is always specified in inches Unless modified by either a SET SIZE or SET UNITS command. The character and symbol sizes and are all specified in tenths of inches. Both of these may be changed by the SET UNITS command. The actual data is in the DATA frame, which is mapped to the physical (TEXT) frame at the time of plotting. The plots are all scaled automatically, unless you use the command SET LIMITS to specify the scale. All commands which plot "things" work in either the DATA or the TEXT frame. You may select the frame with the option DATA or TEXT. In addition if 3d coordinates are used the frame is automatically DATA. The DATA frame is not mapped to the TEXT frame until a plotting command or a command which uses the data frame is used. Plotting commands are JOIN, HISTOGRAM, PLOT and so on. Commands which use the data frame are ARROW DATA, BOX DATA, TITLE DATA and so on. If you wish to have TOPDRAWER automatically set the data frame, you should supply the data before any commands which reference the data frame. Several commands modify the data frame, once it has been defined: SET WINDOW SET LIMITS SET THREE SET SIZE SET SCALE These commands allow you to overlay different plots with different scales. Just reading in new data does not change the current data frame.

CHAPTER 12 FONTS

There are several fonts available in the unified graphics. They are: EXTENDED and DUPLEX. The EXTENDED and DUPLEX support many sets of characters. The DUPLEX set is slow compared to the extended set, but it looks almost like printed characters if you use a high resolution device. The alternate character sets are determined by a character pair. The first character determines the actual character printer, the second one determines the case. 12.1 LIST_OF_FONTS Case Character set 1. blank Roman (default) 2. L Roman lower case 3. F+G Greek 4. B+C Cyrillic 5. P Punctuation 6. S Typographicl symbols 7. M Math symbols 8. T Theoretic symbols 9. W Arrows 10. K Physics symbols 11. A Astronomical symbols 12. O Markers (Centered symbols) 13. D Drawing symbols (underscore,overscore) 14. U+V Movement control 15. X Subscript/Superscript 16. Y Character size 17. Z Position save/restore 12.2 ROMAN Case character: blank = upper case, L= Lower case This is the normal ASCII character set. It is not necessary to use L to shift to lowercase if your computer accepts lowercase characters. 12.3 GREEK Case character: F = upper case, G= Lower case A Alpha B Beta G Gamma D Delta E Epsilon Z Zeta H Eta Q Theta I Iota K Kappa L Lambda M Mu N Nu X Xi O Omicron P Pi R Rho S Sigma T Tau U Upsilon F Phi C Chi Y Psi W Omega 12.4 CYRILLIC Case character: B=Upper case, C=Lower case A Ah B Beh V Veh G Geh D Deh E Yeh X Zheh Z Zeh I Ee 1 Ee S Kratkoy K Kah L El M Em N En O Oh P Peh R Err S Ess T Teh U Ooh F Ef H Kha C Tseh 2 Cheh 3 Shah 4 Shchan Q Tvyordy Znak Y Yery 5 Myakhki Znak 6 Eh Oborotnoye W Yoo J Yah 12.5 PUNCTUATION Case character: P=Punctuation 1. . Colon 2. , semi-colon 3. E Exclamation mark 4. U question mark 5. I Interrobang 6. A Apostrophe 7. Q Quotation marks 8. P New paragraph 9. D Dagger 10. F Double dagger 12.6 MATH_SYMBOLS Case character: M = Mathematical symbols 1. . Dot product 2. X Cross product 3. / Division sign 4. P Group plus 5. M Group multiply 6. + Plus or minus 7. - Minus or plus 8. L Less than 9. G Greater than 10. M Less than or equal 11. H Greater than or equal 12. N Not equal 13. = Identically equal 14. A Approximately equal 15. C Congruent to 16. S Similar to 17. R Proportional to 18. T Perpendicular to 19. 2 Square root 20. D Degrees 21. I Integral sign 22. J Line integral 23. Y Partial derivative 24. Z Del. 25. ( Left floor braket 26. ) Right floor braket 27. B Left ceiling braket 28. E Right ceiling braket 29. 0 Infinity 12.7 THEORETIC Case character: T = Theoretic special symbols 1. E Existential quantifier 2. A Universal quantifier 3. M Membership symbol 4. N Membership negation 5. I Intersection 6. U Union 7. L Contained in 8. G Contains 9. K Contained in or equals 10. F Contains or equals 12.8 ARROWS Case character: W = arrows 1. U Up 2. D Down 3. L Left (<--) 4. R Right (-->) 5. B Left/right (<-->) 12.9 PHYSICS Case character: K = Physics symbols 1. H H-bar 2. L Lambda bar 12.10 ASTRONOMICAL Case character: A=Astronomical symbols 1. H Sun 2. M Mercury 3. V Venus 4. E Earth 5. W Mars 6. J Jupiter 7. S Saturn 8. U Uranus 9. N Neptune 10. P Pluto 11. O Moon 12. C Comet 13. * Star 14. X Ascending mode 15. Y Descending mode 16. K Conjunction 17. Q Quadrature 18. T Opposition 19. 0 Aries 20. 1 Taurus 21. 2 Gemini 22. 3 Cancer 23. 4 Leo 24. 5 Virgo 25. 6 Libra 26. 7 Scorpius 27. 8 Sagittarius 28. 9 Capricornus 29. A Aquarius 30. B Pisces 12.11 MARKERS Case character: O= Plotting symbols 0 Vertical cross 1 Diagonal cross 2 Diamond 3 Square 4 Fancy diamond 5 Fancy square 6 Fancy vertical cross 7 Fancy diagonal cross 8 Star burst 9 Octagon 12.12 DRAWING Case character: D= Drawing characters U Underscore O Overscore 12.13 MOVEMENT This moves the current position by the specified amount. This is useful for overstriking 2 characters to create a new character. Case character: U=Horizontal movement 0 1 space back 1 Half space 2 Half space back 3 Third space 4 Third space back 5 Sixth space 6 Sixth space back V=Vertical movement 1 Half up 2 Half down 3 Third up 4 Third down 5 Sixth up 6 Sixth down 12.14 SUBSCRIPT Case character: X=Subscript control 0 Enter subscript 1 Leave subscript 2 Enter superscript 3 Leave superscript 12.15 CHARACTER_SIZE Case character: Y= Character size control 0 Increase by One-half 1 Decrease by One-half 12.16 POSITION Case character: Z=Position control 0 Save current state in area 1 1 Restore state in area 1 2 Save current state in area 2 3 Restore state in area 2 4 Save current state in area 3 5 Restore state in area 3 6 Save current state in area 4 7 Restore state in area 4 12.17 EXAMPLES To draw the letter A with a bar over it. You first draw an "A" then move back 1 space, then draw an Overscore. TITLE "A0O" CASE " UD" To draw a lowercase greek Lambda with a "hat or circumflex" over it. TITLE "L012" CASE "GUV V" 12.18 SETTING_FONTS The fonts are selected in 2 different ways for plot symbols and titles. For plot symbols you use a 2 character identifier for the symbol. For example 0O selects the cross as a plot symbol. See commands: 1. SET SYMBOL 2. PLOT 3. SET ORDER For titles the special symbols are selected with the CASE command. The case command specifies a string with a font selection character for each character in the title. For example you wish to write in Greek Alpha,Beta,Gamma followed by ABC. TD:TITLE "ABGABC" TD:CASE "GGG "

CHAPTER 13 3-DIMENSIONAL_PLOTS

TOPDRAWER will do a variety of 3-d plots. You can plot a series of separate graphs superimposed on a third axis, or you can enter an array of data to be plotted with hidden line removal. The array of data is entered by the READ MESH command. The mesh is then plotted by the HISTOGRAM ,JOIN or PLOT commands. 1. HISTOGRAM BLOCK produces a block or "Lego" plot of mesh data. 2. JOIN produces a mesh surface. 3. SET THREE OFF;PLOT produces a scatter plot of mesh data. 4. CONTOUR produces a contour plot. Axes are not automatically added to 3-d graphs so you must use the command PLOT AXES. You may turn each axis on separately using the SET AXIS command and then PLOT AXES X,Y,Z to place each axis in a convenient location. The command SET THREE is used to specify the "viewpoint" of a 3-d plot. SET SCALE is also used to specify the range and type of scale to use along each of the X,Y,Z axes. 3-d plots may also be built from a series of 2-d plots. To do this you must provide z values and: TD:SET THREE ON Then either JOIN, HISTOGRAM or PLOT is used to plot the data. Normally Z is the dependent variable, and X,Y are the independent variables. If this rule is violated, 3-d histograms will not be correctly plotted. Your data may be moved with the SWAP command if you need to get it into the correct variables. 13.1 AXES_EXAMPLE Assume you are plotting a mesh. The axes will normally appear behind the plot which may be hard to read. You can move the axes to the front for X,Y and to the left or right for Z with the following commands. TD:SET AXES ALL ON FRONT TD:PLOT AXES HIDE TD:TITLE X CENTER "X title" TD:TITLE Y CENTER "Y title" TD:TITLE Z CENTER "Z title"

CHAPTER 14 HISTOGRAMS

TOPDRAWER can read files written by other histogram packages, and then plot them. Support is provided for the HBOOK histogram package. For more information see: SET HISTOGRAM

CHAPTER 15 COMMANDS

15.1 FORMAT_OF_COMMANDS Normally 1 command is placed on a single line. If you wish to put more than 1 command per line, they must be separated by a semicolon ";" You may continue a command on the next line by putting a minus sign "-" at the end of the current line. TD:SHOW DATA - _TD:STAT=OFF (continuation example) Optional syntax in a command is shown enclosed in square brackets "[]". Required syntax may be enclosed in braces {}. If options are mutually exclusive they are separated by vertical bars "|" Options within a command may appear in any order. Parameters must follow the option they modify. Options in a command may be separated by tabs spaces * , or =. For example SIZE=5 is the same as SIZE 5 or SIZE=5 or ,SIZE 5. Commands and options may be abbreviated to the shortest number of unique characters or a minimum of 2 characters. For example the command BARGRAPH may be abbreviated to BARGR, BAR or even BA. SET FILE INPUT may be abbreviated to SE FI IN. All commands may be abbreviated to 3 characters. The minimum abbreviation for each option is underlined. Commands are read from left to right. If conflicting options are given for the same command, the right most option is used. For example SET AXES ON OFF turns the axes off. Many commands have synonyms. For example AXES or AXIS, STOP or END, NEW FRAME or NEW PLOT or just NEW. Comments may be added to a command by enclosing them in parentheses "()". If the line begins with a double slash, "//" the rest of the line is a comment. 15.2 QUESTION_MARK The question mark may be used after a command to get immediate help on the options. TOPDRAWER will list the various options and what is expected after each option. If the option expects more key words, they are not listed. 15.3 LIST_OF_COMMANDS 3-d plot info. is in parentheses () 1. ADD - Adds together 2 data sets 2. ARROW - Draws an arrow. 3. BARGRAPH - Produces a bar graph. 4. BIN - This transforms the data to a frequency distribution (histogram). This may also be used to add data sets together. 5. BOX - Draws a box. 6. CIRCLE - Draws a circle or ELLIPSE. 7. CLEAR - Clears the screen the next plot will use same parameters (WARNING: usually you want command NEW) 8. CONTOUR - Draws a contour plot of MESH data. 9. CONVOLUTE - Calculates the convolution of 2 data sets. 10. CREATE MESH - Creates mesh data. 11. DATA SET - Starts a new data set. 12. DELETE - Deletes data points. 13. DEFINE COMMAND/KEY - Defines commands or keys on your keypad. 14. DEFINE HISTOGRAM - Defines histograms (HBOOK ) 15. DIAMOND - Draws a diamond. 16. DIVIDE - Divides 2 data sets (histograms) 17. NDU/NDV/NDW/NDX/NDY/NDZ - Enters a sequence of NDU,NDY... or NDZ data values. These are the negative errors on U,... or Z. 18. DU/DV/DW/DX/DY/DZ - Enters a sequence of DX,DY, or DZ data values. These are the errors on U... or Z. 19. ELLIPSE - Draws a circle or ELLIPSE. 20. ENDREPEAT - Ends a repeat loop. 21. ENDFILE - Ends a file. 22. FFT - Calculates a "fast" fourier transform of a data set. 23. FIT - Fits functions to the data and/or generates a curve. 24. FLUSH - Flush out all remaining data. 25. HISTOGRAM - Draws a histogram or ("Block") plot. 26. HELP - Get help on TOPDRAWER. 27. IF/ELSE/ENDIF - Tests status 28. JOIN - Joins the data points with a line or (Mesh) plot. 29. LIST - List the current data points. 30. LIST HISTOGRAM - List histograms (HBOOK ) 31. MERGE - Merges the contents of data sets. 32. MULTIPLY - Multiplies 2 data sets (histograms) 33. NEW FRAME - Starts a completely new plot. 34. NDX/NDY/NDZ - Enters a set of NDX... data values. These are negative error values. 35. PAUSE - The program pauses. 36. PLOT - Plots data as points or symbols (Scatter plot). * OUTLINE - Plots an outline around the plot. * AXES - Plots axes (Ticks and labels). * TABLE - Plots a table (list of numbers). 37. READ - Reads in data points. 38. REPEAT - Repeats a series of commands. 39. RESTORE - Restores things A. DATA - Restores data sets from a file. B. HISTOGRAM - Restores a set of histograms (HBOOK ) C. FIT - Restores a fit. 40. SAVE - Saves things See:RESTORE 41. SHOW - Shows current options as set by the SET command. 42. SMOOTH - The data is smoothed. 43. SORT - Sorts the contents of a data set. 44. SPAWN - Spawns out of TOPDRAWER. 45. SPLINE - Produce a spline fit to the data. 46. STOP - Stops TOPDRAWER. 47. SUBTRACT - Subtracts 2 data sets. 48. SWAP - Swaps data for 2 axes. 49. SYMBOL - Enters symbols for existing data. 50. TITLE - Puts a title on the plot. 51. TRANSFORM - Transform data from one coordinate frame to another (CARTESIAN,POLAR,SPHERICAL) 52. TYPE - Types a line on your terminal. 53. CASE - Controls the format of the title. 54. MORE - Adds more text under the current title. 55. SET - Sets options for plots (defaults). 56. U/V/W/X/Y/Z - Enters a sequence of U,V,.... or Z values. U,V,W are auxiliary coordinates while X,Y,Z are the coordinates used in plotting. 15.4 OPTIONS There are a number of options that are common to many commands. These select either the data to use, or the plot attributes. Commands that modify data have some common output options. Data selection POINTS|COLUMNS=[FROM] n1 [TO] [n2] Selects the data points or columns of a mesh by number LINES|ROWS=[FROM] n1 [TO] [n2] Selects the lines of a mesh SETS=[FROM] n1 [TO] [n2] Selects the data sets by number SELECT="name" Selects the data sets by name LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] Selects the data by specifying a range or value for each point SLICES [X|Y|Z] [FROM] v1 [[TO] v2] Selects the data by specifying a range and selects the axis to view a mesh. [TITLE[=ON|OFF]] Uses the name of the current histogram to put a title on the plot. Plot limits EXPAND[=ON|OFF] Plot attributes CYCLE[=ON|OFF] Each data set is plotted with a different intensity, color ... INTENSITY|WIDTH=n Selects the line width for the plotted data WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN Selects the color for the plotted data SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE Selects the texture of the lines for plotted data. HIDE[=ON|OFF] Hides the current data if behind a previous hidden set. FILL[=ON|OFF] Fills the data with a pattern. Output selection. APPEND[=ON|OFF] The resulting "new" data set is appended to the current sets rather than replacing it. NAME="name" Specifies the name of the "new" data set. Miscellaneous LOG[=ON|OFF] 15.4.1 APPEND For commands that transform data either the specified data sets are replaced by the new data set, or all data sets are replaced by the new data. If you wish to retain the old data the option APPEND creates a new data set with the transformed data. (Default:OFF) See:Command SET MODE 15.4.2 CYCLE When plotting more than 1 slice or data set, CYCLE causes the line texture, color, and width to vary from one plot to the next. The order of cycling is set by the SET CYCLE command. If you have specified either texture, color or width it overrides the cycle value. (Default:OFF) 15.4.3 EXPAND Sets the limits so that the selected data expands to fill the window. This has no effect unless LIMITED, POINTS, SETS, or SLICES are specified. Normally the limits of the plot are set according to all data. This may inconvenient when the plotted subset of the data occupies only a small portion of the window. EXPAND will make the data fill the window. (Default:OFF) 15.4.4 FILL Generates a fill pattern. To set the fill pattern see:SET FILL. (Default:OFF) See:Command SET MODE 15.4.5 HIDE Controls whether hidden lines are drawn for a 3-d mesh, or whether one plot hides the next. You must specify HIDE for both the plot to be hidden and the plot that is to hide it. The plot which is drawn first will hide the second one. HIDE=OFF draws the hidden lines, while HIDE=ON omits them. (Default:HIDE=ON for mesh, HIDE=OFF for data) example Assume you have 2 data sets where you want set 1 to hide elements in set 2. Also you would like to fill data set 2. TD:JOIN SET=1 HIDE TD:JOINS SET=2 HIDE FILL You can produce a drawing of a mesh with hidden lines as dotted lines by doing the histogram twice: TD:HISTOGRAM TD:HISTOGRAM HIDE=OFF DOTTED 15.4.6 LOG This logs the operation by typing on your terminal a line telling you what was done. (Default:OFF) 15.4.7 NAME The new set will usually have a name consisting of a transformation name followed by the old set name. If you specify a new name it is applied to the new data set. If the name ends in "%" then the old name is appended to the new name. See option:APPEND 15.4.8 POINTS|COLUMNS This selects the points or the colums of a mesh to plot or modify. If not selected all points are used. If n2 is omitted it is assumed to be n1. You may specify the point number or the options FIRST,LAST. 15.4.9 SELECT SELECT="name" selects the data sets to plot or modify by name. You may use "wild" characters. "*" means any characters, while "%" means any single character. Normally the match is case blind unless you: TD:SET EXACT 15.4.10 SETS This selects the data sets to plot or modify. If n2 is omitted it is assumed to be n1. You may specify the data set number or the options FIRST,LAST. 15.4.11 SOLID... This determines the texture of the line. By stringing together several texture commands you may create very complicated textures. For example DOT SPACE DOT DASH will produce a dot-dot-dast pattern with a large space between the dots. 1. SOLID produces a totally solid line. This overrides all previous specifications. 2. DOT produces a dot 3. DASH produces a short dash 4. DAASH produces a long dash 5. SPACE produces extra space between previous elements 6. FUNNY produces random distances between elements 7. PATTERNED makes the pattern according to the current SET pattern if it is specified by itself. If specified with other options it produces the patterns by generating a pattern. The length of the elements is determined by the size in the SET PATTERN command. 8. Some combinations will produce the patterns by hardware when available. This makes for quick, but not necessarily nice plots. The following generally use hardware: A. DOT B. DASH C. DOT DASH D. DAASH See:Command SET TEXTURE 15.4.12 SLICES [SLICES [X|Y|Z] [FROM] v1 [[TO] v2]] [CYCLE[=ON|OFF]] or... [SLICE X|Y|Z=v1] [CYCLE[=ON|OFF]] This plots or joins points sliced from mesh data. This command is illegal for normal data. If v2 is omitted then v2=v1. If a range is selected then all slices within the range are histogrammed. IF you set THREE=OFF then the slices are histogrammed according to the first X,Y,Z Mentioned. If X is first then the slices are taken perpendicular to the X axis. You only need select X|Y|Z the first time you slice after a NEW FRAME command. 15.5 TITLE This takes the name of the data set you are plotting and uses it to write a title on the plot. The name is divided into 4 parts separated by semicolons ";". The 4 parts are placed at the TOP,X,Y,Z locations of the plot. If the default title color, width are none then the title is plotted with the same color, width as the the data set. This can be very helpful when overlaying several data sets, as the titles correspond to the data set. 15.6 WHITE... This sets the color of the plot. See:Command SET COLOR 15.7 ADD See: SUBTRACT 15.8 SUBTRACT {ADD|SUBTRACT} [Y|Z] [FROM|TO] [EWEIGHT=n] [WEIGHT=n] {n1|"name1"} [BY] {n2|"name2"|FIT} [AVERAGE|EFFICIENCY[=ON|OFF]] [APPEND[=ON|OFF]] [NAME="name"] [CHECK[=ON|OFF]] [ERROR[=ON|OFF]] [POINTS| COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [LOG[=ON|OFF]] [VECTOR[=ON|OFF]] This adds or subtracts the (Y/Z) values in data set n2 (from,to) data set n1. The result is a modified set n1. 15.8.1 APPEND If APPEND is specified, then a new data set is created, containing the result and n1 is unchanged. 15.8.2 AVERAGE This option will not work for the SUBTRACT command. If AVERAGE is specified, the data is averaged together according to the Y statistics. If Y is non zero but DY is 0 then DY is assumed to be 1. If both Y1 and DY1 are zero then Y3,DY3 = Y2,DY2. Y3=(Y1/DY1**2+Y2/DY2**2)/(1/DY1**2+1/DY2**2) DY3=SQRT(2*DY1**2*DY2**2/(DY1**2+DY2**2)) If you wish to average several data sets with statistics, this should give you the correct result. Zero data with zero statistics indicates the absence of data. If you wish to average several data sets without statistics then you should always set the statistics to a "reasonable" value. 15.8.3 CHECK CHECK=OFF turns off data set checking. When CHECK=ON both data sets must have identical X (and Y if mesh) values, but data set n2 may contain more points than n1. If (DX/DY) is non zero then the both DX and X must be identical within 1% of DX. If you have data sets with non identical values of X you may create a set with identical values using the BIN command. you may also add together data sets with the BIN command. If the X values of 2 data sets are not quite identical. You may force TOPDRAWER to add them by setting DX for the data 100 times greater than the difference in X or by setting CHECK=OFF. 15.8.4 ERROR ERROR=OFF excludes the errors from the FIT in the computation. (Default:ERROR=ON) 15.8.5 FIT Specifies that the last FIT is to be added or subtracted from the data set. See:Command FIT. 15.8.6 LIMITED You may specify the limits over which the histograms are to be added. If you specify the Y or Z limits, then all data that contains values inside these limits will be added. For example if you ADD 1 to 2 LIMITED FROM Y=10 to Y=11 But data set 1 contains the followind data: 1,0; 2,10; 3,0; 4,11; 5,0 Points 2 to 4 inclusive will be added, and only points 1 and 5 will be omitted. 15.8.7 LOG If LOG is specified then the result of the command is typed on your terminal. 15.8.8 VECTOR The DX,DY,DZ's will be added together assuming they are a vector. The X,Y,Z are not changed, and they should match for both input data sets. If POLAR or SPHERICAL are ON the coordinates are handled correctly. 15.8.9 WEIGHT-EWEIGHT WEIGHT=n specifies a weighting factor to multiply the data by before adding or subtracting it. EWEIGHT=n specifies the error on WEIGHT. This option must precede the data set number. 15.8.10 X|Y Selects which coordinate of regular data is to be added. Mesh data always adds the dependent coordinate which is usually z. (Default:Y) 15.8.11 Notes For mesh data the independent coordinate must be Z. For 2-d data the independent coordinate is always Y. If you add normal data to mesh data each normal Y value is added to the corresponding mesh Z value. You may not add mesh data to normal 2-d data. If EFFICIENCY is not specified then the new value is Y3=Y1(+-)Y2. The errors (DY) are treated as if the data sets are uncorrelated DY3=SQRT(DY1**2+DY2**2). The ADD command with CHECK=OFF allows you to combine X,Y,Z... data TD:SWAP X Y SET=1 from 1 data set with mismatched data from another set. For example you wish to plot Y of set 1 vs Y of set 2. TD:SWAP X Y SET=1 TD:ADD 1,1 APPEND (Produces set 3=set 1) TD:Y=0 SET=LAST (Set 3 has only X) TD:ADD 2,3 CHECK=OFF (Set 3 has Y(1),Y(2)) Set 3 now has X=Y(set 1) and Y=Y(set 2) 15.8.12 Example TD:ADD 1 TO 2 or... TD:ADD 2 1 or... TD:ADD TO 2 1 Data set 1 is added to data set 2. Data set 1 is unchanged. TD:ADD 1 TO 2 APPEND Data set 1 and 2 are added. The result in put into a new data set. Both sets 1 and 2 are unchanged. TD:SUBTRACT 1 FROM 2 Data set 1 is subtracted from data set 2. Data set 1 is unchanged. See:Command DIVIDE,MULTIPLY 15.9 ARROW Draws an arrow from 1 point to another. ARROW [FROM] [x,y[,z]|CURSOR] [DATA] [LESS=n] TO[x,y[,z]|CURSOR] [DATA] [LESS=n] [SIZE=n] [FLARE|FLAIR=n] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [FILL[=ON|OFF]] [HIDE[=ON|OFF]] 15.9.1 Options 1. x,y,z - specify the location of the ends of the arrow. If z is specified the end point is assumed to be specified in data coordinates. If CURSOR is specified you may enter the end point with the cross hair cursor. The cursor appears on the screen. Just move it to the end point and press the space bar. If you press any other key, the end point is not entered. 2. DATA - specifies X,Y are in data coordinate frame. Normally they are in the TEXT coordinate frame. 3. LESS - Shortens the arrow by n so it does not touch x,y. 4. SIZE - length of arrow head in tenths of an inch. 5. FLARE - is ratio of the base to the height of the arrow head (fatness). 6. INTENSITY... - Selects the intensity of the arrow. 7. WHITE... - Selects the color of the arrow 8. SOLID... - Selects the texture of the body of the arrow. See:Command SET TEXTURE. 9. FILL - Fills in the arrow head 15.9.2 Example TD:ARROW From 1,1 TO DATA 25,100 LESS 0.1 Draws an arrow from 1,1 in the text frame to data location 25,100. The arrow is shortened by 0.1 inches so it does not touch the data. 15.10 BARGRAPH Produces a simple bar graph. Bars are centered on the x values with heights given by Y. Half widths are determined by DX and DY is not used. BARGRAPH [EXPAND] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS=[FROM] n1 [TO] [n2]] [SLICES [X|Y|Z] [FROM] v1 [[TO] v2]] [CYCLE[=ON|OFF]] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] 3-d options [X] [Y] [Z] [BLOCK|LEGO] [HIDE[=ON|OFF]] [FRAME[=ON|OFF]] [DEPTH[=ON| OFF]] [XY|YZ|ZX] [CROSS|RANDOM] If the points are not specified all data points are used. The line texture is determined by the options specified or by the default. See:Command HISTOGRAM for more information. 15.11 BIN BIN|FREQUENCY [MESH] [ERROR[=ON|OFF]] [[X|Y] [FROM=n] [TO=n] [BY|WIDTH|STEP=n] [BINS|N=n]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS=[FROM] n1 [TO] [n2]] [APPEND[=ON|OFF]] [NAME="name"] [AVERAGE[=ON|OFF]] [VALUES] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [NORMAL[=ON|OFF]] [LOG[=ON|OFF]] [MONITOR[=ON|OFF]] This transforms data to a frequency distribution (histogram) with equally spaced X/Y values. 15.11.1 Introduction For each X entered, the corresponding Y is added/averaged to a bin in the histogram. If all selected Y and DYs are zero Y and DY are assumed to be 1.0. When averaging any data with zero DY is ignored. The result is an evenly spaced series of X values with the corresponding distribution in Y and the standard deviation of each Y in DY/NDY. The symbol for each bin is set to the default. You may find that the resulting data is not in the correct storage locations especially if a 3-d plot is to be produced. You may change locations with the SWAP command. If the data has a non zero DX then it may be distributed over more than 1 bin. The DX error distribution is assumed to be gaussian, and the data is distributed with a cut off at 4 sigma. If NORMAL=OFF a flat distribution is assumed. You may not BIN mesh data. If you need to rebin mesh data then it should be decomposed to a series of data sets using the PROJECT BY n command. 15.11.2 Options 1. MESH - Bins data into a MESH 2. ERRORS - Bins data into a MESH with errors if MESH is selected. 3. X,Y - Select the axes to specify bins. 4. BINS|N - The number of bins in the histogram. 5. VALUES - You are specifying the bin values rather than the bin edge. 6. FROM - Sets the lowest bin value (low edge) 7. TO - Sets the highest bin value. 8. BY - Sets the bin width. 9. NORMAL - Selects either a normal (Gaussian) distribution or a flat (histogram) distribution. 10. NAME - Selects the name of the appended data set 11. POINTS - Specifies the range of points within a data set to use. 12. SETS - Specifies the range of data sets to use. 13. APPEND - The new data is appended to the current data as a new set rather than replacing it. 14. AVERAGE - Produces a weighted average of the data 15. LIMITED - Selects the range of data to bin. 16. LOG - Types the result of the command 17. MONITOR - Plots the result. 15.11.3 AVERAGE A weighted average is produced of the data. The data is weighted by 1/DY**2 if DY is non zero. Otherwise a weight of 1 is used. The result is X,Y,DY. If the original DYs are all zero (or 1) then the final DY is 1/SQRT(points). Where points is the number of points averaged to form a bin. 15.11.4 APPEND If APPEND=ON the resulting data sets are appended to the current data sets. If OFF then the current data is replaced by the new binned data. 15.11.5 ERRORS If this option and MESH are selected, then the mesh will have errors on its data. 15.11.6 FROM... [[X|Y] [FROM=n] [TO=n] [BY|WIDTH|STEP=n] [BINS|N=n]] Specifies the range of the histogram. If FROM,TO and NBINS are specified BY may not be specified. FROM is the lowes bin edge. TO is the highest bin edge. BY is the bin width, And N is the number of bins. If VALUES is specified then the FROM and TO are the center of the first bin and the center of the last bin. If these are omitted then the data is scanned and the bins are arranged according to the current scale values. (See:SET SCALE) If the data to bin is arranged as a set of matching histograms, the final data set will have the same x values as the initial. A histogram has equally spaced x values with identical DX. Data sets match if the initial X and DX values are the same. The following are equivalent commands: TD:BIN FROM 0 TO 10 BY 1 TD:BIN FROM 0 TO 10 N=10 TD:BIN FROM 0 BY 1 N=10 TD:BIN VALUES FROM .5 TO 9.5 BY 1 15.11.7 LIMITED Specifies which data are to be binned. If limits are not specified, the default is the current plot limits. See:Command SET LIMITS. 1. X - Specifies X limit 2. Y - Specifies Y limit 3. Z - Specifies the Z limit 4. CURSOR - Brings up the cursor. You move it to the X,Y value you wish then press the space bar to enter both X,Y or X to enter X or Y to enter Y. 5. RECURSOR - The cursor enters both limits. Example TD:BIN LIMITED FROM X=1 to X=5 Sets limits on the range of X data to bin. TD:BIN LIMITED FROM 1,5.5 TO 5,50.8 Sets limits on the range of X,Y to bin. This does not set the range of the final data sets. 15.11.8 MESH Bins data into a mesh of Z vs X,Y. The Z values are added or averaged together. If Z does not exist you are given an error message. APPEND is ignored for a MESH. example TD:BIN MESH X FROM 1 to 10 by 1 Y FROM 10 to 100 by 10 15.11.9 MONITOR If selected it histograms the result. See: SET MODE MONITOR 15.11.10 NORMAL NORMAL=ON selects a normal distribution with a cutoff at 4 sigma for the error DX. NORMAL=OFF selects a flat distribution from -DX to +DX. This is probably preferable for rebinning another histogram. (Default:NORMAL=ON) 15.11.11 X... This specifies which axes to bin. X is always binned. If Y is specified then both X and Y are binned. After X or Y you should specify the FROM,TO,BY options if you wish to bin into a specific range, or step size. If you specify Y without MESH then a set of data sets are produced, each for a different Y. 15.11.12 VALUES Normally FROM,TO specify the edges of the minimum, maximum bins. When VALUES=ON then they specify the center of the bins. 15.11.13 Histograms You may add together 2 histograms or average together 2 histograms with different bin widths. You should specify the correct DX and DY for each data set you wish to add. You probably also wish to use NORMAL=OFF If you do not specify FROM, TO ... a set of values is assumed. First if you are binning 2 histograms with equally spaced equivalent values, then the same X values are assumed. Otherwise the current X tick spacing is used. 15.11.14 Example Say you wish to find the frequency distribution of a set of student grades in 5 point steps. The following will do the job: TD:SET ORDER X (Enter grades) TD:Grade1; Grade2; Grade3..... TD:Graden;....... TD:BIN BY 5 (now do the binning) TD:HISTOGRAM Suppose you wish to add together 2 HBOOK histograms. Each histogram contains counts, but the X spacing is different. TD:SET HIST HBOOK ID=n1 TD:SET HIST ID=n2 APPEND You now have both hists in memory. TD:BIN NORMAL=OFF You now have both histograms added together. If both histograms had the same X values/bin then the result will have the same X values as the original. 15.12 BOX Draws a box centered on the x,y with the sides parallel to the axes. BOX [AT|FROM|TO]{x,y[,z]|CURSOR} [DATA] [SIZE=dx[,dy]] [DSIZE=dx[,dy[,dz]]] [ROTATE=n] [SQUARE|SYMMETRIC[=ON|OFF]] [FILL[=ON|OFF]] [HIDE[=ON|OFF]] [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] 15.12.1 AT x,y,z specify the center of the box. If z is specified then they are assumed to be data units. Instead of x,y,z you may specify CURSOR. If x,y,z are specified without FROM,TO, then AT is assumed. 15.12.2 FROM-TO You may also specify the diagonally opposite corners of the box. If z is specified then they are assumed to be data units. Instead of x,y,z you may specify CURSOR. 15.12.3 FILL Fills in the box using the current fill pattern. See:SET FILL 15.12.4 CURSOR The cross hair cursor is used to specify the limits or center of the box. First move the cursor to a corner of the box. Press the space bar. Next move the cursor the diagonally opposite corner and press space again to draw the box. If you decide not to draw the box, press any other key other than space or "Return". 15.12.5 DATA Specifies X,Y are in data coordinate frame. Normally they are in the TEXT coordinate frame. This option is not necessary if z or DSIZE are specified. 15.12.6 DSIZE Specifies the size in data units. If the size is in data units the x,y are assumed to be data units also. 15.12.7 ROTATE Specifies a rotation angle in degrees. Rotation is right handed or counterclockwise. 15.12.8 SIZE Specifies the size in inches DX is the width of the box. If omitted the width is the default see:Command SET BOX SIZE. DY is the height of the box. If omitted DY=DX. 15.12.9 SQUARE The option SQUARE or SYMMETRIC produces a square box. The SIZE is treated as a diagonal through the center of a square, and FROM, TO are treated as the coordinates of 2 opposite sides of a square. 15.12.10 SOLID... Sets the texture of the line. See:Command SET TEXTURE. 15.12.11 INTENSITY Sets the intensity (n=1-5) 15.12.12 WHITE... Sets the color of the line. 15.12.13 Example TD:BOX AT 6.5,5 size=6.5,5 or... TD:BOX 6.5,5 size 6.5,5 or... TD:BOX FROM 3.25,2.5 TO 9.75,7.5 or... TD:BOX FROM 3.25,2.5 size=6.5,5 Draws a centered box half the size of the screen assuming the default size of 13x10. TD:Set limits X -100,100 Y -100,100 TD:BOX 0,0 DATA size 1 Draws a box centered on the data 1 inch square TD:Set limits X -100,100 Y -100,100 TD:BOX 50,50 Dsize 100,100 Draws a box around the upper right quadrant of the data. TD:BOX AT CURSOR TO CURSOR Draws a box centered at the first cursor position with a corner at the second cursor. TD:BOX FROM CURSOR SIZE=2 Draws a box with the lower left corner at the cursor position 2 inches square. 15.13 CASE See:Command TITLE 15.14 CIRCLE Draws a circle or ellipse. See:Command ELLIPSE. 15.15 CONTOUR Draws a contour plot from mesh data. CONTOUR [n1,n2,n3.....] Contour selection [FROM n TO n BY n N n] [PRIMARY|SECONDARY] [LABEL[=ON|OFF]] Data selection [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [SELECT="name"] Label selection [INSIDE[=ON|OFF]] [OUTSIDE[=ON|OFF]] [PEPPENDICULAR[=ON|OFF]] [PARALLEL[=ON|OFF]] [DOUBLE[=ON|OFF]] Attributes [EXPAND[=ON|OFF]] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [CYCLE[=ON|OFF]] Misc [TITLE[=ON|OFF]] [SAVE[=ON|OFF]] [NAME='name'] 15.15.1 N1... Contour lines are drawn for the specified values n1,n2... If no values are specified, then lines are drawn according to the tick locations selected by the SET SCALE command. Primary contour lines are determined by the long tick locations, and the secondary lines by the short ticks. If the scale of the Z axis is set to be logarithmic, then the primary lines are at powers of 10. 15.15.2 COLOR Sets the color of primary contour lines. 15.15.3 CYCLE CYCLE causes the line texture, color, and width attributes to vary from one set of secondary contour lines to the next. The order of cycling is set by the SET CYCLE command. The attributes specified by the SET SECONDARY command override those specified by the SET CYCLE command. Primary contour lines also vary according to cycles. If you specify any attributes they are used for the primary contours, and override the the cycles. 15.15.4 EXPAND Sets the limits so that the selected data expands to fill the window. This has no effect unless POINTS, or SETS are specified or the limits on MESH data have been set by a SET LIMITS command. See:SET MODE 15.15.5 FROM|TO|BY|N You may also specify a range of contours with FROM,TO,BY,N. You may specify any 3. The maximum number of contours you may specify at once is 100. example TD:CONTOUR FROM 1 TO 10 BY 2 or... TD:CONTOUR FROM 1 BY 2 N=5 or.. TD:CONTOUR 1,3,5,7,9 Draws contour lines at 1,3,5,7, and 9. 15.15.6 INTENSITY Sets the line width or intensity of primary contour lines. 15.15.7 LABEL If LABEL=ON is specified then any contours after the LABEL option will be labelled. If no contours are specified LABEL=OFF produces the default contours without any labels. 15.15.8 OUTSIDE This turns on labels along the outside boundary of the contour plot for all contours that terminate at the boundary. (Default) 15.15.9 INSIDE This turns on labels in the interior of the contour plot for all contours. (Default) 15.15.10 DOUBLE This turns on double labels on the outside boundary of the contour plot for all contours that terminate at the boundary. This labels both ends of each terminal contour. (Default:DOUBLE=OFF) 15.15.11 PARALLEL Produces label which are parallel to inside contour lines. Normally labels are horizontal parallel to the X axis. (Default:PARALLEL=OFF) 15.15.12 PERPENDICULAR Produces label which are perpendicular to inside contour lines. Normally labels are horizontal parallel to the X axis. (Default:PERPENDICULAR=OFF) 15.15.13 PRIMARY|SECONDARY Sets the type of contour line. Primary lines use the default or selected color, intensity, and texture. The secondary contour lines are determined by the SET SECONDARY command. The default for secondary lines is DOTTED. 15.15.14 SAVE This saves the contour as a series of data sets rather than plotting it. The new data sets have the name 'Contour ...' where ... is the old data set name. You may select the new data set with the NAME='...' option. 15.15.15 SIZE SIZE=n determines the size of the contour labels in tenths of inches. If unspecified the size is determined by the SET LABEL command. The color, and intensity of the contour labels is also determined by the SET LABEL command. 15.15.16 SOLID... Sets the texture of primary contour lines. 15.15.17 Example TD:CONTOUR Draws a series of contour lines according to the Z scale. TD:CONTOUR SECONDARY 1,2,3,4,6,7,8,9,PRIMARY,20,LABEL,5,10 or... TD:CONTOUR SECONDARY FROM 1 TO 9 BY 1 PRIMARY,20,LABEL,5,10 Draws contours for Z=1 to 20. Contour 5 and 10 are labeled. Contours 5,10, and 20 will be SOLID, all others are dotted. TD:CONTOUR SAVE 10 Saves the contours for Z=10 as separate data sets. No plot is produced. 15.16 CONVOLUTE CONVOLUTE BY={nset|"name"} [APPEND[=ON|OFF]] [NAME="name"] [CHECK[=ON| OFF]] [ERROR[=ON|OFF]] [INVERT[=ON|OFF]] [LOG[=ON|OFF]] [MONITOR[=ON|OFF]] [NORMALIZE[=ON|OFF]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] Convolutes nset with the specified data sets. The specified data sets and nset must be histograms with the same spacing between points. If nset is a mesh, then the data sets must also be mesh data. You may convolute a mesh by a normal data set. NOTE: The inverse convolution of 2 mesh data sets may not be correct. This problem may be fixed in the next version. 15.16.1 Options 1. BY selects the data set to convolute by. You may specify either the name or the data set number. 2. CHECK=OFF Turns off the error checking. Normally the 2 data sets must have matching channel widths. And each data set must have equally spaced x values and y values if a mesh. (Default:ON) 3. ERROR=OFF Errors are not calculated for the result. (Default:ON) 4. INVERT=ON Convolutes by the inverted function. This is not an exact calculation. The resulting data may exhibit ripples, due to the inversion process. Inversion uses CERN library routine CFT. (Default:OFF) 5. NORMALIZE=ON Convolutes the data set with a normalized nset. (Default:OFF) 6. APPEND=ON Creates a new data set containing the entire result. The appended set is longer than the original set to contain the entire result. If you do not select APPEND some data might be lost. (Default:OFF) 7. MONITOR Histograms both the original data and the result in 2 windows. See:SET MONITOR 8. NAME selects the name for the new appended data set. 9. SELECT selects data sets to convolute by name. 10. LOG=ON Logs the operation on your terminal. (Default:OFF) 15.16.2 Errors The error is computed using DY during a convolution. The NDY if present is ignored in the computation, and it is set to DY when done. No error calculation is done for inverse convolutions. 15.17 CREATE CREATE MESH X|Y|Z [FROM n][TOn][BYn][N=n] [ERRORS] [APPEND[=ON|OFF]] [NAME="name"] Creates a mesh. You may fill the mesh using the Z= command. ERRORS creates a mesh with errors. Storage is allocated for DX,DY,DZ. example TD:CREATE MESH X FROM 1 TO 10 BY 1 Y FROM 10 TO 100 BY 10 TD:Z="V_XV+V_YV" creates some mesh data. 15.18 DATA DATA [SET] [NAME="name"] This starts a new data set. If the data is broken up into sets, you may specify which data set to plot. Also JOIN and HISTOGRAM will plot each set independently. The Data sets are numbered in order 1,2,3... When a data set is deleted the remaining data sets are renumbered. You may specify data sets either by number or name. You may intermix MESH and regular data sets. 15.18.1 Example To add a new data set to the existing data, and enter 5 values into it: TD:DATA SET name="New set" -1.5,-1;-1,1;0,2;1,1;-2,-1.5 15.19 DELETE DELETE [HISTOGRAMS|DATA] 15.19.1 DATA DELETE [ALL] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS=[FROM] n1 [TO] [n2]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [CONFIRM[=ON|OFF]] [LOG[=ON|OFF]] Deletes the specified data points. If all the points in a data set are deleted, the entire set is deleted. If an entire data set is deleted, all the following sets are renumbered. You must specify either ALL, POINTS, SETS or LIMITS. POINTS or SETS may be combined with LIMITS to select only certain points within a range. For mesh data LIMITED and POINTS are not legal options. 15.19.1.1 ALL - Deletes all data points 15.19.1.2 CONFIRM - If ON you are asked to confirm whether you wish each point deleted. If ON or OFF are omitted ON is assumed. You reply: * Y - Yes delete it. * N - No, do not delete it (Default). * Q - Quit and delete no more points. * A - All delete it and all other specified points, without asking any more. 15.19.1.3 LIMITED - Specifies deletion of data within specific limts on X,Y, and Z. If limits are not specified, the default is the current plot limits. See:Command SET LIMITS. 1. X - Specifies X limit 2. Y - Specifies Y limit 3. Z - Specifies the Z limit 4. CURSOR - Brings up the cursor. You move it to the X,Y value you wish then press the space bar to enter both X,Y or X to enter X or Y to enter Y. 5. RECURSOR - The cursor enters both limits. TD:DELETE LIMITED RECURSOR is the same as... TD:DELETE LIMITED FROM CURSOR TO CURSOR 6. VLOG - Draws a cross when you press the space bar, and draws a dotted line around the final limits. example TD:DELETE LIMITED FROM 1,1 to 2,5 is the same as TD:DELETE LIMITED FROM X=1 Y=1 TO X=2 Y=5 Deletes all points that with X between 1 and 2 and Y between 2 and 5 inclusive. TD:DELETE LIMITED FROM Y=1 TO Y=5 Deletes all data points with Y values between 1 and 5 inclusive. TD:DELETE LIMITED FROM CURSOR TO CURSOR Deletes all data points within a box defined by the cursor. TD:DELETE LIMITED FROM X=CURSOR TO X=CURSOR Deletes all data points within X values defined by the cursor. 15.19.1.4 LOG - LOG=ON Lists all points deleted. Note, that pressing Ctrl_C will abort the deletions. If you do not specify ON or OFF, ON is assumed. 15.19.1.5 POINTS - Specifies the range of points to delete. n1,n2= the data point number or LAST or FIRST. 15.19.1.6 SETS - Specifies the range of data sets to delete. n1,n2= the data set number or LAST or FIRST. 15.19.2 HISTOGRAMS DELETE HISTOGRAMA [ALL] [IDENT=[FROM] nmin [TO] [nmax]] [EXACT[=ON|OFF]] [SELECT|NAME='hist_name'] [AREA|DIRECTORY="dir/subdir..."] [TReE[=ON|OFF]] [ENTRIES[=ON|OFF]] [HISTOGRAM[=ON|OFF]] [MESH[=ON|OFF]] [ARRAY[=ON|OFF]] [NTUPLES[=ON|OFF]] [CONFIRM[=ON|OFF]] [LOG[=ON|OFF]] Deletes the specified histograms. You must specify either ALL, or a specific range of IDENTSs. You may select histograms to delete by NAME, type (ARRAY,HISTOGRAM,MESH,NTUPLES), or whether they have entries. In addition AREA, TREE allow selection of portions of the directory tree. See also commands: SHOW HISTOGRAM, SET HISTOGRAM 15.19.2.1 ALL - Deletes all histograms. 15.19.2.2 IDENT - Selects the range of IDs to delete. 15.19.2.3 CONFIRM - If ON you are asked to confirm whether you wish each point deleted. If ON or OFF are omitted ON is assumed. You reply: * Y - Yes delete it. * N - No, do not delete it (Default). * Q - Quit and delete no more points. * A - All delete it and all other specified points, without asking any more. 15.19.2.4 LOG - LOG=ON Lists all points deleted. Note, that pressing Ctrl_C will abort the deletions. If you do not specify ON or OFF, ON is assumed. 15.20 DEFINE This defines various things such as new commands, or the keys for a VT-100 keypad. 15.20.1 COMMAND DEFINE COMMAND new_command "command string" This defines a new command as the command string. New commands must be different from existing commands, and are only used if an existing command is not found. There is a limit of 3 command substitutions in a row, and 1000 total substitutions per input line. The limit on the number of substitutions per line may be modified by SET COMMAND. example DEFINE COMMAND EDT "SPAWN EDT" Defines the command EDT so you may edit a file while using TOPDRAWER. DEFINE COMMAND MAIL "SPAWN MAIL" Defines the command MAIL so you may use the mail utility while using TOPDRAWER. DEFINE COMMAND @ "SET FILE INPUT=" Defines @ to work similarly to @ in VMS. @filename will get commands from the specified file. DEFINE COMMAND EDAT "LIST DATA FILE=DAT.TMP;EDT DAT.TMP;DELETE ALL; SET FILE IN=DAT.TMP" Defines the command EDAT to allow you to edit the current data. 15.20.1.1 Initialization - You may also define commands before running TOPDRAWER. You make DCL symbols of the form: TD_C_new_command :==the_command When you type in new_command the_command is executed. For example the DCL definition: $ TD_C_DIR*ECTORY :=SPAWN DIRECTORY is the same as the TOPDRAWER command: TD:DEFINE COMMAND "DIR*ECTORY" "SPAWN DIR" 15.20.1.2 Examples - For example you wish to define some DCL commands such as DIRECTORY for convenience. TD:DEFINE COMMAND DIR "SPAWN DIR" or... TD:DEFINE COMMAND "DIR*ECTORY" "SPAWN DIR" These both define the command DIR. The second definition allows any abbreviation from DIR to DIRECTORY to be used. TD:DEFINE COMMAND SC "SHOW HIST CURRENT FULL" Defines the command SC to show you the full status of the current histogram. (See:Command SET HIST and SHOW HIST) TD:DEFINE COMMAND SD "SHOW DATA STATISTICS" Defines a command to show you the statistics of the data set. TD:DEFINE COMMAND SD1 "SHOW DATA STATISTICS SET=1" Defines a command to show you the statistics of the data set number 1. 15.20.2 HISTOGRAMS This creates HBOOK histograms or modifies the histograms. See:Command SET HISTOGRAM. You may add together histograms or add ntuples to histograms. The variables in NTUPLES may be added to several histograms all in one operation. DEFINE HISTOGRAMS {IDENT[=FROM n][TOn]| APPEND=n| CURRENT| NEXT| PREVIOUS| FIRST| LAST| ALL} [LOG[=ON|OFF]] Histogram selection [AREA|DIRECTORY="name"] [ENTRIES[=ON|OFF]] [HISTOGRAM[=ON|OFF]] [MESH[=ON|OFF]] [ARRAY[=ON|OFF]] [NTUPLES[=ON|OFF]] [SELECT|NAME="hist name"] [CONFIRM[=ON|OFF]] Histogram creation [[[X|Y][FROM n][TO n][BY n][BINS=n]]| [SETS=[FROM] n1 [TO] [n2]]] [CHECK[=ON|OFF]] [RANGE=n] [PROFILE[=ON|OFF]] Histogram modification [BINSZ[=ON|OFF]] [DEFNME='name'] [ERRORS[=ON|OFF]] [STATISTICS[=ON|OFF]] [ZERO] [SECTION]] Histogram Filling [[ADD|SUBTRACT|MULTIPLY|DIVIDE=n1[,n2]] [FACTOR=f1[,f2]] [CYCLE[=ON|OFF]]] Print options [DEFAULT[=ON|OFF]] [PRAUTOMATIC] [PRBIGBI=n] [PRBLACK] [PRCHANNELS[=ON|OFF]] [PRCONTENTS[=ON|OFF]] [PRERRORS[=ON|OFF]] [PRHISTOGRAM[=ON|OFF]] [PRINTEGRAL[=ON|OFF]] [PRLOGARITHMIC|PRLINEAR[=ON|OFF]] [PRLOW[=ON|OFF]] [PRMAXIMUM=n] [PRMINIMUM=n] [PRROTATE[=ON|OFF]] [PRSTAR] [PRSTATISTICS[=ON|OFF]] [PRSQUEEZE[=ON|OFF]] [PR1PAGE[=ON|OFF]] [PR2PAGE[=ON|OFF]] [PRPAGE=n] [TITLE="general_title"] 15.20.2.1 Options - Histogram selection 1. APPEND=n - Selects the IDENT as 1 more than the last one to last one+n. 2. CURRENT,NEXT,PREVIOUS,ALL,FIRST,LAST - Selects a histogram. 3. ENTRIES - Selects only histograms with entries 4. HISTOGRAMS - Selects only histograms 5. SELECT - The name of histograms to modify. 6. IDENT - Selects the histograms by number. 7. MESH - Selects only mesh histograms 8. NTUPL - Selects only ntuples 9. SECTION - Selects the Global Section (applies to ZERO only) Operations 10. ADD,SUBTRACT,MULTIPY,DIVIDE - Combines 2 histograms into a third. 11. CYCLE - Cycles through hists. Modifying parameters 12. DISK - Enables histogram storage on DISK, with n records. It is stored using unit 87. 13. DEFNAME - The new name to assign to histograms. 14. ERRORS - Enable/Disable error computations. This slows down histogram filling. 15. TITLE - Defines the title as the header to each hist printout. 16. PR... - Modifies the printed output from the LIST HISTOGRAM command. 17. BINSZ - YES sets bin size to be set to a "resonable value" when a histogram is defined. This is defined for all histograms. 18. STATISTICS - Enable/Disable "real time" statistics calculations. 19. ZERO - Clears or sets the histogram to zero Creation 20. X,Y FROM n TO... - Specifies the hist scale. 21. SETS - Specifies the data sets to put into the histograms. 22. RANGE - Selects the maximum range of the histogram (HBOOK) Miscellaneous 23. LOG - Types the results of the definition 15.20.2.2 APPEND - Selects the histogram ID after the last one for creating a histogram. If the option n is specified it is the number of histograms to create. Example DEFINE HIST X fROM 1 to 10 by 1 APPEND=5 Creates 5 histograms with net ID's of size 10. 15.20.2.3 ADD... - ADD,SUBTRACT,MULTIPLY,DIVIDE [IDENT=n1[,n2]] [FACTOR=f1[,f2] [CYCLE=[ON|OFF] Takes histograms IDENT=n1 and n2 and combines them into the previously specified histograms n3=nmin to nmax. The number of channels in n1,n2, and n3 must all be the same. n3=n2*f2 operation n1*f1 If n1 or n2 are omitted they are assumed to be n3. If f1 or is omitted it is assumed to be 1.0. If n2 is specified and n3 does not exist, it is created. CYCLE increments N1,N2 each time. This combines n1,n2 into nmin and n1+1,n2+1 into nmin+1 and so on. Only histograms of the same type with the same number of channels can be added. If n1 is an NTUPL then it is binned into n3=nmin to nmax using the parameters specified in previous SET HISTOGRAM commands. The possible options the may be set are X,DX,...,EVENTS,NLIMIT,NMASK. If the target histogram does not exist it is automatically created with 100 channels using the NTUPL name. If CYCLE is selected then the X specification is incremented. example TD:DEFINE HISTOGRAM IDENT=25 DIVIDE IDENT=1,2 FACTOR=.25,.75 HIST(25)=HIST(1)*0.25 / HIST(2)*0.75 TD:DEFINE HISTOGRAM IDENT=25 ADD IDENT=1,2 HIST(25)=HIST(1)+HIST(2) TD:DEFINE HISTOGRAM IDENT=25 ADD IDENT=1 FACTOR=0.5 HIST(25)=HIST(1)*0.5 TD:DEFINE HISTOGRAM IDENT 25 TO 30 ADD IDENT=1 CYCLE N-tupl value 1 is added to histogram 25 N-tupl value 2 is added to histogram 26 ... N-tupl value 6 is added to histogram 30 15.20.2.4 AREA|DIRECTORY - TD:DEFINE HISTOGRAM AREA=directory/subdir... For HBOOK4 this creates the specified directory, and sets it. If the specified area does not begin with "/" it is assumed to be a subdirectory of the current directory. If it begins with "/" it is assumed to be a subdirectory of the current root. example Assume you have no subdirectories. TD:DEFINE HIST AREA SUBA creates directory //PAWC/SUBA TD:DEFINE HIST AREA Q then creates directory //PAWC/SUBA/Q TD:DEFINE HIST AREA /SUBB/X/Y creates subdirectories: "//PAWC/SUBB" "//PAWC/SUBB/X" "//PAWC/SUBB/X/Y" 15.20.2.5 CHECK - Turns off bin checking for creating histograms from Topdrawer data sets. 15.20.2.6 CONFIRM - Each histogram that matches the specifications is logged, then you are asked whether you want to modify it. You reply: * YES - to modify it. * NO - do not modify it (Default). * QUIT - do not modify all the rest * ALL - Stop asking questions and Modify all the rest. If you omit ON or OFF then ON is assumed. (Default:CONFIRM=OFF) 15.20.2.7 IDENT... - You must specify the IDENT of the histogram to modify or create. 1. IDENT=FROM n TO n - where n is the ID to modify 2. APPEND - The last histogram ID+1 in the current area 3. CURRENT - The current histogram if any 4. NEXT - The current histogram ID +1 5. PREVIOUS - The current histogram ID -1 6. ALL - All histograms 15.20.2.8 LOG - Type on your terminal a log of the definition. 15.20.2.9 SELECT - The name of the histograms you wish to modify. 15.20.2.10 SETS - Creates histograms from TOPDRAWER data sets. It selects the range of data sets to use in creating some histograms. The MESH and SELECT options may be used to select the data set. This allows you to take Topdrawer data and put it into the HBOOK structures. The data used must be strictly monotonic in x. Mesh data must have equally spaced bins. If you wish to store Mesh data without equally spaced bins then specify CHECK=OFF to turn off the bin checking. The PROFILE option is ignored. If you specify SETS then you may not specify X or Y ranges or ZERO. EXAMPLE DEFINE HIST SETS 5 APPEND PR Puts data set number 5 into an HBOOK histogram. DEFINE HIST SETS APPEND Puts all data sets into HBOOK histograms. 15.20.2.11 DEFNAME - The name you wish to assign to a histogram. HBOOK histograms may only have a new name when they are zeroed. 15.20.2.12 DEFAULT - Resets all options to their default values. 15.20.2.13 HISTOGRAMS - Selects only histograms (not mesh) to modify. 15.20.2.14 MESH - Selects only MESH histograms to modify. 15.20.2.15 NTUPL - Selects only NTUPLES to modify. NTUPLE=OFF selects all histograms but NTUPLES. 15.20.2.16 PR... - These options modify the printed output for LIST HISTOGRAM. They either take a numeric parameter or ON/OFF. If ON or OFF are omitted ON is assumed. 1. MIN=n - Selects the minimum Y for print plot. 2. MAX=n - Selects the maximum Y for print plot. 3. BIGBI=n - Selects the number of columns per channel for histogram print. 4. AUTOMATIC 5. BLACK - Fills the area under the hist with "X" 6. STAR - Prints an asterisk for the histogram 7. ERROR - Puts on error bars 8. CONTENTS - Prints the histogram contents 9. INTEGRAL - Prints the integrated contents 10. HISTOGRAM - Prints the histogram shape 11. LINEAR - Prints on a linear scale in Y 12. LOGARITHIC - Prints on a log scale in Y 13. LOW - Prints the lower limits of the bins 14. MAXIMUM=n - Sets the maximum on the contents 15. MINIMUM=n - Sets the minimum on the contents 16. PAGE=n - Sets the number of lines/page (all histograms) 17. ROTATE - Rotates the hist 18. STATISTICS - Includes hist statistics in output 19. SQUEEZE - Squeezes pages together to save paper. (all histograms) 20. 1PAGE - hist takes only 1 page 21. 2PAGE - Spills hist over 2 pages 22. TABLE - Prints 2-d hists as a table 23. SCATTER - Prints 2-d hists as a scatter plot. 15.20.2.17 RANGE - Specifies the maximum range for a new histogram. See: HBOOK documentation. (Default:RANGE=0) example TD:DEFINE HIST ID=5 RANGE=500 FROM 10 TO 10 BY 0.1 15.20.2.18 STATISTICS - Turns on or off statistics accumulation. This applies to HBOOK. 15.20.2.19 X|Y... - If you specify X|Y FROM,TO and BY or N= then a new histogram is created, or an existing histogram is rescaled. When rescaled it is recreated, and the existing scales, and title are kept, if not respecified. If you specify this for both X and Y then a 3-d histrogram is created. If unspecified FROM/TO=0 and N=100. The option PROFILE creates a profile histogram using the specified X,Y limits. examples TD:DEFINE HIST ID=5 X FROM 10 TO 20 BY 0.5 DEFNAME='test' TD:DEFINE HIST ID=5 FROM 10 TO 20 BY 0.5 DEFNAME='test' TD:DEFINE HIST ID=5 FROM 10 TO 20 N=20 DEFNAME='test' all create a histogram with 20 bins from 10 to 20 in steps 0f 0.5 TD:DEFINE HIST NEXT X FROM 10 to 20 BY .5 Y FROM 1 TO 5 BY 1 DEFNAME='3-d test' Creates a 3-d histogram of size 5 by 20. TD:DEFINE HIST NEXT X N=50 Creates a histogram with 50 bins. TD:DEFINE HIST NEXT X Creates a histogram with 100 bins. TD:DEFINE HIST IDENT=2 X FROM 1 TO 100 Y FROM 0 TO 1.5 PROFILE Creates a profile histogram with 100 bins from 1 to 100 for Y values from 0 to 1.5. 15.20.2.20 ZERO - Sets the contents of the specified histogram to zero. If SECTION is specified then the histogram in a global section is zeroed. If DEFNAME is specified then a new name is assigned to the histogram. Note: To zero a histogram in a global section you must be the owner of the section, or before running the program that creates the section you must: $ SET PROT=G:RWE/DEFAULT 15.20.3 KEY DEFINE KEY keyname "key definition" options This defines a key on your keypad so you can abbreviate a command to a single keystroke. The syntax is similar to the VMS DEFINE/KEY command. Since the syntax is VMS the key definition must be enclosed in quotes (") and not in apostrophes ('). For more information See:DEFINE/KEY in the VAX/VMS DCL Dictionary. 15.20.3.1 Keyname - The PF2 key is already defined as the HELP key. The PF1 key is the gold key. Vt-100 keypad PF1,PF2,PF3,PF4 PERIOD,COMMA,MINUS,ENTER KP0,KP1...,KP9 Vt-2xx keys Upper row keys: F6,...F20 Named keys: E1 E2 E3 E4 E5 E6 Find Ins. Rem. Sel Prev. Nex. HELP,DO NOTE F1-F5 can not be redefined. F6-F14 are used for keypad editing and may not be redefined unless Ctrl_V is pressed. See HELP TERMINALS KEYS. 15.20.3.2 Options - In general the only options you will frequently use are: /TERMINATE, /NOECHO, and possibly /IF_STATE. 1. /[NO]TERMINATE - When the key is pressed the line is also terminated. (Default:/NOTERMINATE) 2. /[NO]ECHO - The command is [not] echoed. (Default:/ECHO) 3. /[NO]IF_STATE=gold - The definition is for this key prefaced by gold key (PF1). (Default:/NOIF_STATE) 4. /[NO]LOCK_STATE - The state is defined till NOLOCK. (Default:NOLOCK_STATE) 5. /[NO]SET_STATE=name (Default:/NOSET_STATE) 15.20.3.3 Example - The PF1 and PF2 keys are already defined: TD:DEFINE KEY PF1 " " /SET_STATE=gold TD:DEFINE KEY PF2 "HELP "/TERMINATE examples TD:DEFINE KEY PF3 "SET HIST PREV; NEW;HIST" /TERMINATE TD:DEFINE KEY PF4 "SET HIST NEXT; NEW;HIST" /TERMINATE This sets up 2 keys so that you can step through a list of histograms. TD:DEFINE KEY MINUS "SET HIST ID=" This sets up key to give the command. When the minus key on the keypad is pressed the command is entered, and you enter the number followed by the "RETURN" key. TD:DEFINE KEY KP7 "HISTOGRAM"/TERMINATE This sets up the 7 key on the keypad to histogram. TD:DEFINE KEY COMMA "SET FILE INPUT 'myfile'"/term This sets up the comma (,) key on the keypad to get commands from the file MYFILE.TOP. TD:DEFINE KEY PF4 "SET THREE ON"/term TD:DEFINE KEY PF4 "SET THREE OFF"/term/ifstate=gold This sets up PF4 as a key to turn THREE ON or OFF. To turn on three press PF4. To turn THREE OFF press PF1 PF4. 15.20.4 STRING You may define strings for "Lexicals" TD:DEFINE STRING name 'string' A lexical of the form S_name is give the string Example TD:DEFINE STRING NAME 'George Washington TD:TITLE TOP 'The first president was ' S_NAME TD:TYPE 'NAME="' S_NAME '"' You may show all defined strings with the SHOW STRINGS command. An individual string may be examined by the TYPE command. TYPE S_name 15.20.4.1 Variable - This defines a local variable of the form TD_S_name which contains the string that you have defined. You may define variables before entering TOPDRAWER so that they are available for use. You do this by: $ TD_S_NAME := "String to use" 15.20.5 VALUE You may define values for "Lexicals" DEFINE VALUE name=value [LOG=[ON|OFF]] [FAST[=ON|OFF]] A lexical of the form V_name is give the value n If you specify LOG then the value is typed on your terminal. When FAST=ON the value is defined as a local symbol in non readable form. This will speeds up symbol definitions, but it has little effect on the symbol usage. You should use FAST when you are repeatedly redefining symbols. Non readable symbols do not make sense for a SHOW VALUE command. If you need speed, single letter names are the most efficient. (Default:FAST=OFF) Example TD:DEFINE VALUE NORM=125.5 TD:Y=Y TIMES V_NORM Multiplies all data by 125.5. TD:DEFINE VALUE NORM=<100/V_SUM> TD:Y=Y TIMES V_NORM Normalizes the data to SUM=100. You may show all defined values with the SHOW VALUE command. Individual values may be shown by the SHOW LEXICAL command. See:TOPDRAWER DATA 15.20.5.1 Variable - This defines a local variable of the form TD_V_name which contains the value that you have defined. You may define variables before entering TOPDRAWER so that they are available for use. You do this by: $ TD_V_NAME := "number" example $ TD_V_A := "25.8E5" $ TOPDRAWER $ TITLE TOP 'A=',T_A 15.21 DIAMOND Draws a diamond. DIAMOND [AT|FROM|TO]{x,y[,z]|CURSOR} [DATA] [SIZE=dx[,dy]] [DSIZE=dx[,dy[,dz]]] [ROTATE=n] [FILL[=ON|OFF]] [HIDE[=ON| OFF]] [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] See also:Command BOX 15.21.1 AT x,y,z specify the center of the diamond. If z is specified then they are assumed to be data units. 15.21.2 FROM-TO You may specify the diagonally opposite corners of box enclosing the diamond. 15.21.3 FILL Fills in the diamond using the current fill pattern. See:SET FILL 15.21.4 CURSOR The cross hair cursor is used to specify the limits of the diamond. Simply move the cross hairs so they define the lower-left limits of the diamond and press the space bar. Next move the cursor to the upper-right limits of the diamond an press space again. If you press a key other than space, the cursor information is not used. Alternately you may specify the upper-left then lower-right extension, or any other combination that defines the diamond. 15.21.5 DATA Specifies X,Y are in data coordinate frame. Normally they are in the TEXT coordinate frame. This option is not necessary if z or DSIZE are specified. 15.21.6 DSIZE DSIZE=dx[,dy] Specifies the size in data units. If the size is in data units the x,y are assumed to be data units also. DY is the height. If omitted DY=DX. 15.21.7 ROTATE Specifies a rotation angle in degrees. Rotation is right handed or counterclockwise. 15.21.8 SIZE SIZE=dx[,dy] specifies the size in inches DX is the width. If omitted the width is the default See:Command SET DIAMOND SIZE. DY is the height. If omitted DY=DX. 15.21.9 SOLID... Sets the texture of the line. See:Command SET TEXTURE. 15.21.10 INTENSITY Sets the intensity (1-5) 15.21.11 WHITE... Sets the color of the line. 15.22 DIVIDE DIVIDE [Y|Z] [FROM|TO] [EWEIGHT=n] [WEIGHT=n] {n1|"name1"} [BY] {n2| "name2"|FIT} [AVERAGE|EFFICIENCY[=ON|OFF]] [APPEND[=ON|OFF]] [NAME="name"] [CHECK[=ON|OFF]] [ERROR[=ON|OFF]] [POINTS| COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [LOG[=ON|OFF]] This divides the Y values in data set n1 by data set n2. The result is a modified set n1. You may not divide normal 2-d data by mesh data. 15.22.1 APPEND If APPEND is specified, then a new data set is created, containing the result and n1 is unchanged. 15.22.2 CHECK CHECK=OFF turns off data set checking. When CHECK=ON both data sets must have identical X (and Y if mesh) values, but data set n2 may contain more points than n1. If (DX/DY) is non zero then the both DX and X must be identical within 1% of DX. If you have data sets with non identical values of X you may create a set with identical values using the BIN command. If the X values of 2 data sets are not quite identical. You may force TOPDRAWER to divide them by setting DX for the data 100 times greater than the difference in X or by setting CHECK=OFF 15.22.3 EFFICIENCY If EFFICIENCY is specified, the data is treated as an efficiency. That is set n1 contains the number of successes, while n2 contains the number of trials. The result has error bars (DY) which follow a binomial distribution. See:Command ADD,MULTIPLY. 15.22.4 ERROR ERROR=OFF excludes the errors from the FIT in the computation. (Default:ERROR=ON) 15.22.5 FIT Specifies that the data set is to be divided by the last FIT. See:Command FIT. 15.22.6 LIMITED You may specify the limits over which the histograms are to be divided. If you specify the Y or Z limits, then all data that contains values inside these limits will be divided. For example if you DIVIDE 1 by 2 LIMITED FROM Y=10 to Y=11 But data set 1 contains the followind data: 1,0; 2,10; 3,0; 4,11; 5,0 Points 2 to 4 inclusive will be divided, and only points 1 and 5 will be omitted. 15.22.7 LOG If LOG is specified then the result of the command is typed on your terminal. 15.22.8 WEIGHT-EWEIGHT WEIGHT=n specifies a weighting factor to multiply the data by before adding or subtracting it. EWEIGHT=n specifies the error on WEIGHT. This option must precede the data set number. 15.22.9 Notes If EFFICIENCY is not specified then the new value is Y3=Y1/Y2. If Y2 is zero then Y3 is set to 0.0. The errors (DY) are treated as if the data sets are uncorrelated, if BINOMIAL is not specified. 15.23 DU See:Command X 15.24 DV See:Command X 15.25 DW See:Command X 15.26 DX See:Command X 15.27 DY See:Command X 15.28 DZ See:Command X 15.29 ELLIPSE Draws a circle or ellipse. {CIRCLE|ELLIPSE} [AT|FROM|TO]{x,y[,z]|CURSOR} [DATA] [SIZE=dx[,dy]] [DSIZE=dx[,dy[,dz]]] [ROTATE=n] [SQUARE|SYMMETRIC[=ON|OFF]] [FILL[=ON|OFF]] [HIDE[=ON|OFF]] [ANGLE [FROM] A1 [TO] [A2]] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] See also:Command BOX 15.29.1 AT x,y,z specify the center of the ellipse. If z is specified then they are assumed to be data units. If x,y,z are specified without FROM, TO, or AT then AT is assumed. 15.29.2 FROM-TO Specifies the diagonally opposite corners of box enclosing the ellipse. 15.29.3 FILL Fills in the ellipse using the current fill pattern. See:SET FILL 15.29.4 CURSOR The cross hair cursor is used to specify the limits of the ellipse. Simply move the cross hairs so they define the lower-left limits of the ellipse and press the space bar. Next move the cursor to the upper-right limits of the ellipse an press space again. If you press a key other than space, the cursor information is not used. Alternately you may specify the upper-left then lower-right extension, or any other combination that defines the ellipse. 15.29.5 DSIZE specifies the size in data units. If the size is in data units the x,y are assumed to be data units also. You should note that if DSIZE is specified, you will usually get an ellipse. 15.29.6 ROTATE Specifies a rotation angle in degrees. Rotation is right handed or counterclockwise. 15.29.7 SIZE specifies the size in inches DX is the width. If omitted the width is the default See:Command SET ELLIPSE SIZE. DY is the height. If omitted the DY=DX. 15.29.8 SQUARE The option SQUARE or SYMMETRIC produces a circle. The SIZE is treated as the X,Y of a diameter from the center of a circle, and FROM, TO are treated as the ends of diameter of the circle. 15.29.9 DATA Specifies X,Y are in data coordinate frame. Normally they are in the TEXT coordinate frame. This option is not necessary if z or DSIZE are specified. 15.29.10 ANGLE The ellipse is drawn from the angle A1 to A2. A1,A2 must be in the range -360 to 360 degrees. 15.29.11 SOLID... Sets the texture of the line. See:Command SET TEXTURE. 15.29.12 INTENSITY Sets the intensity (1-5) 15.29.13 WHITE... Sets the color of the line. 15.30 ELSE TD:ELSE Starts or stops execution of TOPDRAWER commands depending on the preceding IF. See:Command IF. 15.31 ENDFILE TD:ENDFILE "Comment to type" Ends the current file. If this command is given from the terminal or is included in the command file used to run TOPDRAWER then it is the same as EXIT. 15.32 ENDIF TD:ENDIF Ends the current if block. See:Command IF 15.33 ENDREPEAT TD:ENDREPEAT Ends the current repeat block. See:Command REPEAT 15.34 CLEAR {CLEAR|ERASE} [FROM] [x,y[,z]|CURSOR] [DATA] TO[x,y[,z]|CURSOR] [DATA] This clears the screen without resetting the buffers or the default values. This is useful if you wish to view several different things with the same parameters. If you specify a pair of X,Y values only a rectangle inside those values is cleared. This only works on terminals that support selective erase. Each X,Y[,Z] may be specified in either Text or Data coordinates. Text coordinates are assumed if a Z is not specified. WARNING After CLEAR the current scale settings are retained, and subsequent plots will not automatically have axes or scales. In general you should use command NEW. 15.35 FFT FFT [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [CHECK[=ON|OFF]] [LOG[=ON| OFF]] [INVERT[=ON|OFF]] [APPEND[=ON|OFF]] [NAME="name"] [POLAR[=ON|OFF]] [MONITOR[=ON|OFF]] This command produces a complex fast fourier transformation of the selected data sets. For 2-d data the real part of the coefficients is stored in Y, and the imaginary part in Z if it exists. If not then DY contains the imaginary part. X contains the frequency value. No error analysis is performed by this operation. For mesh data the real part is stored in Z and the imaginary part in DZ. 1. APPEND=ON Creates a new data set containing the result. 2. CHECK=OFF Turns off the checking to see if data is a histogram. 3. INVERT=ON inverts the forier series contained in Y,Z/DY. 4. SETS selects the data sets to to transform. 5. LOG=ON Logs the operation on your terminal. 6. MONITOR If selected it histograms the original data set and the result. See: SET MODE MONITOR 7. POLAR=ON selects polar coordinate output where Y is the magnitude and Z/DY is the angle. The angle units is selected by the SET POLAR command. The selected data must be a histogram, that is the X values must be equally spaced and strictly monotonic, and there must be at least 2 points in each data set. 15.35.1 Restrictions The fast fourier transform is done by a modified version of the CERN library routine CFT. The data is assumed to be periodic with an EVEN number of points. For example, suppots you have NPT points, then we assume y[I]=y[I+NPT] Also, data sets are assumed to have lengths (say NPT) where NPT's largest prime factor is not more than 23. The speed is enhanced by using small prime factors. Thus, the routine fails for vector lengths NPT= 29 31 37 41 43 47 53 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503 509 521 523 541 547 557 563 569 571 577 587 593 599 601 607 613 617 619 631 641 643 647 653 659 661 673 677 683 691 701 709 719 727 733 739 743 751 757 761 769 773 787 797 809 811 821 823 827 829 839 853 857 859 863 877 881 883 887 907 911 919 929 937 941 947 953 967 971 977 983 991 997 etc. 15.35.2 Interpretation Assuming you have periodic data, the spectrum will exhibit 2 peaks. The first one will be at f the frequency of the structure. The second one will be at a frequency of 1/(chan width)-f. The peak will appear both in the real and imaginary parts of the spectrum. 15.36 FILL FILL BY={nset|"name"} [LEVEL=n] [ADD=[n|Z]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] This takes the data set nset and assumes it is a closed curve. It fills the curve by adding 1 to each Z value of the specified data sets which lie inside the curve. For mesh data Z must be the dependent variable. If the filled data set has finite DX then it is incremented by the fraction of the curve that lies within the DX of X. If you specify LEVEL=n and DY is finite then n steps are used to find the part of the curve that lies within each channel +-DY. 15.36.1 Options 1. ADD - Selects the value to fill by. If ADD=Z then the Z value of the fill source is used in the fill. 2. BY=n - Selects the data set to use in filling other data set. You may specify the set number or the name enclosed in quotes. 3. LEVEL - Selects the number of passes to test. 0=no fractions. 4. LIMITED - Selects data by range of X,Y,Z 5. LINES - Selects the range of lines or rows of a mesh to fill. 6. LOG - Tells you how many points have been filled. 7. POINTS - Selects the range of points or columns to fill. 8. SETS - Selects the data sets to fill. The fill source is never filled. 9. SELECT - Selects the data sets to fill by name. 15.37 FIT FIT [AGAIN[=ON|OFF]] Coordinate to fit [Y|Z] Type of fit [POLYNOMIAL| LEGENDRE| SINE| COSINE| EXPONENTIAL| GAUSSIAN| INNVERSE| USER=n| EQUATION "term1;term2;..."] [SCALE] [ORDER|TERMS=n] [OFFSET=n] [NONLINEAR[=ON|OFF]] [COEFFICIENTS|ECOEFFICIENTS|CMINIMUM|CMAXIMUM [INDEX=n] N1,N2,N3...] [CONSTRAIN[=ON|OFF]] [INCLUDE|EXCLUDE [NONE|EVEN|ODD] [n1,n2...] ] Data generation [CURVE [APPEND[=ON|OFF]] [[X|Y] [FROM xmin] [TO xmax] [BY dx] [N=steps]] [BINS|VALUES]] [NAME="name"] Data selection [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [POINTS=[FROM] n1 [TO] [n2]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [MESH[=ON|OFF]] Output selection [LOG[=ON|OFF]] [FULL[=ON|OFF]] [MONITOR[=ON|OFF]] NONLINEAR=ON options [ECHISQ=n] [MINUIT] [GRAD[=ON|OFF]] [PRINTLEVEL=n] [REPEAT=n] [TOLERANCE=n] Fits data and optionally produces a curve containing the fit. The coefficients are typed on the terminal and placed as comments in the log file. Data points with zero or negative values of DY are omitted from the fit. If DY does not exist or is 0.0 for all specified data then DY is assumed to be 1.0. If all coefficients are constrained, no fitting is done, but you may generate the curve for those coefficients. You may subtract the FIT from a data set with the SUBTRACT command. 15.37.1 Options 1. AGAIN - Redo the last fit. 2. Y|Z selects which coordinate is to be fit. Type of fit 3. POLYNOMIAL,LEGENDRE,SINE,COSINE,EXPONENTIAL,GAUSSIAN,INVERSE - Is the function 4. SCALE - Does fit to LOG(X) or LOG(Y) if the scale is set to LOG. 5. ORDER|TERMS=n - The max number of terms used in the fit. 6. OFFSET=n - An offset for the X value to set the center of the fit 7. COEFFICIENTS - Selects constant coefficients. 8. ECOEFFICIENTS|ERRORS - Selects constant coefficient errors. A. CONSTRAIN selects whether coefficient is constrained. B. INDEX selects the coefficient number. 9. INCLUDE|EXCLUDE - Selects coef. to fit or exclude from the fit. Curve generation 10. CURVE - Produces a data set containing the fitted curve. A. APPEND appends the new curve to the data sets. B. NAME selects the new data set name. C. [X|Y] from n1 to n2 by n3 selects the range and bin width for the curve. Data selection 11. LIMITED - Selects data by range of X,Y,Z 12. NAME - Selects the name of the appended data set 13. POINTS - Selects the range of points to use in the fit 14. SETS - Selects the data sets to use in the fit 15. MESH - Selects mesh data (normally regular data is used) Nonlinear options 16. MINUIT - Does nonlinear fits using interactive MINUIT. 17. NONLINEAR - Selects nonlinear or linear fitting. For NONLINEAR=on Uses linear fitting techniques if on. If off uses MINUIT. A. REPEAT selects the maximum number of tries. B. PRINTELEVEL select the amount of log output. C. GRADIENT selects whether the calculated derivitives are use in the fitting. D. TOLERENCE selects the tolerence for good fit E. ECHISQ selects the error in chisq for finding errors in coef. (Default:1.0) 18. Output options 19. LOG - Enables/Disable the terminal listing of the results of the fit. 20. FULL - Enables output of error matrix as part of LOG. 21. MONITOR - Plots the original data and the fit. 15.37.2 AGAIN Redo the last fit. This option must be the first option on the line. After the fit command. When you redo the fit you may specify new options to modify the fit. If you want to set fit options without doing any fits use the command SET FIT [options] This sets fitting options to be performed by the next fit command. The options on SET FIT are identical to the options on FIT. You may use a series of SET FIT commands to setup the next fit. 15.37.3 EQUATION LINEAR This allows you to enter equations for each term of a series to fit. Each term is separated by a semicolon ";". The zeroeth order term is always assumed to be a constant so only the first, second... order terms are entered. For example you wish to fit Y=C0+C1*X**1.5+C2*EXP(X) TD:FIT EQUATION "XV**1.5;EXP(XV)" If you have previously fit using an equation: TD:FIT EQUATION "" Uses the same equation for a new fit. All other fit options may be used with EQUATION, but any options that modify the number of terms to fit must appear after the equation definition. The X offset is ignored by the equation. NONLINEAR If you wish to perform a fit to an arbitrary function of X, then you must enter the coefficients in the the equation as COE[n], and you must specify the NONLINEAR option. Remember that each term automatically has a coefficient, so you should use coefficients in the equation that have not been already used. For example you wish to fit the equation: C0+C1*/(1+C2*(X-C3)**2) Recalling that C0, and C1 will already be used you enter: TD:FIT EQUATION "1/(1+COE[2]*(XV-COE[3])**2)" NONLINEAR TERMS=3 You may also need to specify initial values for the coefficients and inital errors for the first step. CONSTRAIN=OFF COEF n0,n1,n2,n3 ERROR n0,n1,n2,n3 Note: The constant term COE[0] is fit by default. Likewise the C1 is automatically included as the coefficient of the first term. To get rid of the constant term you use the option: EXCLUDE 0 15.37.4 POLYNOMIAL Does a fit to: SUM( an*(X-Offset)**n ); n=0,TERMS-1 This is the default if no function is specified. 15.37.5 INVERSE Does a fit to an inverse poser series: Y=SUM( an*(X-Offset)**(-n) ); n=0,TERMS-1 15.37.6 SINE Does a fit to: Y=a0+SUM( an*SINE((n)*(THETA-Offset)) ); n=1,TERMS-1 15.37.7 COSINE Does a fit to: Y=a0+SUM( an*COS((n*(THETA-Offset)) ); n=1,TERMS-1 The angle THETA is normally in degrees. If you wish to modify this see SET POLAR. 15.37.8 LEGENDRE Does a fit to: Y=SUM of a legendre polynomial in (X-Offset). ,br;If you select both LEGENDRE and COSINE or the data is POLAR then the Legendre series is a function of COS((THETA-Offset)). 15.37.9 EXPONENTIAL Does a fit to: Y=EXP( a0+a1*(x-offset)) + Polynomial when NONLINEAR=ON (Default) or ... LN(Y)=series(x-offset) for data points with Y>0.0. Where series is either POLY,SINE,COSINE or LEGENDRE. If you wish to fit data which has negative or zero data points, you must either SMOOTH the data to get rid of them, or use the BIN command to rebin the data into large bins. If all y data is less than zero, you may make it positive with the command: TD:Y=Y TIMES -1 When a NONLINEAR fit is used, and NTERMS=n is greater than 2 a polynomial background of n-2 terms is added to the exponential. 15.37.10 GAUSSIAN Does a fit to: Y=a0*EXP(-0.5*((X-a1)/a2)**2)[+a3+a4*X+...] for NONLINEAR=ON (Default) or LN(Y)=LN(a0)+-0.5*((X-a1)/a2)**2 for NONLINEAR=OFF for data points with Y,DY not 0.0. Since only data with both Y,DY nonzero are fit, there may be some inaccuracy for histogram data with zero in a large number of bins, and small numbers in a few bins. Such data should be smoothed or rebinned to remove the bins with DY=0. For linear fits if you specify the a0 or a1 coefficient you must also specify a3. If you wish to fit data which has negative or zero data points, you must either SMOOTH the data to get rid of them, or use the BIN command to rebin the data into large bins. If all y data is less than zero, you may make it positive with the command: TD:Y=Y * -1 When a NONLINEAR fit is used, and NTERMS=n is greater than 3 a polynomial background of n-3 terms is added to the gaussian. If NTERMS=4,5,6 a constant, straignht line, or parabola are used for the background. Larger values are possible, but not recommended. For LINEAR fits the OFFSET is used as the initial guess for the center of the gaussian. When done, it is approximately equal to a1. WARNING If you get the warning message that negative data points have beem omitted in a Gaussian fit, the fit may be incorrect. 15.37.11 DGAUSSIAN Does a fit to: Z=a0*EXP(-0.5*(((X-a1)/a2)**2)+((Y-a3)/a4)**2))[+a5+a6*X+a7*Y] for NONLINEAR=ON (Default) or for data points with Y>0.0. If you specify NTERMS=n where n is larger than 5 a Dpolynomial background is added to the gaussian. The number of terms in the background is n-5. If NTERMS=6,8 a constant, or sloped plane is used for the background. 15.37.12 DPOLYNOMAIL Does a double polynomial fit to: Z=a0+a1*X+a2*Y+a3*X**2+a4*X*Y+a5*Y**2+z6*X**3.... 15.37.13 USER USER=n Does a fit to a user supplied function type. N must be between 1 and 99 with a default of 1. If none then a polynomial is used. For each coefficient of the linear fit the user supplied function is called: Y=TDUFUN(n,NORD,X) Where n is the function type. NORD is the number of the coefficient (1-19) and X is the x value. The user function must return the y value of the term. For example if you want USER=1 to select a polynomial, and USER=2 to select an inverse polynomial. You would write the following subroutine: FUNCTION TDUFUN(n,NORD,X) IF (n.eq.1) THEN TDUFUN=X**NORD IF (n.eq.2) THEN TDUFUN=X**(-NORD) ELSE END 15.37.14 COEFFICIENTS|ERRORS Sets individual coefficients|errors. If coefficients are set then they are not included in the calculation of the fit unless CONSTRAIN=OFF. If CONSTRAIN=OFF then you are merely settting the initial value of the coefficient. This is only useful for nonlinear fits. If you set the error it is used as the initial step for nonlinear fits. INDEX sets the index of the coefficient|error. The index may range from 0 to 19. Undefined errors are assumed to be 0.0. EXAMPLE TD:COEFFICIENTS 1,2.5,.5 ERRORS .1,.5,.2 Sets - a0=1.0+-.1, a1=2.5+-.5, a3=0.5+-.2 TD:COEFFICIENTS INDEX=3 .5 ERRORS I=3 .1 Sets - a3=0.5+-.1 TD:COEFFICIENTS 1.0 I=3 2.0 I=5 .5,-.7 Sets - A0=1.0, A3=2.0, A5=0.5, A6=-0.7 15.37.15 CURVE Generates the fitted curve, (Y,DY) as a function of X, which replaces the current data. DY is calculated using the error matrix. 1. X Selects the X coordinate. (Default) 2. Y Selects the Y coordinate. This is used to generate a mesh. 3. APPEND - The new data is appended to the current data as a new set rather than replacing it. 4. N - Sets the number of bins in the resulting curve. 5. FROM - Sets the lowest value for the fitted curve. 6. TO - Sets the highest value for the fitted curve. 7. BY - Sets the width between data points in the fitted curve. You may not specify all four FROM,TO,BY, and N. 8. BINS - Specifies that FROM, TO refer to the lower edge of the first bin and the upper edge of the last bin. 9. VALUES - Specifies that FROM, TO refer to the center of the first and last bins. (Default:VALUES) Example The following all produce points at X=0.5,1.5,...9.5 CURVE VALUES FROM .5 TO 9.5 BY 1 CURVE BINS FROM 0 TO 10 BY 1 CURVE BINS FROM 0 TO BY 1 N=10 CURVE BINS FROM 0 TO BY 1 N=10 Y FROM 100 to 120 by 2 If you do not specify FROM, TO ... a set of values is assumed. First if you are fitting a histogram with equally spaced values, then the same X values are assumed. Otherwise the current X tick spacing is used. 15.37.16 EXCLUDE/INCLUDE Selects terms to include or exclude from the fit. n1... may range from 0 to 19. If you specify INCLUDE NONE then no terms are fit. This is useful if you wish to generate a curve by specifying coefficients, without actually performing a fit. (Default:EXCLUDE NONE) 15.37.17 LIMITED Fits points between the specified limits. If limits are not specified, the default is the current plot limit. See:Command SET LIMITS. You may specify up to 5 sets of limits. This allows you to fit the data using up to 5 regions, and omitting the rest of the data. 1. X - Specifies X limit 2. Y - Specifies Y limit 3. Z - Specifies the Z limit 4. CURSOR - Brings up the cursor. You move it to the X,Y value you wish then press the space bar to enter both X,Y or X to enter X or Y to enter Y. 5. RECURSOR - The cursor enters all regions from the current one, until you type "Q". 6. VLOG - Draws a cross when you press the space bar, and draws a dotted line around the final limits. example TD:FIT POLY TERMS=3 LIMITED FROM 1,1 to 2,5 or... TD:FIT POLY TERMS=3 LIMITED FROM X=1 Y=1 TO X=2 Y=5 Fits all points that with X between 1 and 2 and Y between 2 and 5 inclusive. TD:FIT POLY TERMS=3 LIMITED FROM Y=1 TO Y=5 Fits all data points with Y values between 1 and 5 inclusive. TD:FIT POLY TERMS=3 LIMITED FROM CURSOR TO CURSOR Fits all data points as defined by the cursor limits. TD:FIT POLY TERMS=3 LIMITED FROM X=CURSOR TO X=CURSOR Fits all data points according to X values defined by the cursor. TD:FIT POLY TERMS=3 LIMITED FROM 1 to 20 FROM 40 TO 80 Fits a parabola to data in 2 regions, and skips the X values 20 to 40. TD:FIT POLY TERMS=3 LIMITED VLOG RECURSOR Fits a parabola to the data for the regions selected by the cursor. Both X and Y values are determinded by the cursor. Each cursor value is entered by pressing the space bar. After the last region, Press the "Q" key to quit. TD:FIT POLY TERMS=3 LIMITED VLOG X=RECURSOR This is the same as above, except that only X values are entered by cursor. 15.37.18 NONLINEAR Selects nonlinear fitting techniques. If ON MINUIT is used to do the fit. The ECHISQ, GRADIENT, TOLERENCE, REPEAT, and PRINTLEVEL are used to modify the MINUIT fit. They are ignored for linear fits. If you specify the option MINUIT you will enter interactive MINUIT mode. You must then guide the fit using MINUIT commands. In addition you may specify the maximum and minimum value for each coeffiecint with the CMINIMUM and CMAXIMUM options. You might also wish to pick an initial error for each coefficinent, and possibly an initial value. The nonlinear errors agree with the linear values if you select ECHISQ=1.0. Note: Though Topdrawer and PAW both use MINUIT, the resulting CHISQ disagrees by about a factor of 3. The TOPDRAWER CHISQ seems to agree with the correct value by subtracting the fitted curve from the data and calculating SUM((Y/DY)**2)/(Points-Params) The linear methods are much faster and convergence is guaranteed if no numerical errors occurr. Unfortunately many curves can not be expressed as a linear combination of terms. Most linear fits may be performed either by linear or nonlinear methods. This may be useful in checking the accuracy of the fitting techniques. (Default:OFF, ON if GAUSSIAN or EXPONENTAIL) 15.37.18.1 ECHISQ - Selects the difference in CHISQ for calculating the error in the coefficients. (Default:1) 15.37.18.2 GRADIENT - If ON use the calculated gradient. (Default:GRADIENT=ON, OFF for EQUATION) 15.37.18.3 PRINTLEVEL - Selects the MINUIT printlevel (-1 to 3). Higher levels produce more detailed reporting. (Default:PRINTLEVEL=-1) 15.37.18.4 REPEAT - The number of times to repeat before giving up. (Default:REPEAT=25) 15.37.18.5 TOLERENCE - Selects the tolerence for fitting. Fit stops when the estimated distance from the min chisq is 0.001*TOLERENCE*ECHISQ*CHISQ. (Default:0.1) 15.37.19 LOG/FULL Types the result of the fit on your terminal. If you select LOG=OFF then the results of the fit are not typed on your terminal. If you select FULL then the error matrix as well as all result of the fit is typed on your terminal. (Default:LOG=ON,FULL=OFF). 15.37.20 OFFSET OFFSET=n If non zero the data is fitted as a function of (X-n). For non orthogonal functions such as plynomials, you should always specify the offset as the center of the region that you wish to fit. This will produce a better fit with lower errors on the coefficients. The offset is included in the a1 coefficent for GAUSSIAN fits, so you do not need to specify it. 15.37.21 MESH Selects mesh data. Normally mesh data is ignored when performing a fit. 15.37.22 NAME The new set will usually have a name consisting of a transformation name followed by the old set name. If you specify a new name it is applied to the new data set. If the name ends in "%" then the old name is appended to the new name. See option:APPEND 15.37.23 MONITOR If selected it plots the original data and joins the fitted curve. See: SET MODE MONITOR The fitted curve is joined using the SECONDARY attributes. to change them use the SET SECONDARY command. 15.37.24 POINTS Specifies the range of points to use. If n2 is omitted it is assumed to be n1. You may specify the point number or the options FIRST,LAST. 15.37.25 SCALE Fits the LOG(X or Y) to the base e if a log scale is selected for X or Y. see the command: SET SCALE. Similarly the option EXPONENTIAL fits LOG(Y)=series. example TD:SET SCALE Y LOG TD:FIT TERMS=4 Fits a polynomial LOG(Y)=a0+a1*X+a2*X**2+a3*X**3 example TD:SET SCALE X LOG TD:FIT TERMS=3 Fits a polynomial Y=a0+a1*LOG(X)+a2*LOG(X)**2 15.37.26 SETS Specifies the range of data sets to use. If n2 is omitted it is assumed to be n1. You may specify the data set number or the options FIRST,LAST. 15.37.27 ORDER/TERMS Sets the number of terms in a series or the order of the series. The number of terms must be between 1 and 20. The order (TERMS-1) must be between 0 and 19. (Default:TERMS=2) 15.37.28 Y|Z This selects the coordinate to fit. By default Z is fit for MESH data, DPOLYNOMIAL, or DGAUSS. Otherwise Y is fit. 15.37.29 Warning A fit may fail with floating point overflow when the number of terms is large. Sometimes you may avoid this be rescaling the data to a smaller range, and fitting the rescaled data. Selecting an offset for X may also prevent errors. For example you have data with X ranging from 1 to 100 and Y from 0 to 10. When you try to fit the data with more than 9 terms you get floating overflow. This may be prevented by rescaling X to be in the range .01 to 1. TD:X=X TIMES 0.01 Then try performing the fit again. Even if there is no overflow, a fit may fail if a large number of terms are selected, and the limit of the computer accuracy is reached (14 digits). Polynomials are particularly sensative to this type of problem. In general polynomials should not be fitted to more than 9 terms. 15.37.30 Yerrors The error bars on the Y values are used as weighting factors for the fit. If they are all 0.0 they are assumed to be 1.0. The resulting fit has error bars on the coefficients according to the assumed error bars on the Y values. X errors are not used in the fit. When a curve is generated, it will have error bars on the Y values if the fitted curve had non zero error bars. For some functions the final errors depend on the initial center of the expansion. This is set by specifying an offset (OFFSET=n). Generally best results are obtained with an offset in the middle of the data set. 15.37.31 Examples TD:FIT POLY TERMS=10 INCLUDE EVEN Fits a polynomial using the even powers of X. (1.0,X**2...X**8) A curve with the resulting fit replaces the current data. TD:FIT LEGEN TERMS=3 Fits a legendre polynomial of 3 terms. (1,L1,L2) A curve with the resulting fit replaces the current data. TD:FIT POLY INCLUDE 2,3,5 CURVE APPEND FROM 0 to 10 by .1 Fits a polynomial using X**2,X**3,X**5 and appends the histogram at the end of the current data. The curve contains 101 data points spanning the range of X from 0.0 to 10.0 TD:FIT POLY INCLUDE NONE COEF 1.0,.5,-.25 CURVE FROM 0 TO 10 BY .5 Creates a parabola Y=1.0+0.5*X-0.25*X**2 from 0 to 10 in steps of 0.5. Note: that no fit is performed since no coefficints were included. 15.38 FLUSH FLUSH This flushes any information in the buffers. If you are plotting on an interactive device, from the terminal you can do the same thing by hitting "return". 15.39 FREQUENCY This is a synonym for BIN. See the BIN command. 15.40 HISTOGRAM Draws a histogram from the specified data points. Bin edges are halfway between the ends of adjacent error bars (DX), or halfway between points if no error bars. HISTOGRAM [EXPAND[=ON|OFF]] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [SLICES [X|Y|Z] [FROM] v1 [[TO] v2]] [TITLE[=ON|OFF]] [CYCLE[=ON|OFF]] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [HIDE[=ON| OFF]] [FILL[=ON|OFF]] MESH options [X] [Y] [Z] [BLOCK|LEGO] [FRAME[=ON|OFF]] [DEPTH[=ON|OFF]] [GRID[=ON| OFF]] [XY|YZ|ZX] [CROSS|RANDOM] 15.40.1 CYCLE When plotting more than 1 slice or data set, CYCLE causes the line texture, color, and width to vary from one plot to the next. The order of cycling is set by the SET CYCLE command. If you have specified either texture, color or width it overrides the cycle value. 15.40.2 DEPTH DEPTH=OFF plots the mesh as a series of disconnected histograms, rather than as a solid. Each histogram is drawn as a flat 2 dimensional hist, but one after the other. Necessary lines to delineate edges of different planes are included when a plot with depth is requested. By omitting some lines the plot is much faster. (Default:DEPTH=ON) If you wish to pick which axes is histogrammed you may use the options X,Y,Z 15.40.3 EXPAND Sets the limits so that the selected data expands to fill the window. This has no effect unless POINTS, SETS, SLICES are specified or the limits on MESH data have been set by a SET LIMITS command. See:SET MODE 15.40.4 FILL Generates a fill pattern under the histogram, or bar chart. 15.40.5 FRAME This option specifies that the edge of the 3-d plot is to be always drawn. If turned off the edge is not drawn when the data=ZMIN. Essentially this histograms only the "important" interior data. (Default:FRAME=ON) 15.40.6 GRID Draws grid lines corresponding to Z major ticks on a histogram of a MESH. These are drawn according to the style,color... selected by the SET GRID command. The CYCLE option in the SET GRID command can make these different colors and textures. (Default:GRID=OFF) If SET AXES THREE=ON and SET GRID X=ON Y=ON are selected then GRID defaults to ON. 15.40.7 HIDE Controls whether hidden lines are drawn for a 3-d mesh, or whether one histogram hides the next. You must specify HIDE for both the histogram to be hidden and the histogram that is to hide it. The histogram which is drawn first will hide the second one. HIDE=OFF draws the hidden lines, while HIDE=ON omits them. (Default:HIDE=ON for mesh, HIDE=OFF for data) example Assume you have 2 data sets where you want set 1 to hide elements in set 2. Also you would like to fill data set 2. TD:JOIN SET=1 HIDE TD:JOINS SET=2 HIDE FILL You can produce a drawing of a mesh with hidden lines as dotted lines by doing the histogram twice: TD:HISTOGRAM TD:HISTOGRAM HIDE=OFF DOTTED 15.40.8 POINTS|COLUMNS Specifies the range of points or the colums of a mesh to use. If not selected all points are plotted. If n2 is omitted it is assumed to be n1. You may specify the point number or the options FIRST,LAST. 15.40.9 SETS This selects the data set to plot. The data must be broken up into sets using the data set command, for this option to work properly. If n2 is omitted it is assumed to be n1. You may specify the data set number or the options FIRST,LAST. 15.40.10 SOLID This determines the texture of the line. See:Command SET TEXTURE 15.40.11 X|Y|Z|BLOCK For normal data X,Y,Z pick the dependent axis of the plot. Mesh data produces a "solid" plot. The limits are set from the beginning of the first X,Y data point to the last. This may not be satisfactory if the bins at the edges are large. The options X... modify the format of the plot. 1. X - Draws all bin edges in the X direction. 2. Y - Draws all bin edges in the Y direction. 3. Z - Draws all bin edges in the Z direction. 4. BLOCK or LEGO - Draws all bin edges. It is equivalent to X Y Z. This produces a block or "Lego" plot. 15.40.12 XY XY|YZ|ZX determine which faces are "shaded". The shading is done by either drawing parallel lines, a cross from corner to corner or random dot patterns. The default is parallel lines. 15.40.13 CROSS|RANDOM CROSS|RANDOM produce either a diagonal cross or a set of random dots as shading patterns on the selected faces. DX controls the number of dots/face. DX is the total number of dots to pruduce. 15.40.14 DX DX|DY|DZ are the separation between parallel lines used to shade the faces. If zero parallel lines are not drawn. Example You wish to shade face YZ,ZX with lines parallel to the Y axis separated by 0.1 units. Essentially this draws lines at even multiples of 0.1 units. This may be used in a similar fashion to grid lines on 1-d plots. TD:HISTOGRAM YZ ZX DX=0.1 Note: you specify DX the distance along the X axis. Since DY is 0, no lines parallel to the X axis are drawn. When selecting RANDOM shading DX specifies the number of dots/face. 15.40.15 SLICES [SLICES [X|Y|Z] [FROM] v1 [[TO] v2]] [CYCLE[=ON|OFF]] or... [SLICE X|Y|Z=v1] [CYCLE[=ON|OFF]] This plots a histogram sliced from mesh data. This command is illegal for normal data. If v2 is omitted then v2=v1. If a range is selected then all slices within the range are histogrammed. IF you set THREE=OFF then the slices are histogrammed according to the first X,Y,Z Mentioned. If X is first then the slices are taken perpendicular to the X axis. You only need select X|Y|Z the first time you slice after a NEW FRAME command. 15.40.15.1 Operation - If THREE is ON then the histogram is sliced into a section between v1 and v2. The data outside of the range is omitted from the plot. If THREE is OFF then each line/column of the histogram between v1 and v2 is plotted as a separate histogram. If both v2 and v1 are omitted, then all slices are plotted. If you wish to add together a series of slices and plot them as a single histogram see:Command PROJECT. 15.40.15.2 Warning - If you intend to use options X,Y,or Z to control the format of a histogram they should not follow a SLICE command, or they should be separated from it by some other option. 15.40.15.3 Example - 2-d Example You read in a mesh of data x,y vs Z. X ranges from 0.0 to 1.0 in steps of 0.1 and Y from 100 to 200 in steps of 1. Then you: TD:SET THREE OFF You wish to view a histogram of x vs Z for Y=140 and expand the scale so that the final plot fills the window. TD:HISTOGRAM SLICE Y=140 EXPAND You now wish to view y vs z for values Y=.2 to .5: TD:HISTOGRAM SLICE X FROM .2 to 0.5 (This plots 4 histograms) Now you wish to view all slices along the X axis: TD:HISTOGRAM SLICES Y (This plots 100 histograms!) TD:HISTOGRAM SLICE X FROM 0 to 0.5 Y FROM 105.5 to 110.0 Plots the mesh data as a series of slices looking along the X axis for a limited range of Y. TD:HISTOGRAM SLICE Y=105 X FROM .25 TO .5 Plots the mesh data as a single slice looking along the Y axis for a limited range of X. 3-d Example You enter mesh data in steps of 1 for Y=1 to 10, X=0 to 20. TD:HIST SLICE X=10. You are looking at X=10. TD:HIST SLICE X=10. TO 20 You are looking at X=10 to 20. TD:HIST SLICE X=10. TO 20 Y=5 TO 7 You are looking at X=10 to 20, Y=5 to 7. 15.40.16 3-d_histograms A 3-d histogram can be either a plot of mesh data or a plot of "normal" x,y,z data. Mesh data is normally plotted as a "solid". XYZ data is plotted as a histogram of X vs Z in the plane determined by Y. For all 3-d histograms Z must be the dependent variable, and X,Y are independent. Repeated XYZ plots may be used to build up a series of histograms. NOTE Some lines may be missing from the plot, because of the viewpoint. If this happens you may need to: TD:SET THREE RDIST 1000 This moves the viewpoint closer to infinity, but maintans the plot size. If the plot is too large you may need to adjust the screen or window distance. TD:SET THREE DIST 1000 SCRD 300 Will reduce the size of the plot. The size of the plot is roughly proportional to the ratio of SCRD to DIST. If you specify color, intensity, or texture it is used for the top side of the mesh, while the default is used for the bottom. example TD:SET COLOR RED TD:SET TEXTURE DOTS TD:HISTOGRAM SOLID WHITE Produces a mesh plot with bottom in dotted red lines, while the top side is drawen in white solid lines. 15.40.17 Variables Normally for 2-d plots X is the independent variable and Y is the dependent one. Normally for 3-d plots X,Y are the independent variables and Z is the dependent variable. The bin width is half way between the X or X,Y values if DX,DY are 0. If DX,DY are specified then they determine the bin width. 15.40.18 Limits The limits of the data for histograms is normally set so that the lowerlimit of the dependent axis with a linear scale is 0.0, unless some data points are less than zero. If you wish a different value you can: TD:SET LIMIT YMIN=n or for 3-d.... TD:SET LIMIT ZMIN=n WARNING If this command is issued in between 2 plots overlaying each other, they will not have the same scales. 15.40.19 Shading_example Shading is produced by the options: XY YZ ZX DX DY DZ CROSS RANDOM If you wish to shade the 3 faces differently, you must histogram 3 times with each pattern you wish. For example you wish parallel lines on the YZ face, dots on the ZX face, and crosses on the XY face: TD:HISTOGRAM XY CROSS TD:HISTOGRAM YZ DX=0.1 DY=0.1 TD:HISTOGRAM ZX RANDOM DX=1000 15.41 HELP This gives you help on TOPDRAWER commands. This command is not journaled unless the MODE ABORT=OFF is set. TD:HELP topic subtopic sub-subtopic... For example to get the list of set commands: TD:HELP COMMAND SET list To get help on the JOIN command. TD:HELP COMMAND JOIN 15.42 IF IF|IFNOT [.AND.|.OR.] [.NOT.] [DATA] [ERROR] [INTERACTIVE] [MESH] [THREE|3D] [value {.LT.|.EQ.|.GT.|.LE.|.NE.|.GE.} value] The condition is tested and if satisfied the rest of the line up to the semicolon ";" is executed. If not satisfied it is skipped. If .AND. or .OR. are omitted .AND. is assumed. IF|IFNOT [conditions] THEN . . . ELSE . . . ENDIF If the tested condition is satisfied lines up to the ENDIF or ELSE are executed. Otherwise they are skipped. 1. DATA - True if any data points are available. 2. ERROR - This condition is true if the last line had an error. 3. INTERACTIVE - True if the program is running interactively, False if it is run in BATCH mode. The device you are using may or may not be interactive independent of the mode of operation. 4. MESH - True if the data is (3D) mesh data. 5. 3D - True if 3D is turned on. You should notice that mesh data may be plotted as flat or 3D data. 6. value - Any number or lexical. Example TD:IF MESH PLOT;IFNOT MESH HISTOGRAM; or... TD:IF MESH THEN;PLOT;ELSE;HISTOGRAM;ENDIF; If the current data is mesh data it is plotted as a scatter plot otherwise it is histogrammed. TD:IF 3D .AND. V_SUM .GT. 0 HISTOGRAM Histograms 3-d data if it is greater than zero. TD:IF V_SUM .GT. 0 .OR. V_SUM .LT. -1 .AND. 3D JOIN Joins mesh data if the sum over the data is not between -1 and 0. 15.43 INTERPOLATE INTERPOLATE [LEVEL=n] [{SPLINE|GENERAL}] [CLOSED[=ON|OFF]] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [APPEND[=ON|OFF]] [NAME="name"] [LOG[=ON|OFF]] Interpolates a data set and puts the result into a new data set. LEVEL is the number of intervals per pair of points. If 2 a single point is interpolated in between each existing point. If it is 5 then 4 points are interpolated. X, Y, and Z if available are all interpolated. The data must be strictly monotonic in either Y or X for a SPLINE interplation. If the first and last points of a curve are the same, the curve is assumed to be closed, and the interpolation is done accordingly. If the data is POLAR or SPHERICAL then the angles must vary smoothly for proper closure. 15.43.1 Options 1. LEVEL - Selects the number of subintervals from 2 to 10. (Default:LEVEL=2) 2. SPLINE|GENERAL - Selects the type of fit to use in interpolation. (Default:GENERAL) 3. CLOSED forces the interpolation to consider the data as a closed curve. CLOSED=OFF will fil an unclosed curve even when the first and last points are identical. (Default:data determines closure) 4. POINTS - Selects the data points to use by number. 5. SETS - Selects the range of data sets to interpolate. 6. SELECT="name" - Selects the data sets by name 7. LIMITED - Selects the points to use by a range of values. The actual data selected will include all data that meets the selection. Some data outside of the range may be included to avoid breaking up a data set into multiple pieces. 8. APPEND - Appends the new data sets. Otherwise the new data replaces the old set. (Default:APPEND=OFF) 9. NAME - Specifies the name for the new data set. (Default:"Spline %" 10. LOG - Summarizes the operations done. (Default:LOG=OFF) 15.43.2 Notes The spline fit is based on the spline fitter from FXB$CG from the Stanford SPSS package. The general fit was originally adapted from ACM Algorithm #433, by Hiroshi Akima. The interpolation by n will not give the same results as joining the data by n, since the joininig is done after the data coordinates have been transformed into text coordinates. 15.44 JOIN Joins the data points with a series of line segments. JOIN [[LEVEL=]n] [{SPLINE|GENERAL}] [TEXT] [EXPAND[=ON|OFF]] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [SLICES [X|Y|Z] [FROM] v1 [[TO] v2]] [TITLE[=ON|OFF]] [CYCLE[=ON|OFF]] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [HIDE[=ON|OFF]] 3-d options [X|Y|Z] [ERROR[=ON|OFF]] 15.44.1 Level This is the number of line segments/point to use in joining the points. If omitted TOPDRAWER picks a suitable value 15.44.2 CYCLE When plotting more than 1 slice or data set, CYCLE causes the line texture, color, and width to vary from one plot to the next. The order of cycling is set by the SET CYCLE command. If you have specified either texture, color or width it overrides the cycle value. 15.44.3 ERRORS This puts error bars as vertical lines on a mesh plot. 15.44.4 EXPAND Sets the limits so that the selected data expands to fill the window. This has no effect unless POINTS, SETS, SLICES are specified or the limits on MESH data have been set by a SET LIMITS command. See:SET MODE 15.44.5 FILL Generates a fill pattern inside the curve. The pattern will be generated so that alternate areas witin the curve are shaded. The curve is assumed to be closed with the last pont connecticted to the first one. No spline or general fits are done to the data with fill. The number of segements per point or level is assumed to be 1 with fill. 15.44.6 HIDE Controls whether hidden lines are drawn for a 3-d mesh, or whether one histogram hides the next. HIDE=OFF draws the hidden lines, while HIDE=ON omits them. (Default:HIDE=ON for mesh, HIDE=OFF for data) This works very well for curves which are functions of x, or curves that have at most 2 y values for a given x. Curves with more than 2 y values per X will hide the entire region from the minimum to the maximum y. 15.44.7 SPLINE|GENERAL SPLINE uses a natural cubic spline to fit the points. Either x or y must be strictly increasing. A GENERAL curve is calculated using an algorithm which allows multiple-valued functions and repeated points. (Default:GENERAL) 15.44.8 TEXT Use the TEXT coordinate frame instead of the DATA frame. 15.44.9 LINES Specify which lines or rows of a mesh are to be used in the plot. 15.44.10 POINTS|COLUMNS Specifies the range of points or the colums of a mesh to use. If not specified all data points are used. If n2 is omitted it is assumed to be n1. You may specify the point number or the options FIRST,LAST. For 3-d plots this specifies the columns to use in the plot. 15.44.11 SETS This selects the data set to plot. The data must be broken up into sets using the data set command, for this option to work properly. If n2 is omitted it is assumed to be n1. You may specify the data set number or the options FIRST,LAST. 15.44.12 INTENSITY Sets line intensity or width (1-5). 15.44.13 WHITE... Sets the line color. See:Command SET COLOR. 15.44.14 SOLID... Set the line texture. See:Command SET TEXTURE 15.44.15 X|Y|Z This specifies that mesh data is to be joined only in X,Y, or Z. The default is to join in both. 15.44.16 SLICES This plots data sliced from a mesh. For more information see HISTOGRAM SLICE. 15.44.17 3-d_plot This produces a mesh plot of the data. Essentially the data points are joined in X,Y. If you specify color, intensity, or texture it is used for the top side of the mesh, while the default is used for the bottom. example TD:SET COLOR RED TD:SET TEXTURE DOTS TD:JOIN SOLID WHITE Produces a mesh plot with bottom in dotted red lines, while the top side is drawen in white solid lines. 15.45 LIST 15.45.1 DATA LIST [DATA] [APPEND[=ON|OFF]] [FILE|OUTPUT=filename] [LOG[=ON|OFF]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS|COLUMNS=[FROM] n1 [TO] n2]] [LINES|ROWS=[FROM] n1 [TO] n2]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [STATISTICS[=ON|OFF]] [COMPRESS[=ON|OFF]] lists the current data in the buffer. The data values are listed in a format that may be used as input to TOPDRAWER. For more information See:Command SHOW DATA. 15.45.1.1 APPEND - Adds the listing to the end of the specified file. (Default:APPEND=OFF) 15.45.1.2 COMPRESS - Selects compressed output. This saves space on disk, at the expense of readability. If you do not specify ON or OFF, ON is assumed. (Default:COMPRESS=OFF) 15.45.1.3 FILE - Selects the filename for output. If omitted the listing file is used. If the filename is NONE then no file name is selected. If you wish to specify a file name containing either semicolons or blanks, it must be enclosed in parenthesis. 15.45.1.4 LIMITED - Limits the data listed to the specified range. For 3-d data the limit on the dependent variable is ignored. If limits are not specified, the default is the current plot limits. See:Command SET LIMITS. 1. X - Specifies X limit 2. Y - Specifies Y limit 3. Z - Specifies the Z limit 4. CURSOR - Brings up the cursor. You move it to the X,Y value you wish then press the space bar to enter both X,Y or X to enter X or Y to enter Y. 5. RECURSOR - The cursor enters both limits. 6. VLOG - Draws a cross when you press the space bar, and draws a dotted line around the final limits. 7. LOG - Type on the terminal a summary of the data listing. example TD:LIST DATA LIMITED FROM 1,1 to 2,5 or... TD:LIST DATA LIMITED FROM X=1 Y=1 TO X=2 Y=5 Lists all points that with X between 1 and 2 and Y between 2 and 5 inclusive. TD:LIST DATA LIMITED FROM Y=1 TO Y=5 Lists all data points with Y values between 1 and 5 inclusive. TD:LIST DATA LIMITED FROM CURSOR TO CURSOR Lists all data points as defined by the cursor limits. TD:LIST DATA LIMITED FROM X=CURSOR TO X=CURSOR Lists all data points according to X values defined by the cursor. 15.45.1.5 LINES|ROWS - For 3-d plots specifies which lines or rows of the mesh data to list. 15.45.1.6 POINTS|COLUMNS - This specifies which points to list. For 3-d this is the range of column numbers. 15.45.1.7 SETS - This specifies which data set to list. 15.45.1.8 STATISTICS - This displays only the statistics on the data, and the actual data values are suppressed. 15.45.2 FIT LIST FIT [APPEND[=ON|OFF]] [FILE|OUTPUT=filename] [FULL[=ON|OFF]] Produces a listing on disk of the current fit parameters. Options: 1. APPEND adds the listing to the end of the specified file (Default:APPEND=OFF) 2. FULL outputs all information. (Default:FULL=OFF) 3. FILE specifies the file name (Default:tfit.lis) 15.45.3 HISTOGRAMS LIST HISTOGRAMS [APPEND[=ON|OFF]] [FILE|OUTPUT=filename] [IDENT=[FROM] n1 [TO] [n2]] [SELECT|NAME='hist_name'] [EXACT[=ON|OFF]] [AREA|DIRECTORY="dir/subdir..."] [TReE[=ON|OFF]] [ENTRIES[=ON|OFF]] [HISTOGRAM[=ON|OFF]] [MESH[=ON|OFF]] [ARRAY[=ON|OFF]] [NTUPLES[=ON|OFF]] [INdEX[=ON|OFF]] [LOG[=ON|OFF]] This produces a line printer listing of the current histogram data. The options ENTRIES,MESH,NTUPLES,EXACT,NAME, and IDENT select which histograms are printed. TREE lists all histograms in the directory tree. You may specify the output file name FILE=name. The option LOG types the file name of the histogram listing on your terminal. The histogram data is listed in a form suitable to be printed. Some histogram packages allow you to specify the format of the output. For more information see command: SET HISTOGRAM. An index precedes all of the histograms. If you specify INDEX=OFF then no index is listed. (Default:FILE=histo.lis,TREE=OFF,INDEX=ON,APPEND=OFF) 15.46 MERGE MERGE [ALL] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [NAMe="name"] [POINTS=[FROM] n1 [TO] [n2]] [APPEND[=ON|OFF]] [NAME="name"] [LOG[=ON|OFF]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [CURSOR] ] Merges the specified data points into a single data set. 1. ALL merges all data 2. APPEND creates a new data set and copies all of the specified sets into it. If not specified then the specified range of data sets is deleted. 3. LIMITED allows you to specify which points to retain, all others are deleted or omitted in the case of APPEND. 4. LOG shows which sets are merged. 5. NAME specifies the name of the new data set. 6. POINTS selects the data points by number 7. SETS selects the range of data sets to merge. 8. SELECT selects the data sets by name You must specify either SETS, POINTS, LIMITED, or ALL If the range of data sets contains a mesh data set and APPEND is not specified, the data can not be merged. After merging several data sets you may need to SORT the data if you wish to HISTOGRAM, JOIN, or BARCHART it. 15.47 MONITOR MONITOR HISTOGRAMS [AVAILABLE|FILE=name|SECTION=name] [IDENT[=[FROM] n1 [TO] [n2]] [EXACT[=ON|OFF]] [EXPAND[=ON|OFF]] [SELECT|NAME='hist_name'] [INTERVAL=n] [ENTRIES[=ON|OFF]] [HISTOGRAM[=ON|OFF]] [LOG[=ON| OFF]] [MESH[=ON|OFF]] [OVERFLOWS[=ON|OFF]] [PAUSE[=ON|OFF]] [REPEAT=n] [RESCALE[=ON|OFF]] [SHOW[=ON|OFF]] [SCAN[=ON|OFF]] [SKIP=n] [STATISTICS[=ON|OFF]] [TIME[=ON|OFF]] [TREE[=ON|OFF]] [WINDOWS=n] Repeatedly displays the selected histograms, or the last one selected by a SET HISTOGRAM command. If more than 1 histogram are selected only the first 20 are displayed. SEE:TOPDRAWER LINK and SET MONITOR 15.47.1 AVAILABLE Selects currently available histograms rather than histograms in a global section or direct access file. 15.47.2 EXACT Histogram names are treated as exact strings, and they are not searched in a case independent manner. (Default:OFF) 15.47.3 EXPAND Expands the histogram scales by omitting leading and trailing zero channels. The histogram is also centered in the window. You may also set limits on the Y scales of individual histograms by: DEFINE HIST ID=n PRMIN=nlow PRMAX=nhigh 15.47.4 ENTRIES YES selects only histograms with entries, while NO selects histograms without entries. 15.47.5 FILE Selects the direct access file to monitor. If FILE="" then the current one is used. 15.47.6 IDENT Specifies the IDs of the histograms to display. If this qualifier is not used, then the current histogram is displayed. If IDENT is used without any parameters then all histograms are candidates for monitoring. 15.47.7 INTERVAL Specifies the interval in seconds between updates. (Default:10) 15.47.8 LOG Types on your terminal the name of each histogram monitored. If STATISTICS is selected then the statistics are also typed. 15.47.9 MESH YES selects only mesh data (scatter plots), while NO selects only non mesh data. Normally both mesh and nonmesh data are displayed. 15.47.10 NAME Selects the histograms by name. See SET or SHOW HISTOGRAM. 15.47.11 OVERFLOWS Displays the overflow data in the first/last channels. (Default:ON) 15.47.12 PAUSE Selects pause mode rather than wait mode. After each plot Topdrawer pauses until you press the "Return" key. (Default:OFF) 15.47.13 REPEAT Is the number of times to repeat. It must be in the range of 1 to 2147483647. (Default:9999) 15.47.14 RESCALE Selects whether hist is rescaled when it overflows. Normally the TOPDRAWER automatically picks the scale of the displayed histogram. Then when it is too big to fit on the screen, it is erased and rescaled. If you set limits before the MONITOR command, they are used to determine the scale of the histogram. The histogram is not automatically rescaled, if the limits are picked or if RESCALE=OFF. (Default:ON) 15.47.15 SECTION Selects the global section to monitor. If SECTION="" then the current one is used. If neither FILE nor SECTION are specified then section is assumed unless FILE has been specified in a previous MONITOR HISTOGRAM or SET HISTOGRAM command. SEE:TOPDRAWER LINK 15.47.16 SCAN Displays all selected histograms, in order. The screen is cleared between each update. This allows you to look at more than 20 histograms. (Default:OFF) 15.47.17 SKIP SKIP=n Skips the first n histograms which meet the selection criteria. 15.47.18 STATISTICS Puts histogram overflow/underflow and sum on the line below the top title. 15.47.19 SHOW Adds the hist ID to the lower right corner of each window below the X title. (Default:ON) 15.47.20 TIME Adds the time to the lower left corner of the display. (Default:ON) 15.47.21 TREE Search the directory tree from the current directory for histograms to monitor, that match the selection criterions. (Default:OFF) 15.47.22 WINDOWS Selects the maximum number of windows to use. You may specify any number from 1 to 20. (Default:20) 15.48 MORE Adds more text after the last title with the same parameters as the last title. It may also be modified by a matching CASE command, see TITLE. MORE 15.49 MULTIPLY MULTIPLY [Y|Z] [FROM|TO] [EWEIGHT=n] [WEIGHT=n] {n1|"name1"} [BY] {n2| "name2"|FIT} [APPEND[=ON|OFF]] [NAME="name"] [CHECK[=ON|OFF]] [ERROR[=ON|OFF]] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES| ROWS=[FROM] n1 [TO] [n2]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [LOG[=ON|OFF]] [VECTOR[=ON|OFF]] This multiplies the (Y/Z) values in data set n1 by data set n2. The result is a modified set n1. You may not multiply mesh data by normal 2-d data. 15.49.1 APPEND If APPEND is specified, then a new data set is created, containing the result and set n1 is unchanged. 15.49.2 CHECK CHECK=OFF turns off data set checking. When CHECK=ON both data sets must have identical X (and Y if mesh) values, but data set n2 may contain more points than n1. If (DX/DY) is non zero then the both DX and X must be identical within 1% of DX. If you have data sets with non identical values of X you may create a set with identical values using the BIN command. If the X values of 2 data sets are not quite identical. You may force TOPDRAWER to multiply them by setting DX for the data 100 times greater than the difference in X or by setting CHECK=OFF 15.49.3 ERROR ERROR=OFF excludes the errors from the FIT in the computation. (Default:ERROR=ON) 15.49.4 FIT Specifies that the data set is to be multiplied by the last FIT. See:Command FIT. 15.49.5 LIMITED You may specify the limits over which the histograms are to be multiplied. If you specify the Y or Z limits, then all data that contains values inside these limits will be multiplied. For example if you MULTIPLY 1 to 2 LIMITED FROM Y=10 to Y=11 But data set 1 contains the followind data: 1,0; 2,10; 3,0; 4,11; 5,0 Points 2 to 4 inclusive will be multiplied, and only points 1 and 5 will be omitted. 15.49.6 LOG If LOG is specified then the result of the command is typed on your terminal. 15.49.7 VECTOR The DX,DY,DZ's will be cross multiplied together assuming they form a vector. The X,Y,Z are not changed, and they should match for both input data sets. 15.49.8 WEIGHT-EWEIGHT WEIGHT=n specifies a weighting factor to multiply the data by before adding or subtracting it. EWEIGHT=n specifies the error on WEIGHT. This option must precede the data set number. 15.49.9 Notes The new value is Y3=Y1*Y2. The errors (DY) are treated as if the data sets are uncorrelated. DY3=Y3*SQRT((DY1/Y1)**2+(DY2/Y2)**2) See:Command ADD,DIVIDE. 15.50 NEW_FRAME NEW [FRAME|PLOT] [RESET] [ALIAS=alias] "Comment about plot" Starts a new picture. Untreated points are PLOTTED before going on. The old data points are retained until new ones are read. Parameters are returned to the default values. If the plot device is interactive and you are executing commands inside a file the program prompts: PAUSE: You press the "Return" key to start the next plot. If instead of "return" you type in STOP, TOPDRAWER will stop executing the input file and return to command level. You can also type EXIT, QUIT, HALT, END, or Ctrl_Z instead of STOP. If you press Ctrl_C then TOPDRAWER will skip input until another STOP command is encountered, or the file ends. Pressing Ctrl_C twice rapidly in succession will abort all file input. Pressing Ctrl_C twice rapidly in succession again will cause the program to ask you if you wish to abort. 15.50.1 ALIAS Each picture is given the name PICT001, PICT002 etc., but they may be given an alias name. If the name is "" then name is Plot0001, Plot002 ... 15.50.2 Comment The "Comment on plot" is typed on your terminal, or written to the log file. 15.50.3 RESET This option resets all PERMANENT options to their original defaults. For example you have: TD:SET LIM FROM 1,2 TO 3,4 PERMANENT The RESET option will set them back to the default of no limits. note The STORAGE is not reset back to the default, and the existing data is not modified. 15.51 NDU This set the value of the negative error on U. See command X. 15.52 NDV This set the value of the negative error on V. See command V. 15.53 NDW This set the value of the negative error on W. See command X. 15.54 NDX This set the value of the negative error on X. See command X. 15.55 NDY This set the value of the negative error on Y. See command X. 15.56 NDZ This set the value of the negative error on Z. See command X. 15.57 PAUSE {PAUSE|WAIT} ['String'] [FOR n] This causes TOPDRAWER type the string and PAUSE. This only works in a file or inside a repeat block. You press the "Return" key to continue. If instead of "return" you type in STOP, TOPDRAWER will stop executing the input file or repeat block and return to command level. You can also type EXIT, QUIT, HALT, END, or Ctrl_Z instead of STOP. You may also use SET and SHOW commands while paused. 15.57.1 FOR If FOR n is specified then TOPDRAWER will wait for n seconds, then resume normal execution. n may be in the range 0 to 200. (Default:10) example TD:REPEAT "NEW;SET HIST NEXT;HIST;WAIT FOR 10" 10 Gets the next histogram, plots it, then waits for 10 seconds before plotting the next one. 15.58 PLOT Plots the data as a series of points or symbols PLOT [EXPAND[=ON|OFF]] [AXES|GRID] [OUTLINE] [TABLE] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [SLICES [X|Y|Z] [FROM] v1 [[TO] v2]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [CURSOR] ] [TITLE[=ON|OFF]] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [CYCLE[=ON|OFF]] [[NO]SYMBOL[=sym]] [SIZE=n] [[X|Y|X]ERRORS[=ON|OFF]] [FILL[=ON|OFF]] Data plot options [VECTOR[=ON|OFF]] Mesh (scatter) plot options [[NO]RANDOM[=n]] [VARIABLE[=ON|OFF]] [COUNTS] Non data options [OUTLINE] [AXES] [GRID] [GRID] The data points are plotted as a series of symbols with error bars. The options AXES, OUTLINE, and GRID allow you to add specified elements to a plot. TABLE plots the actual values for the data as a set of numbers. 15.58.1 Options 1. AXES - Plots axes (if enabled). You may specify where to draw the ticks. 2. GRID - Plots a grid with specified locations. 3. COUNTS - Controls the number of symbols/bin for a scatter plot 4. EXPAND - Sets the limits so the specified set fills the window 5. FILL - Fills in the symbols that are plotted. 6. INTENSITY - Sets the intensity of the plot 7. LIMITED - Limits the plot to a specified range of X,Y,Z 8. [X|Y|Z]ERRORS=OFF - Disables error bars. 9. RANDOM - Controls the number of symbols/bin for a scatter plot 10. OUTLINE - Draws an outline around the plot (if enabled) 11. SETS - Selects the data sets to plot 12. SLICES - Selects the mesh data points to plot in 2-d. 13. [NO]SYMBOL - Selects the SYMBOL to use when plotting. 14. SIZE - Selects the symbol size. 15. TABLE - Plots the values of the data points as numbers. 16. VARIABLE - Enables symbol sizes proportional to the value for scatter plots. 17. VECTOR - Plots data as a vector field. (DX,DY,DZ)=vector 18. WHITE... - Selects the color of the plot. 19. SOLID... - Selects the texture of the plot (error bars) 15.58.2 AXES|GRID PLOT {AXES|GRID} [AT [x [y [z]]]] [[TOP|BOTTOM|RIGHT|LEFT|X|Y|Z] [[LABELS|TICKS] [SHORT|LONG] [n1,n2,n3.....] [FROM n TO n BY n N n] [FFORMAT|GFORMAT|EFORMAT|YERS |MONTHS|DAYS|TIME]] Puts Axes and grid on the plot, but does not plot points. This command is not usually necessary as axes are added to the picture when the first PLOT, HISTOGRAM, or JOIN command is executed. If you use this command before a PLOT, HISTOGRAM or JOIN command, then the automatic axes are not produced. The limits of the axes are determined either from the existing data or from the the SET LIMITS command, or by the LIMITED options. The format of the axes is determined by the SET AXES command. The origin of the axes may be specified after the option AT. This command is mainly useful for special graphs where 2 sets of axes with different scales are needed. This is also used to plot axes on a 3 dimensional plot where x,y,z specify the origin of the axes. 3-d plots do not automatically produce axes, so you must use the PLOT AXES command. The origin may also be specified by the command SET THREE. If not already specified by SET AXES, LABELS, or TICKS commands, the color, texture, and intensity options will be used in plotting the axes. 15.58.2.1 AT - This allows you specify the data X,Y,Z at which the axis is plotted. 15.58.2.2 FROM|TO|BY|N - You may specify a range of ticks with FROM,TO,BY,N. You may specify any 3. example TD:PLOT AXES X FROM 1 TO 10 BY 2 or... TD:PLOT AXES X FROM 1 BY 2 N=5 Draws ticks at 1,3,5,7, and 9. 15.58.2.3 GRID - If specified without the option AXES then a GRID is plotted. The grid must be ON to be plotted. See SET GRID. If AXES is specified, then both are plotted if the GRID is ON. Grid lines or symbols are plotted only for long ticks. example TD:SET GRID ON TD:PLOT AXES Y 0 X 2,4,6,8 ticks 1,3,5,7,9 The grid is plotted at ticks 2,4,6,8 on the X and 0 on the Y. An axes is also plotted with labels at X=2,4,6,8 Y=0, and short ticks at X=1,3,5,7,9. TD:PLOT GRID Y 0 X 2,4,6,8 Only a grid is plotted. 15.58.2.4 HIDE - Controls whether hidden lines are drawn for a 3-d axes and grid. HIDE=OFF draws the hidden lines, while HIDE=ON omits them. This assumes that the axes are drawn in the normal position behind the plot. It may not work properly for other positions. You must specify which axes are to be plotted. (Default:HIDE=OFF) example For example histogram a mesh with hidden axes: TD:HISTOGRAM ( Hist mesh data) TD:PLOT AXES X Y Z HIDE ( Now plot only visible portion of axes) 15.58.2.5 TOP... - Produces only a single axes at the TOP according to n1,n2.... You may also produce the axes to the LEFT,RIGHT, or BOTTOM. For 1-d plot X produces both TOP and BOTTOM axes, Y produces both LEFT and RIGHT, while Z produces only TOP. On 3-d plots they produce X,Y, or Z axes. The axes are not produced if disabled by the SET AXES command. After this option the tick values are assumed to be LABELS LONG. 15.58.2.6 LABEL|TICK - LABEL selects long ticks with labels. TICKS selects short ticks without labels. Labels or ticks are not produced if disabled by the SET LABELS or SET TICKS command. 15.58.2.7 LIMITED - If this option is used it may be used to specify the length of the axis, with respect to the data. 15.58.2.8 LONG|SHORT - Selects either long or short ticks. This must be used after the LABEL or TICK command it modifies. 15.58.2.9 FORMATS... - These determine the number format. They are analogous to FORTRAN formats. 1. FFORMAT - Numbers are written as nn.nnn or nn The number of digits to the right or left of the decimal point is determined by the data. All labels for a selected axis are written with the same number of digits to the right of the decimal point. 2. GFORMAT - Numbers are written as either F or E format depending on the range. For example if you specify labels from 0 to 1 by .25 they are written as. 0,0.25,0.5,1 3. EFORMAT - Labels are written as n.nn with an exponent power of 10. 4. YEARS - Only the year is written 5. MONTHS - The month is written 6. DAYS - The day of the month is written 7. TIME - The time is written. 8. DATE - The date is written in the format dd-mmm-yyyy. (Default:GFORMAT) NOTE If the format is not G,F,or E then SMALL ticks are not reproduced for labels. This allows you to place the label in any location without any ticks. 15.58.2.10 N1... - These select the tick/label locations. If omitted then a set of default ticks and labels are chosen. These are selected according to the SET LABELS and SET TICKS commands. 15.58.2.11 Restrictions - You may not specify more than 200 total ticks at one time. If you need more than 200 ticks you need to plot AXES several times. example TD:PLOT AXES X FROM 1 TO 10 by 0.002 generates 500 ticks, and is not allowed. 15.58.2.12 Examples - example TD:PLOT AXES Plot all axes with the current defaults. TD:PLOT AXES X Produces default TOP and BOTTOM axes. TD:PLOT AXES X LABELS 1,2,3,4 TICKS 1.5,2.5,3.5 Produces labels at 1,2.. and short ticks at 1.5,... TD:PLOT AXES RIGHT EFORMAT LABELS 1,2,3,4 TICKS LONG 1.5,2.5,3.5 Produces the same labels, but in exponential format with long ticks in between the labels. TD:PLOT AXES BOTTOM LABELS 1,2,3 TOP 1.5,2.5 Produces labels with long ticks on the top and bottom of the plot. The labels are at different locations. TD:PLOT AXES X LIMITED FROM X=1 Y=5 TO X=11 LABELS 1,5,11 This plots an X axis from X=1 to 11 Y=5 with labeled ticks at 1,5,11. 15.58.3 COUNTS This sets the number of DOTS=ZMAX-ZMIN. This is for data that consists of counts versus X,Y. ZMIN,ZMAX are either automatically set by the data set, or by the SET LIMITS command. 15.58.4 CYCLE When plotting more than 1 data set, CYCLE causes the line symbol, texture, color, and width to vary from one plot to the next. The cycle table is set by the SET CYCLE command. If you have specified either symbol, texture, color or width it overrides the cycle values. When doing a scatter plot of a mesh, CYCLE causes the symbol, line color and width to vary according to the cycle table. When plotting a mesh table the color and width of each number will vary according to the CYCLE TABLE. 15.58.5 EXPAND Sets the limits so that the selected data expands to fill the window. This has no effect unless POINTS, SETS, SLICES are specified or the limits on MESH data have been set by a SET LIMITS command. See:SET MODE 15.58.6 FILL Fills the symbols to make them "more solid". You will have to use the command SET FILL to achieve the desired effect. Many symbols can not be filled properly, so you must just try until you find a satisfactory one. Of the normal ASCII character set the "0O8SZ$" look pretty good when filled. The centered symbol 1o, 2o, 6o, 8o look good when filled. 3o and 4o look bad when filled, while the rest to not fill at all. 15.58.7 INTENSITY INTENSITY=n sets line intensity or width (1-5). 15.58.8 LIMITED This plots only those data points that fall within the specified X,Y,Z limits. If no limits are specified, then the limits used are those set by the SET LIMIT command. This option has no effect on the density of dots or symbol size. If a singe axis is plotted, then the limits determine the location and length of the axis. example TD:PLOT LIMITED FROM 1,2,3 TO 4,5,6 Only points where 1<=X<=4 2<=Y<=5 3<=X<=6 are plotted. example TD:PLOT LIMITED FROM Z=.5 to Z=10 Only points where 0.5<=Z<=10 are plotted. TD:PLOT LIMITED FROM Y=.01 Only points where 0.01<=Y are plotted. example TD:PLOT LIMITED FROM CURSOR TO CURSOR The cross hair cursor appears on the screen. You move it to the lower X,Y and press the space bar. Then move it to the upper X,Y and press the space bar again. The points plotted will lie within the limits you set. 15.58.9 ERRORS This selects plots with or without error bars. ERRORS=OFF plots without any errors, while XERRORS=OFF only omits the X error bars. Similarly YERRORS=OFF or ZERRORS=OFF omit the Y or Z error bars. (Default:ERRORS=ON) If you wish to modify the appearance of the error bars see the command: SET BAR. This modifies the size of the bar at the end of the errors. If the negative error bars are defined they are subtracted from the data. 15.58.10 RANDOM RANDOM=n - Sets the maximum number of points per bin for a scatter plot (3-d) If RANDOM is not specified The number of points in a bin is the value in the bin-Zmin+1. The default RANDOM is limited to the range 1 to 10. If Zmax is less than 1.0 then the default RANDOM is set to 5. No points are produced when the data equals ZMIN. Zmin for a scatter plot is zero unless set by a SET LIMITS command. If the contents of the bins range from 0 to 100 and RANDOM=10, Then each dot represents the value 10. Any bin with values less than or equal to 0 will have no points plotted. 0.00001 to 10.0 will get 1 dot, 10.00001 to 20 will have 2 dots and so on. If the Z axis is logarithmic then the number of points will be proportional to ALOG10(Z)-ALOG10(ZMIN). NORANDOM modifies a scatter plot so that only one point is plotted in the center of each bin. This option should be used with either the option LIMITED or VARIABLE. 15.58.11 SOLID... Selects the texture of the plot. This doesn not change the plotted symbol. Error bars may be drawn as dotted or dashed. 15.58.12 LINES|ROWS For 3-d plots specifies which lines or rows of the mesh data to list. 15.58.13 OUTLINE Plots the outline around the plot. Sections of the outline which are disabled by the SET OUTLINE are not plotted. If not already specified by SET AXES, or OUTLINE commands, the color, and intensity may be specified by the PLOT OUTLINE command. 15.58.14 POINTS|COLUMNS Specifies the range of points or the colums of a mesh to use. For 3-d this is the range of column numbers. 15.58.15 SETS This selects the data set to plot. The data must be broken up into sets using the data set command, for this option to work properly. If n2 is omitted it is assumed to be n1. You may specify the data set number or the options FIRST,LAST. 15.58.16 SLICES This scatter plots either a single slice or several slices from mesh data. If THREE is OFF the first X,Y,Z determines the view along either the X,Y, or Z axis. See HISTOGRAM for more details. 15.58.17 SYMBOL SYMBOL=sym specifies the symbol to use for plotting data. Any legal UGSYS symbol may be used. Points that do not already have a symbol are normally plotted using the default symbol (See:Command SET SYMBOL). The symbol you specify is used instead of the default. You may change the color and intensity of a symbol, but it may not have a changed texture. You can not plot symbols dotted or dashed. NOSYMBOL specifies that all points are plotted with the default symbol, or the selected SYMBOL instead of the symbol assigned to each point. If you want a centered symbol use 0o, 1o, 2o, 3o, 4o, 5o, 6o, 7o, 8o, or 9o. Some characters from the ASCII character set are also suitable. "08OXNSYZ$*" are all possible characters which are centered and reasonably symmetrical. Lower case characters are too far below the center of the point. 15.58.18 SIZE SIZE=n is the size of the symbol to plot. If unspecified the default size is used. See:Command SET SYMBOL. 15.58.19 TABLE Options PLOT TABLE [AT] [ABSOLUTE] [DATA] [VALUE] [TOP] [OFFSET=n| [CURSOR]] regular data points, the value of the dependent variable (Z or Y) is drawn along the X axis as a number at the angle -90 degrees. Mesh data is plotted as a table of numbers centered on the mesh points, The number is plotted horizontally. The size of the numbers is adjusted to fit within the available space with a maximum size equal to the label size. You may select the size by using the SIZE=n option. Options 1. OFFSET=n moves the table up or down by the selected offset. Normally it is specified in inches from the bottom data axis. 2. DATA - The offset is specified in data units. 3. VALUE - The offset is from the value of the data point. 4. TOP - The offset is down from the top data axis. 5. CURSOR - The cursor is used to select the offset. 6. ABSOLUTE - The offset is an absolute value from the bottom of the window. 15.58.20 VARIABLE This modifies scatter plots so that the size of the symbol is proportional to Z-ZMIN. Normally this is used with the options SIZE, NORANDOM, and VARIABLE. 15.58.21 VECTOR This plots regular data as a vector field. Each data point is plotted as an arrow with the tail located as (X,Y[,Z]) and the head at (X+DX,Y+DY[,Z+DZ]). The arrow head has a width equal to the BAR size. 15.58.22 WHITE... WHITE, RED, BLUE, GREEN, YELLOW, CYAN, or MAGENTA sets the line color. 15.58.23 3-d Mesh data produces a scatter plot if THREE is off and the dependent axis is Z. If the dependent axis is Y or X then a series of slices are plotted of mesh data. The scatter plot is truncated with zero dots for data equal to ZMIN, and the maximum number of dots at ZMAX. The options SYMBOL, DOTS, COUNTS, NORANDOM, and VARIABLE are used to control the look of the scatter plot. In addition by setting the Z limits and using the LIMITED option you can control which data is plotted. If the dependent axis is not correct for the desired type of plot use the SWAP command to change them. Example TD:PLOT SYMBOL=1O SIZE=10 NORANDOM VARIABLE Plots the selected symbol in varying sizes. It is 1.0" at ZMAX and nothing is plotted at ZMIN. TD:SET LIM ZMAX=4; PLOT BLUE LIMITED or... TD:PLOT BLUE LIMITED TO Z=4 TD:SET LIM ZMIN=4; PLOT RED LIMITED or... TD:PLOT RED LIMITED FROM Z=4.0001 Points Z=4 and lower are plotted in BLUE. Points above 4 are RED. The default for PLOT is THREE off. 15.59 PROJECT PROJECT [ADD|AVERAGE] [INTEGRATE[=ON|OFF]] [SPLIT[=ON|OFF]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] {X|Y|Z}=[v| FROM v1TOv2[BYv3|N=n]]} [...] [APPEND[=ON|OFF]] [NAME="name"] [LOG[=ON|OFF]] Forms 1 or more projections of mesh data parallel to one of the axes. DX is set to half of the bin width and Y is either the sum or average over the mesh values. If available Z=the mean over the summed coordinate. This forms the projections from all selected mesh data. 15.59.1 ADD|AVERAGE ADD|AVERAGE specifies whether the data is added or averaged to form the projection. The default is to ADD the data. This option must precede the X,Y,Z that it modifies. 15.59.2 APPEND If APPEND is specified, then a new data set is created, containing the result and the original data is unchanged. 15.59.3 INTEGRATE This produces a projection of the area under the curve. The projection is the SUM( DY*Z ) if Y is specified. If AVERAGE is also specified then the projections is divided by the SUM( DY ). This option must precede the X,Y,Z that it modifies. 15.59.4 SPLIT SPLIT=ON splits channels to preserve the total sum over the projections. For example X channels run from 0 to 1, 1 to 2 ... 9 to 10. TD:PROJECT X FROM 0 TO 10 BY 2.5 Will produce 4 projections, but the sum over all projections will not be equal to the original sum. TD:PROJECT SPLIT X FROM 0 TO 10 BY 2.5 Produces a set of projections and preserves the sum. (Default:SPLIT=OFF) 15.59.5 X|Y|Z This specifies the axis to project along. If you specify v then only the row/column corresponding to v is projected. If specified v1 and v2 may select a range of values to project. If no values are specified then the entire mesh is projected. If BY=v3 is specified then a series of projections are made from v1 to v2 with a width of v3. If N=n is specified then the range from v1 to v2 is split into n equal intervals. You need not use this command if you wish to histogram only a single slice. The SLICE modifier on the HISTOGRAM, or JOIN commands may be used. If X,Y, or Z are repeated then extra data sets are defined with projections. 15.59.6 LOG Each projection is listed on your terminal as it is formed. 15.59.7 SETS This selects the data sets to project. If n2 is omitted it is assumed to be n1. You may specify the data set number or the options FIRST,LAST. All mesh data between n1 and n2 are projected. 15.59.8 Examples You read in a mesh of X,Y vs Z. TD:PROJECT Y FROM 5 TO 10 Projects the Y slices corresponding to Y=5 to 10 onto the X axis, and 2-d array of values is stored. The new array of values is the sum of all Z values corresponding to the range of Y values. The mesh data is destroyed. TD:PROJECT Y FROM 5 TO 10 BY 2 Makes 3 projections from 5 to 7, 7 to 9, and 9 to 10 TD:PROJECT X Y APPEND TD:SET WINDOW X 1 of 2;HIST SET <SETS-1>;TITLE BOTTOM 'X axis' TD:SET WINDOW X 2 of 2;HIST SET LAST;TITLE BOTTOM 'Y axis' TD:DELETE SETS FROM <SET-1> Projects both X and Y. The projection along the X axis is in data next to last data set while along Y is in the last set. Both projections are then histogrammed in separate windows. Finally the projections are deleted. Note: This assumes only 1 mesh data set exists. If n mesh sets exist then 2n projections will be formed. TD:PROJECT X 1 2.5 X 3 5 X 6 10;HIST Projects 3 different bands of data along the X axis. All 3 projections are then histogrammed. 15.60 READ READ POINTS - Reads in data to be plotted READ MESH - Reads in 3-d data to be plotted 15.60.1 POINTS READ POINTS [APPEND=ON|OFF]] [SET] This reads in data to be plotted. Once data is read, it is retained until it has been used to generate a plot. It is then discarded when new data is read. Normally you plot the data immediately after reading it. When you start a new plot, the data last plotted is still available for replotting. It is not discarded until new data is read. The option APPEND allows you to append more data to the already plotted data. The option SET starts a new data set. If you do not specify a symbol when reading points, the default is determined by the last SET SYMBOL command. This command is not necessary, since TOPDRAWER assumes that a number not preceded by a command is automatically a point. If you wish to read data with the symbol as the first item, you must use the READ DATA command, and terminate the data with a blank line. Values that are omitted are initially set to 0.0, or to the previous value for that field. When reading in data <XVALUE>, <DXVALUE>, <YVALUE>, ... are the X, DX, Y, ... values from the previous point. 15.60.1.1 Examples - TD:SET ORDER X Y SYMBOL DX DY TD:0 2 TD:1 4 1o 0.5 0.1 TD:2 8 Produces a data set with The following data: X=0 Y=2 DX=0.0 DY=0.0 Symbol="" X=1 Y=4 DX=0.5 DY=0.1 Symbol="1O" X=2 Y=8 DX=0.5 DY=0.1 Symbol="1O" TD:SET ORDER SYMBOL X Y TD:READ POINTS 1O 1,1; TD:2O 2.5,3.8 TD:(blank line to terminate) 15.60.2 MESH READ MESH [BINS] [APPEND[=ON|OFF]] [WITH] [ERRORS[=ON|OFF]] [FOR] {X|Y|Z}[=] N1,...,Nn [nn+1 ENDBINS] [FOR] {X|Y|Z}[=]nn {X|Y|Z}[=] N1,...,Nn [FOR] {X|Y|Z}[=]nn {X|Y|Z}[=] N1,...,Nn ................ [[FOR] {X|Y|Z}[=]nn ENDBINS] or instead of N1,...Nn [[FROM=n] [TO=n] [BY|WIDTH|STEP=n] [N=n]] You must specify the points as an array of X,Y,Z values. If the attribute BINS is selected you specify the edge of the bins rather than the center of the bins and the optional END marks the end of the data. 15.60.2.1 APPEND - This creates a new data set containing mesh data. If not specified or APPEND=OFF, all existing data will be deleted. 15.60.2.2 ERRORS - Storage is allocated for DX,DY,DZ. You must enter the errors following the values for the dependent variable. The errors on the independent variables are equal to the bin width. example READ MESH WITH ERRORS FOR X=1,2,3 FOR Y=5 Z=5,.5,6,.2,7,.1 FOR Y=8 Z=9,.1,8,.1,7,.1 15.60.2.3 Bin_spacing - The points/bins must be strictly monotonically spaced along the axes for good results. If a histogram has unequal size bins, the last bin edge should be specified with the option END. If this is not done, the bins may not be properly represented. If bin edges are not specified, The bin edges are half way between the points. Mesh points are assumed to be centered within each bin. 15.60.2.4 Point_example - To Read in an array of 3 dimensional data READ MESH Y y1 y2 .... yn X x1 Z z11 z21 ... zn1 X x2 Z z12 z22 ... zn2 ............... X xm Z z1m z2m ... znm or... READ MESH FOR X= x1 x2 .... xn FOR Y=y1 Z=z11 z21 ... zn1 FOR Y=y2 Z=z12 z22 ... zn2 ............... FOR Y=ym Z=z1m z2m ... znm 15.60.2.5 Bin_example - To Read in a 4 by 4 array of 3 dimensional data READ MESH BINS FOR Y=0.0 1.0 2.0 3.0 X=0.0 Z= 0 0 0 0 X=1.0 Z= 0 1 2 3 X=2.0 Z= 1 2 3 4 X=3.0 Z= 2 3 4 5 Is the same as: READ MESH FOR Y=0.5 1.5 2.5 3.5 X=0.5 Z= 0 0 0 0 X=1.5 Z= 0 1 2 3 X=2.5 Z= 1 2 3 4 X=3.5 Z= 2 3 4 5 or...... READ MESH BINS FOR Y=0.0 1.0 2.0 3.0 4.0 ENDBINS X=0.0 Z= 0 0 0 0 X=1.0 Z= 0 1 2 3 X=2.0 Z= 1 2 3 4 X=3.0 Z= 2 3 4 5 X=4.0 ENDBINS 15.61 REPEAT TD:REPEAT "commands" [n] [FAST[=ON|OFF]] This repeats the specified commands n times. The commands must be specified as a string. If n is omitted is assumed to be 9999. ENDREPEAT terminates all current repeats, while RETURN terminates the current repeat. You may nest up to 5 repeat commands. If FAST is specified only the repeat command is journaled otherwise each repeat is journaled separately. If you abort the repeat with CNTRL_C, or use the cursor inside a repeat and it is in FAST mode, the journal file will not be correct. The lexical V_REPEAT[n] is the repeat number NOTE: The command SET FILE INPUT should not be used inside a repeat block. The lines from the new file will not be executed until after the repeat. (Default:FAST=ON) 15.61.1 Examples TD:SET WINDOW 1 of V_SETS TD:REPEAT "HIST SET=V_WINDOW;SET WINDOW NEXT;" V_SETS produces histograms of all currently available data sets. TD:DEFINE VALUE THETA=0 TD:DEFINE COMMAND INCR="DEV VAL THETA=<V_THETA +1>;" TD:DEFINE COMMAND LEND="IF THETA .GT. 180.1 ENDREPEAT" TD:REPEAT "V_THETA,<SIN(V_THETA)>;INCR;LEND" or... TD:REPEAT "V_THETA,<SIN(V_THETA)>;INCR" 181 Produces a SINE function from 0 to 180 degrees in 1 degree steps. This example breaks the command into small separate commands. This is not really necessary since the total length of a command may be 256 characters. TD:REPEAT "<V_REPEAT-1>,<SIN<V_REPEAT-1>>" 181 Also generates a sine function from 0 to 180 degrees, in a much faster fashion. 15.61.2 Warning NOTE This command is very slow if FAST=OFF and JOURNALING is enabled. 15.62 RESTORE RESTORE {DATA|FIT|HITOGRAMS} [options] Restores the selected data, fit, or histograms. 15.62.1 DATA RESTORE DATA [FILE=file_name] [APPEND[=ON|OFF]] [CONFIRM[=ON|OFF]] [LOG[=ON|OFF]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] Restores data from the specified file. If no file is specified TDSAVE.TDB is assumed. If you have unplotted data then the new data is automatically appended to the end of the current data as a new data set. The LOG option types the number of points and sets of data restored. When restored the data name is in lexical S_DATA_NAME. 15.62.1.1 APPEND - Normall the current data is deleted. If APPEND is selected, the new data is sets are appended to the current ones. 15.62.1.2 CONFIRM - You are asked whether you wish to restore each set. 15.62.1.3 SELECT - If the data sets are named, you may select the data set by name. 15.62.1.4 SETS - If the data file contains several sets of data you may select which one you wish to restore. TD:RESTORE DATA SET=5 Restores the 5'th data set from the file. TD:RESTORE DATA SET 5 TO 8 Restores the 5'th through the 8'th data set from the file. 15.62.2 FIT RESTORE FIT [FILE=file_name] [LOG[=ON|OFF]] Restore the current Topdrawer fit from a file. If no file is specified TDFIT.TFB is assumed. The SAVE command is used to save a fit. 15.62.3 HISTOGRAMS RESTORE HISTOGRAMS [IDENT=[FROM] [n] [TO n]] [FILE|SECTION=name] [{FETCH|READ|INPUT]}] [ADD|SUBTRACT|MULTIPLY|DIVIDE] [AREA|DIRECTORY[="directory"]] [RELATIVE=[=ON|OFF]] [SHARE=[=ON|OFF]] [TReE[=ON|OFF]] [IOFSET=n] [APPEND] [VERSION=n] Restores histograms from files create by the HBOOK package. FETCH,READ get histograms in the old HBOOK3 format. Normally you do not need to specify FETCH or READ as TOPDRAWER uses the file type to determine the operation needed to restore it. 15.62.3.1 Options - 1. AREA selects the directory of the disk file/global section. If this is unspecified then the subdirectory on the file/global section is assumed to be the same as specified by the previous SET HIST AREA command. 2. FETCH is for histograms stored in machine dependent HBOOK3 format by HSTORE. Either all histograms or 1 histogram ID may be fetched. 3. FILE=file_name selects the file name or global section name for the shared histograms. If FILE is not specified then it defaults to HBOOK.BIN. If the filename is NONE then no file name is selected. 4. IDENT Selects the ID of the histogram to get. If unspecified all histograms are fetched. 5. INPUT gets histograms from a direct access file in HBOOK4 format. This is the default. NOTE Topdrawer checks the file and will try to figure out whether to FETCH, READ, or INPUT the file. 6. READ is for the machine independent HBOOK3 format. 7. RELATIVE saves histograms in a relative file for faster access. Otherwise a sequential file is used. (Default:RELATIVE=OFF) 8. SECTION gets histograms from the specified global section. If SECTION="" the current section is used. SEE:TOPDRAWER LINK 9. SHARE shares the file with other users. SHARE=OFF prohibits file sharing. (Default:SHARE=ON) 10. VERSION Selects the cycle (version number) of the histogram to get. (INPUT only) 11. IOFSET is added to the hist ID when fetched. (INPUT only) 12. APPEND Sets IOFSET=largest hist ID. 13. ADD adds the new histograms to the current ones. Normally all in the current directory are deleted. ADD works only with INPUT, or with Global sections. NOTE: If you have a large number of histograms resident, you may not have enough memory to RESTORE ADD all at once. You may force TOPDRAWER to add one at a time by: RESTORE HISTOGRAM ADD ID FROM 1 TO 99999 14. SUBTRACT,MULTIPLY,DIVIDE works in a similar fashion to ADD. SUBTRACT subtracts the new histogram from the old one... These do not work for HBOOK3 histograms. 15. TREE restores the entire directory tree. (INPUT/SECTION only) If this is selected along with AREA it is possible to graft a file resident directory tree to a new root. 15.63 SAVE SAVE {DATA|FIT|HITOGRAMS} [options] This command saves things. SAVE DATA saves the Topdrawer data in a binary format on disk. SAVE HISTOGRAM saves foreign histograms on disk. 15.63.1 FIT SAVE FIT [FILE=file_name] [LOG[=ON|OFF]] [NAME="name of data"] Saves the current Topdrawer fit in a file. If no file is specified TDFIT.TFB is assumed. The optional NAME is stored in the file as a comment. The RESTORE command is used to get saved fit. 15.63.2 DATA SAVE DATA [FILE=file_name] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [SLICES [X|Y|Z] [FROM] v1 [[TO] v2]] [NAME="name of data"] [APPEND[=ON|OFF]] Saves Topdrawer data in a file. If no file is specified TDSAVE.TDB is assumed. By specifying the range of points, sets and so on you may select which data is saved. The optional NAME is stored in the file as a comment. APPEND adds the data to the end of an existing file. The RESTORE command is used to get saved data. NOTE: If the data contains NDX,NDY, or NDZ coordinates, it can not be used with older verson of TD. 15.63.3 HISTOGRAMS SAVE HISTOGRAMS [FILE=file_name] [IDENT=[FROM] [n] [TO n]] [ENTRIES[=ON|OFF]] [HISTOGRAM[=ON|OFF]] [RELATIVE=[=ON|OFF]] [SHARE=[=ON|OFF]] [RECLENGTH[=n]] [SELECT|NAME='hist_name'] [{WRITE|STORE}] [UPDATE[=ON|OFF]] [AREA|DIRECTORY[="directory"]] [TReE[=ON|OFF]] Saves the foreign histograms. Some options apply only to specific histogram packages. 15.63.3.1 Options - 1. AREA|DIRECTORY selects the base directory of the disk file. If this is unspecified then it is assumed. to be the same as specified by the previous SET HIST AREA command. 2. ENTRIES selects only histograms with entries. 3. FILE=file_name selects the file name. If FILE is not specified then it HBOOK.BIN. If the filename is NONE then no file name is selected. 4. HISTOGRAM|MESH selects only regular histograms or scatter plots. 5. RECLENGTH specifies the record length for an RZ file. (default:1024 Words) 6. RELATIVE saves histograms in a relative file for faster access. Otherwise a sequential file is used. This works only for HBOOK V4.10 on a VaX. (Default:RELATIVE=OFF) 7. SELECT selects the name of the histograms to store. 8. SHARE shares the file with other users. SHARE=OFF prohibits file sharing. This works only for HBOOK V4.10. (Default:SHARE=ON) 9. UPDATE=ON saves histograms in an existing file. UPDATE=OFF saves histograms in a new file. 10. TREE saves the entire directory tree. (OUTPUT,PUT only) (Default:UPDATE=OFF) 15.64 SET Sets options for plots. These options usually revert to the default when a new plot is started. 15.64.1 Introduction The set commands are used to set options. Most set commands set the option for the duration of the current plot. When a NEW command is issued, the options revert to the default. You may make the current option the default by using the option PERMANENT. If no options are specified for the set command, the options are set back to the original default value. For example you wish to do a series of plots with the same limits on the X,Y scales. Normally TOPDRAWER sets the limits automatically according to your data, so you use the command: TD:SET LIMITS X FROM 0 TO 10 Y FROM 0.5 to 1.5 PERMANENT which sets the limits permanently. When you have done the plots you wish to revert to the original default: TD:SET LIMITS Now the limits are reset to automatic limits for the current plot only. The next plot will have the PERMANENT limits. To have automatic limits for all subsequent plots you must: TD:SET LIMITS;SET LIMITS PERMANENT After using a set command you may "see" what you have done with a SHOW command. For each set command there is a SHOW command which shows the current options. For example you may see the limits you have modified by: TD:SHOW LIMITS 15.64.2 Options 1. ARROW - Sets default arrow format 2. AXES - Sets default axis 3. BAR - Sets size of ends of error bars and a break in error bars 4. BOX - Sets default box size 5. BLINK - Sets the BLINK attribute. 6. CARD - Maximum length of input lines 7. CHARACTER - The character set used 8. CIRCLE - Same as SET ELLIPSE 9. CLEAR - Selects deferred or immediate screen clearing 10. COLOR - Sets default color or pen number 11. Ctrl_Z - Enables or disables the Ctrl_Z key. 12. CYCLE - The color,width, texture to cycle through. 13. DATE - Set base date for date\time. 14. DEVICE - Chooses I/O device 15. DIAMOND - Sets default diamond size 16. DIGITS - Sets number of digits for show command. 17. ELLIPSE - Sets default ellipse size 18. ERRORS - Changes the output of errors 19. FILE - Selects files for input, output, and journaling. 20. FILL - Selects the fill style. 21. FLUSH - Sets automatic flush mode. 22. FONT - Chooses UGSYS character set 23. FORMAT - Format for input lines (256A1) 24. GRID - Specifies grid marks overlay plot 25. INTENSITY - Sets default intensity (line width) 26. LABELS - Sets defaults for numeric labels on axes 27. LIMITS - Sets X,Y,Z limits for plot (range of data to plot) 28. MODE - Set misc. functions 29. MONITOR - Set type of monitor plots 30. ORDER - Determines interpretation of input data 31. OUTLINE - Controls outline around plot 32. PATTERN - Sets the pattern for PATTERNED lines 33. PAUSE - Controls pause at end of plot 34. PEN - Selects the default pen or color to use in plotting. 35. POLAR - Selects polar coordinates. 36. PROMPT - Sets the prompt string. 37. REVISION - Sets the revision level (what features TD has) 38. SECONDARY - Controls the attributes of secondary contour lines. 39. SEGMENTS - Controls breaking the plot into segments 40. SHADOW - Sets 3-d plots to shadow plot to make the point location more obvious. 41. SHIELD - Sets an area to be shielded so that no more plotting is done there. 42. SCALE - Controls scale (log/linear...), and the number of default labels and ticks. 43. SIZE - Defines size of screen or paper 44. STATISTICS - Sets the range of data to use in subsequent lexicals. 45. STORAGE - Defines what is kept in storage 46. SYMBOL - Sets default symbol to plot 47. TEXTURE - Sets default line style (DOTTED,SOLID...) 48. THREE - Sets parameters for 3-dimensional plots 49. TICKS - Controls tick marks on axes 50. TITLE - Sets size of title 51. UNITS - Sets the units of the TEXT coordinates, and character sizes. 52. WIDTH - Sets the line width or intensity 53. WINDOW - Defines the plotting area (labels may be outside area) 15.64.3 AREA See:Command SET WINDOW 15.64.4 ARROW SET ARROW [SIZE=n] [FLARE|FLAIR=n] [PERMANENT] 1. SIZE=n - length of arrow head in tenths of an inch. The units may be modified by SET UNITS CHARACTER. (Default:2) 2. FLARE=n - is ratio of the base to the height of the arrow head (fatness). (Default:0.2) 3. PERMANENT - Makes the current setting the new default. If no options are specified all parameters are set to the default. 15.64.5 AXES Controls the presence or absence of each axes and sets the attributes of the axis. SET AXES|AXIS [INHIBIT|ENABLE] [ALL|TOP|BOTTOM|RIGHT|LEFT|X|Y|Z] [ON|OFF] [FRONT[=[ON|OFF]] [BOTH[=[ON|OFF]] [THREE[=[ON|OFF]] [INTENSITY|WIDTH=n] [NOCOLOR|WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [NOTEXTURE|SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [PERMANENT] Normally AXES are drawn at the first HIST, JOIN, BARGRAPH, PLOT, or PLOT AXES command unless inhibited or turned off. To control individual elements of the axes use: SET TICKS, SET LABELS, SET OUTLINE, SET SCALES 15.64.5.1 Options - 1. INHIBIT|ENABLE - inhibits or enables the automatic axes generation for the current plot or window. You may still draw the outline and axes with the PLOT OUTLINE, PLOT AXES commands. (Default:ENABLE) 2. ALL - enables axes for top, bottom, right and left. 3. TOP - enables an axis for the TOP of plot 4. BOTTOM - selects the axis for the bottom of the plot. 5. RIGHT - selects the axis for the right hand side 6. LEFT - selects the axis for the left hand side. 7. X,Y,Z - selects the axis to plot. For 2 dimensional plot X turns on both top and bottom, Y turns on both right and left. 8. ON - allows drawing all three 9. OFF - prevents drawing outline, label and ticks. If an axis is off then no space is allocated for either ticks or labels. 10. THREE - If on it then axes are plotted by default when 3-d plots are made. (Default:OFF) 11. FRONT - If on then 3-d axes are plotted in the front, for PHI>0 and in the back for PHI<0. This prevents them from interfering with the plot. (Default:OFF) 12. BOTH - If on then 3-d axes are plotted both in the front and back. (Default:OFF) 13. INTENSITY - Sets line intensity or width (0-5). 0 gets the intensity from the SET INTENSITY command. 14. WHITE... - Sets the line color. 15. SOLID... - Sets the line texture. (Default:SOLID) See:Command SET TEXTURE. 16. PERMANENT - Makes the current settings permanent from plot to plot. This acts on the current plot only a new SET AXES is required for each plot or the options need to be made permanent. The command must be followed by either a HIST, JOIN, BARGRAPH or PLOT command to be effective. (Default:ALL ON) 15.64.5.2 Example - TD:SET AXES ALL ON TOP OFF RIGHT OFF This produces axes only on the left and bottom. TD:SET AXES X ON Y ON Z OFF This produces X,Y axes, but no Z axes on a 3 dimensional plot. TD:SET AXES FRONT THREE PERMANENT This automatically produces X,Y,Z axes for a 3 dimensional plot. 15.64.6 BAR This sets options for error bars. SET BAR [ALL|X|Y|Z] [BREAK=[n]] [SIZE=[n]] [SUPPRESS=[ON|OFF]] [PERMANENT] 15.64.6.1 ALL-X-Y-Z - ALL,X,Y,Z select the error bar to change. You may set the bar size and break independently for X,Y, or Z errors. (Default:ALL) If the SIZE or BREAK are not specified they revert to the default value. 15.64.6.2 SIZE - SIZE=n in inches sets the half width of the bar at the end of error bars. If n is negative n is the fraction of the symbol size on the data point. If unspecified it is automatically set to 1/2 of the symbol size. In 3-D plots the bar always is perpendicular to the error and to the Z axis. This should make the directions fairly easy to see. (Default:0.1) 15.64.6.3 BREAK - BREAK=n in inches sets the size of a break in the error bars at the symbol. When set to a non zero value the error bar "breaks" at the symbol. Essentially it is not drawn for a distance n from the center of the symbol. By setting this the error bar is not drawn through the symbol. It is drawn only on either side of the symbol. If n is negative n is the fraction of the symbol size for the data point. If n is not specified it is assumed to be -1. This is ignored if there is no symbol or SYMBOL=NONE. (Default:0) 15.64.6.4 SUPPRESS - SUPPRESS does not the bar at the end of the error bars when they are smaller than either the symbol size, or the BREAK size. This is ignored if there is no symbol or SYMBOL=NONE. (Default:OFF) 15.64.6.5 PERMANENT - PERMANENT - Makes the current setting the new default. 15.64.6.6 Examples - example TD:SET BAR SIZE=0.2 BREAK=-1.1 SUPPRESS Sets all bars to 0.2 inches and break the error bar just outside the the symbol by 10%. In addition any error bars smaller than 1.1 times the symbol size are suppressed. TD:SET BAR Z SIZE=0.0 X SIZE=0.1 Sets the bar to 0.0 inches for Z errors and to 0.1 for X errors. The Y error remains at the current setting. 15.64.7 BOX This sets the default size for boxes. SET BOX [SIZE=dx[,dy]] [PERMANENT] PERMANENT - Makes the current setting the new default. If dx is omitted it is set to the default. If dy is omitted it is the same as dx. 15.64.8 BLINK SET BLINK [ON|OFF] Text or data plotted while this is on will blink. This will only work with certain devices. The blink attrubute is reset to off at the beginning of each new plot. If ON or OFF are omitted BLINK is set ON. (Default:OFF) 15.64.9 CARD This sets the number of columns per input line for non interactive input. SET CARD|INPUT [LENGTH]=[length] All data past the length is ignored The length must be in the range 20 to 256. See also SET FORMAT. This parameter remains the same when a new plot is started. (Default:256) You should be careful when using this command. If you extend the input line before extending the format, TOPDRAWER will expect multiple input lines per command. If length is omitted it is reset to the default value. For interactive input on the VAX the length is 256 and it is independent of the set card command. 15.64.10 CHARACTER SET CHARACTER {TERMINATOR|SEPARATOR|SPECIAL|ALPHA|ILLEGAL|COMMENT | ENDCOMMENT} "characters" This redefines the input character set. You may not redefine the letters "A" to "Z", the numbers "0" to "9", the period "." or the minus and plus signs "-+". The current definitions are: 1. SEPARATORS = ",/=" 2. TERMINATOR = ";" 3. SPECIAL = "@!#$%^&*~`{}|\[]" 4. COMMENT = "(" 5. ENDCOMMENT = "(" 6. ALPHA = "_" 7. ILLEGAL = all non printable characters. Special characters may be imbedded inside an option, but may not be the first character in an option. 15.64.11 CIRCLE This sets the default size for circles. SET CIRCLE [SIZE=dx[,dy]] [PERMANENT] This is same as SET ELLIPSE PERMANENT - Makes the current setting the new default. (Default:1.0) If dx is omitted it is set to the default. If dy is omitted it is the same as dx. 15.64.12 CLEAR SET {CLEAR|ERASE} {DEFERRED|IMMEDIATE} 1. DEFERRED - After a CLEAR or NEW PLOT command the screen is not cleared until data is plotted. In other words the current plot remains on the screen until the new plot appears. 2. IMMEDIATE - The screen is cleared immediately after a CLEAR or NEW PLOT command. 15.64.13 COLOR SET COLOR [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [PERMANENT] (Default:WHITE) This sets the default color of the display or the pen number. This is effective only for the current plot, or until another SET COLOR or SET PEN command. If PERMANENT is specified the current color is the permanent default. See:Command SET PEN If no options are specified it is set to the WHITE. 15.64.14 COMMAND SET COMMAND [MAXSUBSTITUTION=n] This sets the maximum number of command substitutions allowed on a single line. (Default:MAXSUBSTITUTIONS=1000) 15.64.15 Ctrl_Z SE Ctrl_Z [ON|OFF] Enables or disables the Ctrl_Z key as a means of stopping TOPDRAWER. 15.64.16 CYCLE SET CYCLE [NUMBER=n] [ENTRY[=n]] [WIDTH|INTENSITY=n] [NOCOLOR|WHITE|RED| GREEN|BLUE|YELLOW|MAGENTA|CYAN] [NOTEXTURE|SOLID|DOTS|DASHES| DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [SYMBOL=sym] [PERMANENT] This selects a cycle of attributes to be used when the CYCLE option is used with HISTOGRAM, JOIN, CONTOUR, or PLOT. 15.64.16.1 Options - 1. NUMBER selects the number of entries up to a maximum of 20 (Default:5) 2. ENTRY selects the cycle entry to change. If n is omitted the next entry is selected. If no entry is specified then all entries are set. ENTRY must follow the options you wish to change. 3. PERMANENT saves the current settings as the default. 4. SYMBOL selects the symbol to use. Once you select a color, texture, symbol, or width they remain in effect until changed, or the next NEW command. If no options are selected, the entries all revert back to the default values. 15.64.16.2 Examples - TD:SET CYCLE WIDTH=3 ENTRY=3 RED ENTRY BLUE ENTRY GREEN Will set entries 3 to 5 to colors RED, BLUE, GREEN and entry 3 is set to WIDTH=3. All other attributes are unchanged. TD:SET CYCLE SOLID WHITE Will set all entries to SOLID WHITE. 15.64.16.3 Defaults - The default is: NUMBER=5 1. BLUE DOTS SYMBOL=0o 2. CYAN DOT DASH SYMBOL=1o 3. GREEN DASH SYMBOL=2o 4. YELLOW DAASH SYMBOL=3o 5. RED SOLID SYMBOL=4o 6. MAGNETA SOLID SYMBOL=5o 7. WHITE SOLID SYMBOL=6o 8. WHITE SOLID SYMBOL=7o 9. WHITE SOLID SYMBOL=8o 10. WHITE SOLID SYMBOL=9o All others are WHITE SOLID SYMBOL=9o 15.64.17 DATE SET DATE [YYYY\MM\DD] [MONTH=n] [YEAR=n] [DAY=n] [JANUARY,...,DECEMBER] This sets the base date for date\time values. Date\time is normally expressed in hours. However since it is only single precision it is accurate to only 7 digits or about 1 day on the date 1900. If greater accuracy is needed you may set the base date to a value within the range of time you need to express. If you do not specify any options the base date is reset to the original default. (Default:0\1\1) Options YEAR,MONTH, or DAY allow you to reset just the selected value. Instead of MONTH=3 you may also specify MARCH. All 3 may be modified using the standard YEAR\MONTH\DAY notation. 15.64.18 DEVICE This selects the unified graphics device and sets options back to default values. This is equivalent to starting a new plot on another device. SET DEVICE [name] ["option_string"] [SIDEWAYS|ROTATED|ORIENTATION=n] [LANDSCAPE|PORTRAIT] [COlOR[=ON|OFF] [FILE|OUTPUT|DDNAME=filename|CHANNEL=dev:] [INTERACTIVE|SEQUENTIAL|SLAVE] [ADD|UNIT=n] [IDENT=aaaa] [NUMBER=nnnn] [PERMANENT] [WIDTH=n] [HEIGHT=n] [REVERSE] This selects the device name. It is modified by the option_string. If omitted the default is used. See:PERMANENT. (Interactive Default:TEK) (Batch Default:PS) 15.64.18.1 Names - 1. TEST - null device 2. CALCOMP - Calcomp plotters 3. PRINTRONIX - Printronix printer plotter 4. QMS-1200 - QMS Lasergrafix 1200 laser printer 5. EXCL - Talaris 1590 printer 6. REGIS - Dec VT-24x, Dec GIGI, and other devices supporting REGIS protocol. 7. SIXEL - Dec VT-240, LN-03, LA-50, LA-100 , Talaris 1590 and any other device using SIXEL graphics. 8. TEKTRONIX - Tektronix 4010/4014 terminals or emulators. This includes: Dec VT-240, Terminals with retrographics, Selanar 100XL, Visual 102, CIT-467, Talaris 1590, Falco, and Macintosh with VERSATERM. 9. VERSATEK - Versatek printer/plotter 10. TEKEMUL - Tektronix 4010/4014 emulators, using the SLAC driver. 11. TEK4027 - Tektronix 4027 color terminal 12. GKS - Interface To DEC GKS package 13. GRINNELL - Grinnell graphics device 14. IMAGEN - Imagen laser printer 15. POSTSCRIPT - Postscript printer 16. GPOSTSCRIPT - Postscript driver using DEC-GKS 17. EPS - Encapsulate postscript driver using DEC-GKS 18. HPGL - Hewlett packard plotters 19. XWINDOW - Vax station using DECwindows. Note: Some of these device drivers may not be available. You will get an error message if they do not exist. 15.64.18.2 COLOR - Selects the DEC GKS color driver rather than the Monochrome driver. 15.64.18.3 LANDSCAPE-PORTRAIT - LANDSCAPE or PORTRAIT select the orientation of the plot on paper, for GKS printer drivers. This applies to Gpostscript, EPS, QMS1200, EXCL, Versatek, IMAGEN and all DEC-GKS drivers that support page orientation. This applies only to the selected driver, and not to any additional drivers selected, unlike the SIDEWAYS and ORIENTATION commands. It does not apply to workstation windows or TEKtronix graphics. To rotate them use the SIDEWAYS or ORIENTATION option. It will be applied in addition to the ORIENTATION option. The final rotation will be the sum of the 2 rotations applied. (Default:LANDSCAPE) 15.64.18.4 TEST - This is a null device. You must specify the device driver in the "option_string". 15.64.18.5 CALCOMP - 1. SMALL CALCOMP - 10inch Calcomp 2. LARGE CALCOMP 15.64.18.6 EXCL - This if for laser printers using Talaris extended control language (EXCL). This includes the Talaris 1590 printstation. This device is capable of intensity (line width) variation, and erasing data. The line width is the intensity/150 inches. It produces a plot 11.0 by 8.5 inches in size with 0.25 inch margins. The advantage of this driver over TEK4010 on the Talaris is the number of line widths, and the correct reproduction of scatter plots. The disadvantage is that the file size is larger, and you can not send the file to a TEK-4010 emulator, to see the contents. Warning Previously it was stated that this will work on LN-03+. Due to a misunderstanding this is not true. For LN-03 printers use SIXELS or TEK-4010 for LN-03+. 15.64.18.6.1 Options - The following options may be specified inside the string: 1. DM=n - The default margin in cm. (Default:0.25in.) 2. TM=n - The top margin in cm. (Default:DM) 3. LM=n - The left margin in cm. (Default:DM) 4. BM=n - The bottom margin in cm. (Default:DM) 5. RM=n - The right margin in cm. (Default:DM) If the margins are set to 0, then no margin, or orientation commands are in the output file. 6. PENLIST=n1n2n3n4n5 - maps penwidths to number of pixels. Setting is number from 01 to 99. 1 pixel=0.0033 in. If the penwidth is 00 then the default is assumed. (Default:0204060810) 7. WIDTH=size - The width of the paper in cm. (Default:8.5in.) 8. LENGTH=size - The length of the paper in cm. (Default:11.0in.) 9. inches - The WIDTH/LENGTH/margins must be expressed in inches rather than cm. 10. ROTAXIS - Rotates the axis from landscape to portrait. 15.64.18.6.2 Examples - TD:SET DEVICE EXCL Selects the EXCL driver. TD:SET DEVICE EXCL "DM=1,LM=1.5,inches,ROTAXIS" Selects the EXCL driver, and sets 1 inch margins on the left,top, and bottom, with 1.5in. margins on the left. The plot will be produced on 8.5x11 paper with portrait orientation. TD:SET DEVICE EXCL "DM=.375,PENLIST=0202020404" Produces plots approximately the same as TD:SET DEVICE TEK "TAL1590" SEQUENTIAL 15.64.18.7 GKS - This is an interface to the DEC GKS package. It allows access to a whole class of devices available through DEC GKS. 15.64.18.7.1 Options - Options 1. WSTYPE=nnn - Selects the DEC GKS workstation If you do not specify a WSTYPE then the logical GKS$WSTYPE is used to define the work station. Normally you specify the workstation name. 2. ERRLUN - Selects an output logical unit for GKS messages (Default:6) 3. OUTLUN - Selects an output logical unit for GKS files. You normally do not specify this. 4. WIDTH=n.n - Window width in cm (Default:25.4 (10 inches)) 5. HEIGHT=n.n - Window height in cm (Default:20.32 (8 inches)) 6. XSCREEN=n.n - X Location of lower left corner of window in cm (Default:0) 7. YSCREEN=n.n - Y Location of lower left corner of window in cm (Default:0) 8. XSIZE - Actual physical X size of screen if known (Default: size reported by GKS or 10 inches for metafile). Normally you do not need to set this. 9. YSIZE - Actual physical Y size of screen if known (Default: size reported by GKS or 8 inches for metafile). If XSIZE is picked, but Y is not then the YSIZE is assumed to scale as the selected XSIZE 10. REVERSE - Sets background to black with white foreground. 11. color=rrggbb - Specifies the mixture of red,green,blue to mix to obtain the desired color. Each value may vary from 0 to 99. The default colors are: A. BLACK=008900 B. WHITE=999999 C. RED=992020 D. GREEN=009900 E. BLUE=202099 F. YELLOW=998000 G. MAGENTA=992099 H. CYAN=008000 12. DDNAME=filename - Specifies the output file name. 13. PENLIST=n1n2n3n4n5 - maps penwidths to .01 cm. from 01 to 99. (Default:PENLIST=0103050709) 01 is the minimum pen width. If both OUTLUN and DDNAME are unspecified then logical GKS$CONID is used to specify the output device. 15.64.18.7.2 Devices - In addition a whole set of devices are defined to interface through DEC GKS. You may specify these instead of GKS. If it is both sequential an interactive you may specify SEQUENTIAL. Sequential output is sent to the default file if you have not specified a file name (FILE=xxxx). These are: 1. METAFILE WSTYPE=2 (SEQUENTIAL) File=UGDEVICE.AGM 2. CGM WSTYPE=7 (SEQUENTIAL) File=UGDEVICE.CGM 3. VT125 WSTYPE=11 (SEQUENTIAL,INTERACTIVE) File=UGDEVICE.SIX 4. VT125BW WSTYPE=12 (INTERACTIVE) 5. VT240 WSTYPE=13 - VT-240 color (INTERACTIVE) 6. VT240BW WSTYPE=14 - VT-240 in Black and white mode (INTERACTIVE) 7. LCP01 WSTYPE=15 (SEQUENTIAL) File=UGDEVICE.SIX 8. VT330 WSTYPE=16 (INTERACTIVE) 9. VT340 WSTYPE=17 (INTERACTIVE) 10. VSXXX WSTYPE=41 - A variety of VAX stations using UIS (INTERACTIVE) 11. LVP16A WSTYPE=51 (SEQUENTIAL) File=UGDEVICE.SIX 12. LVP16B WSTYPE=52 (SEQUENTIAL) File=UGDEVICE.SIX 13. HP7550 WSTYPE=53 (SEQUENTIAL) File=UGDEVICE.HP 14. HP7580 WSTYPE=54 (SEQUENTIAL) File=UGDEVICE.HP 15. HP7585 WSTYPE=56 (SEQUENTIAL) File=UGDEVICE.HP 16. GPOSTSCRIPT WSTYPE=61 (SEQUENTIAL) File=UGDEVICE.PS 17. EPS WSTYPE=65 (SEQUENTIAL) File=UGDEVICE.EPS 18. TEK4107 WSTYPE=83 (SEQUENTIAL,INTERACTIVE) File=UGDEVICE.TEK 19. TEK4207 WSTYPE=83 (SEQUENTIAL,INTERACTIVE) File=UGDEVICE.TEK 20. TEK4128 WSTYPE=85 (SEQUENTIAL,INTERACTIVE) File=UGDEVICE.TEK 21. TEK4129 WSTYPE=85 (SEQUENTIAL,INTERACTIVE) File=UGDEVICE.TEK 22. LJ250 (SEQUENTIAL) File=UGDEVICE.LJ 23. LJ250_180DPI (SEQUENTIAL) File=UGDEVICE.LJ 24. XWINDOW WSTYPE=211 - X or (DEC) window (SEQUENTIAL,INTERACTIVE) This uses the logical DECW$DISPLAY to specify the connection. To do this you must: $ DEFINE DECW$DISPLAY nodename::0.0 For example you may select interactive XWINDOWS (DEC windows) by: TD:SET DEVICE XWINDOW To select VT125 output to a file named "VT125.PLOT" TD:SET DEVICE VT125 SEQUENTIAL FILE=VT125.PLOT 15.64.18.7.3 Examples - TD:SET DEVICE TEK4014 For a Tektronix 4014. TD:SET DEVICE SEQUENTIAL TEK4010 DDNAME=TEK4014.PLOT For a Tektronix 4014 plot sent to a file. TD:SET DEVICE TEK4010 DDNAME=TKA0: For a Tektronix 4014 plot sent to a TEK-4014 window on a VAXstation. TD:SET DEVICE VSX "RED=990000,GREEN=009900,BLUE=009900' For a plot on a VAXstation with "pure" colors. TD:SET DEVICE HP7585 For a Hewlett Packard 7578 plotter 15.64.18.7.4 Assignments - If you wish to default to GKS then you should DEFINE PLOT_TERM "UGGKSWM,[options]" 15.64.18.8 GRINNELL - This is a slave raster graphics device only. Options are: 1. CHANNEL=<value> - Identification of I/O controller (Default:GRA0) 2. UNITS=<value> - Selects the monitors to use. This is sum of the display units (1,2,4...). (Default:1) 3. BWTYPE=<value> - Selects black and white monitor type. (Default:1) 1 = 1 memory plane no look-up 2 = 2 memory planes no look-up 3 = 2 memory planew with look-up 4. COLTYPE=<value> - Selects the type of color monitor. 1 = 4 memory planes (7 colors 2 levels) 2 = 4 memory planes (7 colors + blink mode) 3 = 3 memory planes (color, intensity, blink) 4 = Same as 2 but with look up table. 5. XMAX=<value> Maximum raster value (Default:511) 6. YMAX=<value> Maximum raster value (Default:511) 7. CSIZ=<value> Character spacing. (Default:7) 8. EXTCHR - Indicates the controller produces extended char. set. 9. REPCHR - Character data replaces existing data 10. XSIZ=<value> - Size of monitor in cm (Default:25.4) 11. YSIZ=<value> - Size of monitor in cm (Default:25.4) 15.64.18.9 HPGL - This is for a generic Hewlett Packard plotter. The plotter pauses in between each plot to wait for a new sheet of paper. The colors you select are mapped to pen numbers as: 1. WHITE 2. Red 3. Green 4. Blue 5. Yellow 6. Magenta 7. Cyan Options are: 1. WIDTH=n.n - Paper width in cm (Default:26.0) 2. HEIGHT=n.n - Paper height in cm (Default:20.0) 3. XSCREEN=n.n - X Offset of plot in cm (Default:0.0) 4. YSCREEN=n.n - Y Offset of plot in cm (Default:0.0) 5. UNITS=nn.n - Number of pixels/cm (Default:400) 6. MAXCOLOR=n - Maximum number of pens (Default:7) This may be set within the range of 1 to 7. All pens requested larger than this value will revert to to the maximum. 7. PENLIST=n1n2n3n4n5 - maps penwidths to .01 cm. from 01 to 99. (Default:PENLIST=0103050709) 01 is the minimum pen width. 8. GENIL simulate intensity levels by doing multiple passes with the pen. If not specified then the PENLIST is ignored. 9. PENWIDTH=n.n - The width of the pen points in cm (Default:0.03) If you wish to default to HP plotter output: $ DEFINE PLOT_TERM "UGHPGLD[,options]" These options may work differently depending on the plotter. Most of the big plotters have the origin at the center of tha page, while the small ones use an origin at a corner. By suitably adjusting the WIDTH,HEIGHT,XSCREEN,YSCREEN any coordinate system or page size may be accomadated. MAXCOLOR=1 is useful when you wish to reduce a color plot to a single color. example TD:SET DEVICE HPGL "PENLIST=0309152430" Sets up to draw with much wider lines. 15.64.18.10 IMAGEN - This is for an IMAGEN laser printer using the IMPRESS language. It has a resolution of 1/3150 in the horizontal direction. Options are: 1. ROTAXIS 2. BIGMAR 3. GENIL 4. EXPA=LETTER or LEGAL The default is to send output to UGS$IMGN300: 15.64.18.11 POSTSCRIPT - This is for output on a postscript printer It has a resolution of 1/3387 in the horizontal direction. The output file type is PS . 15.64.18.12 PRINTRONIX - Printronix model MVP printer/plotter. 15.64.18.13 QMS-1200 - This is the QMS Lasergrafix 1200 laser printer The options are: 1. FLUNIT=n - Logical unit number (Default:29) 2. TRAY=nnnn - 4 character code to specify the tray/stacker 0000=upper tray, 0001=lower tray, XXXX=keep old setting. 3. PENLIST=n1n2n3n4n5 - maps penwidths to setting. Setting is odd number from 03 to 99. (Default:0303050709) 4. LANDSCAPE,PORTRAIT - Selects orientation 5. LM,RM,BM,TM=n - Selects margins in inches (Default:0.9) 6. NR,NC=n - Selects number of rows/colums of subplots on page. For example NR=2,NC=3 will plot 6 pictures on 1 page. (Default:NR=1,NC=1) 15.64.18.14 REGIS - This is for interactive GIGI, VT-240, VT-241 color monitor, or suitable emulator such as the VT-300 emulation on a VAXstation. (note:VT-241 can only reproduce the colors RED,GREEN,BLUE or WHITE,RED,GREEN). The TEKTRONIX driver is slightly faster on a VT-240 than the REGIS driver. The physical screen size is set to 10.56 by 6.6 inches or 26.85 by 16.76 cm. These devices support Hardware structure and hardware characters in any size. The GIGI also supports BLINK mode. 15.64.18.14.1 Options - 1. COLOR=xxxxxxxx This specifies the color mapping (default:WRGBYMCD) You may modify this to suit your tastes. This corresponds to the colors White, Red, Green, Blue, Yellow, Magenta, Cyan, Dark(black). The eighth color "D" is the background color. 2. HARDST or SOFTST to select hardware, or software line structure. HARDST is faster, but SOFTST will give identical results on all devices. Example TD:SET DEVICE REGIS Sets up to plot on a normal REGIS device TD:SET DEVICE REGIS "HARDST,COLOR=WWWWWWWD" Sets up to plot quickly in black and white only. TD:SET DEVICE REGIS "COLOR=WRGBRGBD" Plots only in white,red,green, and blue. Yellow, magenta, and cyan are mapped to red, green, and blue respectively. 15.64.18.14.2 Answerback - You should set the answerback to be "DECGIGI,COLOR=WRGWWWWD,<CR>" for a VT241 terminal. 15.64.18.14.3 Windows - Normally when you do plots in REGIS the cursor is left at the top of the screen. If your terminal is capable of more than 24 lines, you may wish to freeze the top 24 lines, and create a scrolling region underneath the plot. Assume your terminal has more than 24 lines and less than 100. This is possible if it is an emulated terminal using a windowing system. To move the cursor to the bottom of the screen: TD:SET PROMPT BOTTOM,'TD:' To freeze or thaw the top few lines: TD:define command freeze 'type 27,"7",27,"[24;r",27,"8",27,"M"' TD:define command thaw 'type 27,"7",27,"[0;r",27,"8",27,"M"' You issue the command FREEZE to freeze the top lines, and THAW to unfreeze them. You will want to FREEZE when you are doing plots, and the thaw when you are showing data, or parameters, so you can use the whole window. For your convenience you may do all of this by: TD:SET FILE INPUT TOPDRAWER_ROOT:[EXAMPLES]FREEZE Now when you do plot the top part of your screen is used to view the plot while the bottom is used to give the commands. If your screen has only 24 lines you may wish to reduce the plot size and freeze the top 22 lines. This will give you a 2 line command window. To do this: SET FILE INPUT TOPDRAWER_ROOT:[EXAMPLES]FREEZE22 Similarly there is a FREEZE30 and FREEZE40 file. 15.64.18.15 SIXELS - This is for the LA-50, LA-100, VT-240, LN-03 and any other device that uses sixel graphics. The size is about 10 by 8" except for an LA-100 which is 14 by 10. To specify this device: TD:SET DEVICE SIXELS "type,options" Where type is LA50, LA100, VT240, LN03, LN03HI, LN03LO, or LN03MED. HI,LO,MED select the resolution for the LN-03 printer. If you do not have lots of memory inside the LN-03 you shoule use LN03LO or possibly LN03MED. If you wish to get sixel output on a Talaris 1590 printer You specify option LN03, and then print the file with /SET=LN03. example TD:SET DEVICE SIXEL "LN03" 15.64.18.16 TEKTRONIX - Tektronix 4010/4014 compatible terminals TD:SET DEVICE TEKTRONIX "type,options" 15.64.18.16.1 Type - 1. "RADM3A" - For ADM-3A+Retrographics terminal 2. "RVT100" - A VT-100+Retrographics terminal 3. "RVT100A" - High resolution Retrographics (Green screen). 4. "SEL100XL" - For a Selanar HiREZ 100XL 5. "VIS102" - For a Visual 102 with graphics. 6. "KERMIT" - Kermit simulation of TEK-4010 with color 7. "LSI7107" - LSI model 7107 color terminal 8. "TEK4207" - For Tektronix model 4207 with Dialog box. 9. "TEEMTALK" - For Tektronix 4207 emulators which support simultaneous Tek and terminal windows. 10. "VT240" - For a VT-240 terminal, or C.ITOH 328 For a VT-240 or 241 terminal you will get better results using the REGIS protocol. Both TEK and REGIS are supported on the VT-240. When using the TEK protocol on a VT-240 the keypad is disabled in graphics mode, and the screen is erased when you leave graphics mode. 11. "CIT467" - for a CIT-467 color graphics terminal 12. "TAL1590" - for a Talaris 1590 laser printer. This produces a plot approximately 10.24 by 7.8 inches with 3/8 inch margins. If you do not specify a terminal type, then a plain vanilla 4010 is assumed. 15.64.18.16.2 Terminal_setup - It is important that your terminal be setup properly for Tek-4010. The following settings must be observed. 1. <CR> should generate only <CR> 2. <LF> should generate only <LF> 3. GIN terminator must be <CR>. In particular you do not want <EOT> as a terminator. 4. <DEL> must be enabled as a valid graphics character or it implies Lo Y. 5. You may wish to enable Automatic Tek entry. 6. You probably do not want screen clear when Tek is entered. 15.64.18.16.3 Falco - The Falco infinity series can display up to 49 lines of FBG-II graphics. You should calculate the number of available y pixels as For FBG-II pixels=3120*(lines/49) For FBG-I pixels=3120*(lines/23) Then you set: TD:SET DEVICE TEKTRONIX "RVT100,YPIXELS=pixels" 15.64.18.16.4 Options - 1. "HARDST" or "SOFTST" select hardware structure, or software line structure. HARDST is faster, but SOFTST will give identical results on all devices. 2. "HIRES" or "LORES" select the resolution (4096 or 1024). HIRES is slower, and will only work on some devices. For example HIRES messes up the plots on a Visual-102. 3. "HARDCH" or "SOFTCH" selects the range of character generation. HARDCH generates 4 character sizes by hardware. SOFTCH generates only 1. 4. "NOINTEN" or "INTEN" selects intensity variation. This only works on "real" 4010 terminals, and VT-240. There are only 2 levels of variation 1,2,3 or 4,5. 5. "HEIGHT=n" selects the screen height in cm. This componsates for emulators without "good" aspect ratios. 6. "YPIXELS=n" selects the number of Y pixels for emulators with a different number from the standard 3120. This may be in the range of 1024 to 4096. Xpixels are assumed to be 4096. 7. "WIDTH=n" selects the screen width in cm. 8. "SLOW" selects full rather than compressed output for each point. All redundant characters are transmitted. 9. "RECSIZE=nnn" selects the record size (72-512) 10. "RSEGM" or "NSEGM" - Selecte [no]return to terminal mode at end of each segment. This is useful for terminals that support simultaneous ANSI, and Tek graphics on screen at the same time. 11. "COLOR=WRGBYMCB" - specifies the 8 color mapping characters for White, Red, Green, Blue, Yellow, Magenta, Cyan, Black. Each escape sequence has a unique single character to select color, which may be specified by the color option. Spaces indicate keep the color the same. For example KERMIT uses "COLOR=71243560" 12. "PRECOL=sequence" specifies the "escape" sequence to use before the color character. For example KERMIT uses "PRECOL=[3" 13. "POSTCOL=sequence" specifies the sequence to use after the color character. For example KERMIT uses "POSTCOL=m" 14. "ENTER=sequence" specifies the "escape" sequence to enter TEK-4010 mode from terminal mode. For example VT-240 and KERMIT use "ENTER='[?38h'" 15. "EXIT=sequence" specifies the "escape" sequence to Exit TEK-4010 mode to terminal mode. This sequence is executed whenever the screen is erased or at the end of each segment if RSEGM is selected. For example VT-240 and KERMIT use "EXIT='[?38l'" NOTE: It is assumed that the escape character "27" begins each escape sequence, and it need not be entered. Escape sequences containing lowercase letters need to be inside quotes. In addition escape sequences are limited to 7 characters and they may not contain blanks. 15.64.18.16.5 Table_of_types - Type Width Height Features TEK4010 19.97 15.21 TEK4014 19.97 15.21 HIRES,HARDCH,INTEN TEK4207 19.97 15.21 HIRES,HARDCH,INTEN,EXIT,COLOR TEEMTALK 19.97 15.21 HIRES,HARDCH,INTEN,EXIT,RSEGM,COLOR VT240 21.59 16.45 HARDCH,INTEN,EXIT SEL100XL 22.00 16.76 HIRES,HARDCH,RSEGM VIS102 21.66 16.50 EXIT,RSEGM RVT100 21.09 15.76 EXIT,RSEGM RVT100A 21.09 15.76 EXIT,RSEGM RADM3A 19.95 15.21 EXIT,RSEGM CIT467 19.97 15.21 EXIT,RSEGM,COLOR TAL1590 25.92 19.75 HIRES,HARDCH,INTEN KERMIT 19.97 15.21 HIRES,HARDCH,INTEN,EXIT,COLOR LSI7107 19.97 15.21 HARDCH,EXIT,COLOR All use HARDST. 15.64.18.16.6 Windows - Sone TEK4010 emulators are capable of simultaneous graphics and text where the graphics scrolls off of the screen. An example of such a terminal is the Visual-630. For this type of terminal you may wish to reduce the plot size and freeze the top 22 lines. This will give you a 2 line command window with a fixed graphics window. To do this: TD:SET FILE INPUT TOPDRAWER_ROOT:[EXAMPLES]FREEZE22 When you wish to use the whole window for listings you type: TD:THAW and then to restore the 2 line command window: TD:FREEZE 15.64.18.16.7 Escape_seq - Each TEK4010 emulator uses slightly different escape sequences. The following is a listing of the sequences which differ from one device to another. 1. ENTER Tek mode A. <ESC>[?38h - VT240,Kermit B. <ESC>#!1 - TEK4207 C. <GS> - Most other devices 2. EXIT Tek mode or Resume ANSI terminal mode A. <ESC>[?38l - VT240,Kermit B. <ESC>#!0 - TEK4207 C. <ESC>2 - CIT467 D. <CAN> - most other devices 3. Set color (X=single color character) (White,Red,Green,Blue,Yellow,Magenta,Cyan,Black) A. <ESC>[3Xm - Kermit X=71243560 The KERMIT color emulation uses <ESC>[3F;Bm Where F is the Foreground color and B is the background. B. <ESC>MLX - TEK4207 X=12347650 Alternate colors for TEK4207 are: < ; : 9 Violet Lt.Blue Blue-Grn Yellow-Grn 8 = > ? Orange Salmon Dk.Gray Lt.Gray C. <ESC>X - CIT467 X=oiljmknh D. <ESC>CX - LSI7107 X=71243560 The LIS7107 additionally must return to terminal mode to setup a new color. 4. Set mode ERASE/DRAW A. Color terminals use color black B. <ESC><RUB>/<ESC>a - RADM3A C. <ESC>1d/<ESC>0d - RVT100,VIS102 D. <ESC>OW b` @@/<ESC>OW `` @@ - SEL100XL Codes (decimal) 3. <ESC> = 27 4. <CAN> = 24 5. <GS> = 29 6. <RUB> = 127 15.64.18.16.8 Example - TD:SET DEVICE TEK "SEL100XL" Selects the SEL100XL terminal protocol. TD:SET DEVICE TEK "SEL100XL,SOFTST,LORES" Selects the SEL100XL but in 1024 resolution, with software structure. This produces faster plots that look identical to those produced by hardcopy devices that do not have hardware structure. 15.64.18.16.9 Hints - Some terminals such as the KERMIT emulation do not support simultaneous display of graphics and text. This may be fixed in several ways. You can specify the "RSEGM" option, and do a SHOW CURSOR whenever you wish to look at the graphics page. Some terminals such as the CIT328 , and the VT-240 clear the display when switching from graphics to text. For such devices the "NSEGM" options should be specified. This returns to terminal mode only when the device is closed, or when the screen is erased. You may modify the actual color mapping by specifying the appropriate escape sequences. For example for KERMIT you may draw black against a white backround by specifying: SET DEVICE TEKTR "KERMIT,COLOR=01243567,POSTCOL=';7m'" You may modify the color mapping for TEK4027 to substitute Violet for blue. SET DEVICE "COLOR=' <' 15.64.18.17 TEK4027 - This is for the Tektronix 4027 color terminal. 15.64.18.18 VERSATEC - Versatec 1200 printer/plotter. The plotting space is 10.55" by 7.8" (26.8cm by 19.81cm) 2110 by 1560 pixels. Plotting nominally begins 0.35" from the perforations. The 7.8" is nominal due to variations in the paper feed. There is always a margin of 0.225" on the short side of the paper. The following options may be specified inside the string. 1. "LENGTH=n,inches" - n is the length of the paper in inches. This allows you to make long plots on roll paper, or plots that bleed across the page boundaries. You can also make a plot smaller using this parameter. 15.64.18.19 Xwindows - If you wish to serve the Xwindows to another node on DECnet (HEPNET) you must declare the node before entering Topdrawer, by entering the line: $ SET DISPLAY/CREATE/NODE=nodename If you do not have a DECnet connection, but you are connected via TCP/IP (Arpanet or Internet) you must use one of the following commands: If you have Multinet TCP/IP software: $ SET DISPLAY/CREATE/NODE=nodename/TRANSPORT=TCPIP If you have Wollengong TCP/IP software (WINTCP): $ SET DISPLAY/CREATE/NODE=nodename/TRANSPORT=WINTCP 15.64.18.20 String - This is passed to UGOPEN. This selects options for the selected device. The options are separated by commas. For more information see:UGSYS. An example of using the string is: TD:SET DEVICE SIXELS "LN03HI,NOCLEAR,NORESET,LENGTH=n,inches" This selects output for the LN-03 with no imbedded formfeeds or reset commands. You might produce a plot in this form so you can add it to an existing text file. The result is a plot imbedded in the text. LENGTH=n adjusts the page length where n is the length of the paper in inches. Shortening the plot size is useful for imbedded plots. You may also lengthen the page length on the LA50 and LA100 printers. If the option inches is omitted the length is in centimeters. 15.64.18.21 ADD - This adds another device so now you have 2 device open. You may select the unit number by using UNIT=n. 15.64.18.22 FILE - FILE=filename - This selects the device and filename for output. This option only works for non-interactive or sequential devices. If you wish to specify a file name containing either semicolons or blanks, it must be enclosed in parenthesis. CHANNEL=DEV: - This selects the output device. For interactive devices or slave devices this is your terminal by default. You either select a device or filename. Interactive and slave devices generally accept CHANNEL, while sequential devices accept FILE. The TEKTRONIX and REGIS devices treat FILE and CHANNEL as synonyms. 15.64.18.23 WIDTH|HEIGHT - Sets the width and height of the display in the current units. This only applies to some drivers. 15.64.18.24 IDENT - IDENT=aaaa - This selects an identification to be added to a sequential output file before each plot. For TEKTRONIX and REGIS, if aaaa='NONE' then there is no identification for each plot. This is equivalent to "PICTID=aaaa" 15.64.18.25 INTERACTIVE - This plots on your terminal. INTERACTIVE turns on both PAUSE and FLUSH. When this is selected TOPDRAWER stops after each plot and waits for you to hit the "Return" key. If you wish to stop you type STOP, EXIT, QUIT, HALT, or END. In addition data is flushed after each line of interactive input. INTERACTIVE devices support extra features such as cursor input. INTERACTIVE devices produce output on device TT:. If you attempt interactive output to TT: in a batch queue, your output will vanish, as TT is assigned to NLA0:. SEQUENTIAL - Produces plots in an output file SLAVE - Produces the plots at another device. This is similar to INTERACTIVE, but the CURSOR is not supported for a slave device. The default is: INTERACTIVE if you are running interactively SEQUENTIAL in BATCH mode 15.64.18.26 NUMBER - NUMBER=nnnn - This selects the sequence number for the first plot in the set. This is only used by sequential devices. 15.64.18.27 ORIENTATION - This is an integer value from 0 to 3 specifying the orientation of the plot. It rotates all plots on all opened devices, unlike the LANDSCAPE and PORTRAIT options. *** 0 Normal orientation *** 1 Rotated 90 degrees clockwise. This is the same as sideways. X goes from top to bottom, while Y points to the right. *** 2 Rotated 180 degrees or Upside down *** 3 Rotated 270 degrees clockwise, appropriate for TeX 15.64.18.28 REVERSE - This reverses the foreground/background colors on the plot. 15.64.18.29 SIDEWAYS - SIDEWAYS - Rotates the plot by 90 degrees. See:Command SET SIZE. This rotates all plots on all opened devices. 15.64.18.30 PERMANENT - This sets the currently selected device as the Default. The Default may be restored by a SET DEVICE command with no device specified. 15.64.18.31 UNIT - You may select the unit to open UNITS range from 1 to 8. This allows you send the output to several devices at once. 15.64.18.32 Example - To get plots on your terminal a VT-100 with retrographics. TD:SET DEVICE TEKTRONIX "RVT100" To get plots on another terminal (TTAn:) a VT-100 with retrographics. TD:SET DEVICE TEKTRONIX "RVT100" FILE=TTAn: To get output on a Postscript printer: TD:SET DEVICE POSTSCR The actual output will be a file called filename.PS which must be printed on a Postscript printer. To get direct output to a spooled printer: TD:SET DEVICE POSTSCR FILE=LPA0:DUMMY.PS 15.64.19 DIAMOND This sets the default size for diamonds. SET DIAMOND [SIZE=dx[,dy]] [PERMANENT] PERMANENT - Makes the current setting the new default. (Default:1.0) If dx is omitted it is set to the default. If dy is omitted it is the same as dx. 15.64.20 DIGITS SET DIGITS=n Sets the number of significant digits displayed in a SHOW DATA command and the lexicals. The number of digits may be set to a value from 0 to 7. If n=0 then the number of digits is adjusted to suit the display. If n is omitted it is assumed to be 0. (Default:DIGITS=0) 15.64.21 ELLIPSE This sets the default size for the major and semi-major ellipse sizes. If dy is omitted the ellipse becomes a circle. SET ELLIPSE [SIZE=dx[,dy]] [PERMANENT] PERMANENT - Makes the current setting the new default. If dx is omitted it is set to the default. If dy is omitted it is the same as dx. 15.64.22 ERRORS SET ERRORS [{DEFERRED|IMMEDIATE|LIST}] [WAIT|PAUSE[=ON|OFF]] 1. DEFERRED - The error messages appear after the plot is finished. 2. IMMEDIATE - The error messages appear when the command is entered. 3. LIST - The error messages appear only in the listing file. 4. WAIT - When error messages are immediate, WAIT causes TOPDRAWER to wait after each message. PAUSE is a synonym for wait. This option remains the same until changed by a SET ERRORS command. (Default:IMMEDIATE,NOWAIT) 15.64.23 EXACT SET EXACT [ON|OFF] [PERMANENT] Sets the character comparison to be exact rather than case blind. (Default:OFF) 15.64.24 FILE This selects the file names for data input, output, and journaling. SET FILE [INPUT=filename] [LIST|OUTPUT=filename] [JOURNAL=filename] NOTE This command is very different from the original SLAC version of TOPDRAWER. 15.64.24.1 INPUT - Selects the input file. Once a file is selected, TOPDRAWER looks for all commands in that file. After the last command in the file, TOPDRAWER looks for more input in the current file. (Default:TOPDRAWER.TOP) WARNING If any commands follow SET FILE INPUT, they will be executed before the commands in the input file. 15.64.24.2 LIST - Selects the listing output (Default:TD.LIS). This lists all the commands you give TOPDRAWER. Both commands entered at the keyboard, and from an input file are listed. It is also the default file for a LIST command. 15.64.24.3 JOURNAL - Selects the journal file name (Default:TD.TDJ) The journal file contains any commands you type at the keyboard. Commands from a disk file are not incuded in the journal file. There is no journal file when TOPDRAWER is run from a batch job. 15.64.24.4 Filename - The file specification may include device and directory. If the filename contains a semicolon ";", or begins with "V_" or "S_" or a special character such as a dollar sign "$" it must be enclosed in quotes or apostrophes "'". For example you may get the sample input file. TD:SET FILE INPUT TOPDRAWER_ROOT:[EXAMPLES]TDINTRO This is a modification of the original Topdrawer syntax. The original required a Fortran unit number. By performing a logical assignment you may simulate the original syntax. For example: $ ASSIGN FOR009.DAT "9" defines 9 as the usual input on unit 9. 15.64.24.5 Example - TD:SET FILE INPUT TEST Input will be taken from file TEST.TOP. TD:SET FILE INPUT myfile.dat Input will be taken from file MYFILE.DAT. TD:SET FILE INPUT 'myfile.dat;1' Input will be taken from file MYFILE.DAT;1. Notice, that if you use a semicolon ";" in the file name you must enclose it in apostrophes or quotes. TD:SET FILE INPUT="$TEST" LIST=TESTD Input will be $TEST.TOP the output will be TESTD.LIS. TD:SET FILE INPUT TOPDRAWER_ROOT:[EXAMPLES]TDINTRO The input will be from TOPDRAWER_ROOT:[EXAMPLES] file TDINTRO.TOP TD:SET FILE INPUT DRA0:[USER.SUBDIR]MY_PLOTS.PLT The input will be from device DRA0:, directory [USER.SUBDIR], file MY_PLOTS.PLT TD:SET FILE JOURNAL NL: This discards the journal output a better way to do this is: SET MODE JOURNAL OFF. 15.64.25 FILL SET FILL [ENTRY[=n]] [FULL] [SIZE[=n]] [ANGLE[=n]] [ALTERNATE=[ON|OFF]] [WIDTH|INTENSITY=n] [NOCOLOR|WHITE|RED|GREEN|BLUE|YELLOW| MAGENTA|CYAN] [NOTEXTURE|SOLID|DOTS|DASHES|DAASHES|DOTDASH| PATTERNED|FUNNY|SPACE] This selects a fill attributes to be used when the FILL option is used with HISTOGRAM, JOIN, or PLOT. This selects the type of cross hatch fill. Up to 4 different lines may be used. 1. ALTERNATE selects filling alternate areas. If off the entire area bounded by the outside of the curve is filled. (Default:ON) 2. ENTRY selects the fill entry to change. If n is omitted the next entry is selected. 3. FULL sets the fill size to be the same as the screen resolution, the angle is set to 90, and the WIDTH is set to 1. 4. SOLID... selects the line texture to use. (Default:NONE) 5. WHITE... selects the line color to use. (Default:NONE) 6. ANGLE the angle that the line is to be drawn at. 0 is horizontal, while 90 is straight up and down. (Default:+-45 degrees) 7. SIZE the separation between the lines. If negative this is specified in pixels. If positive it is specified in inch. (Default:0.1) 8. WIDTH selects the line width to use (0 to 5). A width of 0 indicates no width is selected. (Default:NONE) IF no options are specified, the fill patterns are reset to the default value. 15.64.26 FIT SET FIT [options] Sets the fitting options. See:Command FIT. 15.64.27 FLUSH FLUSH [ON|OFF] This selects automatic flush of plot data. When automatic flushing of data is on, plot data is displayed immediately after each interactive line of input. When OFF plot data is only displayed after a FLUSH command or when the plot buffer is full. Pause is normally on for interactive devices, and off for non interactive. 15.64.28 FONT This selects which fonts are used in generating plots. SET FONT [BASIC|EXTENDED|DUPLEX] 1. BASIC - 64 character uppercase font (not useful) 2. EXTENDED - Full font with Greek and lowercase (Default) 3. DUPLEX - Fancy font. This one may not look good on devices such as Tektronix 4010 with limited resolution. This also requires the most memory and time to generate. This option remains in effect until changed by a SET FONT command. The EXTENDED and DUPLEX fonts both use proportional spacing. If you wish to use a fixed spacing font See:Command SET MODE PROPORTIONAL. 15.64.29 FORMAT Sets the format used by the Fortran READ statement. SET FORMAT "format" This is useful if you wish to skip lines at the beginning of a line when you are using a list file as input to TOPDRAWER. Normally you do not need to use this command, unless the data is in an extremely weird format. The format is limited to 64 characters. (Default:(256A1) The number of columns is also limited by SET CARD. This option remains the same until changed by a SET FORMAT command. This option has no effect on input you enter interactively at the terminal. Example If you wish to skip the first 10 columns: TD:SET FORMAT "(10x,256A1)" 15.64.30 GRID This causes a grid to overlay the plot when axes are drawn. The grid lines are lined up with the large tick marks. This acts on the current plot only a new SET GRID is required for each plot or the options PERMANENT must be specified. The command must be followed by either a HIST, JOIN, BARGRAPH or PLOT command to be effective. SET GRID [ON|OFF] [Y|HORIZONTAL|X|VERTICAL!Z[=ON|OFF]] [SYMBOL[=sym]] [XY| YZ|ZX[=ON|OFF]] [CYCLE[=ON|OFF]] [OUTLINE[=ON|OFF]] [SIZE=n] [INTENSITY|WIDTH=n] [NOCOLOR|WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [NOTEXTURE|SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [THETA=n] [PHI=n] [ANGLE=n] [PERMANENT] 15.64.30.1 Options - 1. ON - Draws horizontal, vertical, and Z lines. 2. OFF - No grid is drawn. (Default) 3. Y|HORIZONTAL - Draws horizontal lines at Y major tics. 4. X|VERTICAL - Draws vertical lines at X major tics. 5. Z - Draws line perpendicular to Z at Z major tics. 6. :XY - Draws lines in XY plane. 7. YZ - Draws lines in YZ plane when THREE=ON. 8. ZX - Draws lines in ZX plane when THREE=ON. If XY,YZ,ZX are not specified, then all 3 are assumed to be on. 9. CYCLE - Draws the grid lines corresponding to Z major ticks in different colors, textures... according to the SET CYCLE command. (Default:OFF) 10. OUTLINE - Draws outline around 3-d grid. (Default:OFF) 11. INTENSITY - Sets line intensity or width (0-5). 0 gets the intensity from the SET INTENSITY or SET AXES command. 12. WHITE... - Sets the line color. (Default:Same as axes) 13. SOLID... - Sets the line texture. (Default:Same as axes) See:Command SET TEXTURE. 14. SYMBOL - Draws a symbol [sym] to be plotted at intersection of vertical and horizontal lines. (Default:sym=0O) 15. SIZE - sets the size of the grid symbols If the size is not set then it is adjusted automatically by the window size. 16. THETA,PHI - specify the normal to the grid symbol for 3-d plots. 17. ANGLE - rotates the symbol around the normal for 3-d plots. 18. PERMANENT - Sets the current grid options permanently for all NEW plots. If no options are specified, then all grid parameters are reset to the original defaults. (Default:OFF SYM='0O' INTEN=0 NOCOLOR NOTEXTURE THETA=0 PHI=0 ANGLE=0) 15.64.30.2 Example - TD:SET GRID DOTS VERT SYM=1O When the axes are plotted, a grid is drawn consisting of vertical dotted lines at each large X tick, and symbols at the intersection of large X and Y ticks. TD:SET GRID DOTS VERT HORIZ is the same as ... TD:SET GRID DOTS ON TD:SET GRID RED ON PERMANENT All subsequent plots with axes have red grids. TD:SET GRID SYM=0O THETA=90 PHI=90 The grid will be plotted with crosses as the grid symbol, oriented normal to the Y axis. The symbol lies in the XZ plane. TD:SET GRID X Y Z YZ ZX DOTS OUTLINE PERM Plots grids only on the YZ and ZX planes. Since only the XY plane exists for normal plots, TD will only put grids on 3-D plots. 15.64.31 HISTOGRAM SET HISTOGRAM [HBOOK|HANDYPAK|RICE] [APPEND[=ON|OFF]] [CHECK[=ON|OFF]] [CONFIRM[=ON|OFF]] [ENTRIES[=ON|OFF]] [ERRORS[=ON|OFF]] [OVERFLOWS[=ON|OFF]] [LOG[=ON|OFF]] [SECTION=section_name] [FILE=filename] [NUMBER=n] [SELECT|NAME='hist_name'] [IDENT=nnn] [EXACT[=ON|OFF]] [CURRENT|NEXT|PREVIOUS|FIRST|LAST] [PROCESS='Process_name'] [PID='nnnn'] [TITLE[=ON|OFF]] [WRAP[=ON|OFF] [HISTOGRAM[=ON|OFF]] [MESH[=ON|OFF]] HBOOK4 only [AREA|DIRECTORY[="directory"]] [TREE[=ON|OFF]] [WILD[=ON|OFF]] [SHRE=section_id] [IOFFSET=n] [CYCLE=n] NTUPLES [NTUPLES[=ON|OFF]] [EVENTS[=[FROM] n [TO] n] [[N][D]{X|Y|Z|U|V|W |THETA|RADIUS|PHI}=N] [NLIMIT[=n [FROM] n [TO] n] [NMASK[=n [IDENT=n] [X=n] [Y=n]] This selects a histogram and puts it into data storage. Once a histogram is selected, the data is available for plotting. The command: SHOW HISTOGRAMS Shows the current list of histograms available. LIST HISTOGRAMS Produces a listing of the current histograms. 15.64.31.1 Options - 1. APPEND - The hist is appended as a new data set 2. AREA="xxx/yyy/zzz" - Selects the histogram area. 3. CHECK - Turns on or off duplicate checking. 4. CONFIRM - You are asked before the histogram is set. 5. ENTRIES - Selects only histograms which have entries (data). 6. ERRORS - Sets the errors (DY). 7. EXACT - Histogram names are treated as exact strings, and they are not searched in a case independent manner. This must precede the option NAME="...". 8. SECTION=sectionname - Sets up a global section to RESTORE hists from. SEE:TOPDRAWER LINK 9. FILE - Specifies a direct access file to get histograms from. 10. HISTOGRAM - Selects only histogram (non mesh) data. 11. IDENT - The histogram number to set. 12. LOG - Informs you when it gets the data. 13. MESH - Chooses only MESH data. 14. NAME - Selects hist by name. 15. NUMBER - Then number of hists to fetch from the file. 16. NTUPLES - Selects only NTUPLES. 17. OVERFLOWS - Includes the overflows in the data set. 18. CURRENT|NEXT|PREVIOUS|FIRST|LAST - Selects the hist to get. 19. TITLE - Plots the histogram name as a title. 20. TREE - Searches through the entire directory tree. 21. WILD - Allows wild searches of areas in SHOW, MONITOR, SET, SAVE, RESTORE HISTOGRAM. If WILD=ON then the star "*" and percent "%" signs are reserved for wild searches. (Default:WILD=ON) 22. WRAP - Continues or terminates the search at the end of the list of histograms. 15.64.31.2 APPEND - The new data is appended to the current data as a new set rather than replacing it. If you omit ON or OFF then ON is assumed. (Default:APPEND=OFF) 15.64.31.3 AREA|DIRECTORY - This selects the histogram AREA or DIRECTORY. If you specify "//" or "/" then the "root" directory or "//PAWC" is selected. If the area begins with "/" then it is considered to be a subdirectory of the root. "" moves down the directory tree. "AAAA" move up the tree to subdirectory AAAA. and "aAAA" moves over to the adjacent subdirectory AAAA. Note that "" may need to be enclosed in quotes, unless you have SET CHAR ALPHA "". Unfortunately if you modify the meaning of "" then dates must be entered enclosed in angle brakets <1989523>. This is generally not necessary unless you have directories which consist entirely of numbers. If you use "wild" characters in an area name then a directory tree search is automatically done using the wild characters to select subdirectories. Wild characters are "*" which means and string, and "%" which means any character. example Assume you are in directory "//PAWC/X" TD:SET HIST AREA Y moves you to //PAWC/X/Y TD:SET HIST AREA "q" moves to //PAWC/X/Q TD:SET HIST AREA /A moves to //PAWC/A TD:SET HIST AREA // moves to //PAWC TD:SET HIST AREA /E* ID=2 Gets the first histogram with ID=2 from area //PAWC/ENERGY or //PAWC/ERROR... 15.64.31.4 CHECK - If on it TOPDRAWER issues a warining if there is a duplicate histogram for the selected one. This is normally on except when the options CURRENT, NEXT,PREVIOUS,LAST,FIRST are used. 15.64.31.5 CONFIRM - Each histogram that matches the specifications is logged, then you are asked whether you want to accept it. You reply: * Y,A - Yes accept it. * N - No, do not accept it (Default). * Q - Quit and stop asking questions. If you omit ON or OFF then ON is assumed. (Default:CONFIRM=OFF) 15.64.31.6 ENTRIES - If ON it selects only histograms which have entries (contain data). If OFF it selects only histograms without entries. The default is ON. 15.64.31.7 ERRORS - Set the error array DY or DZ. If this is specified for HBOOK and the histogram contains no errors, garbage may be collected in DY. For 2 dimensional or RICE histograms the ERROR=SQRT(Y). If you omit ON or OFF then ON is assumed. (Default:ERROR=ON when REVISION>4.30) 15.64.31.8 FILE - FILE=filename - Selects the filename to restore the histograms from. If IDENT is specified then the selected histogram is fetched from the file. If the filename is NONE then no file name is selected. If the filename is blank (FILE='') then the last opened file is used, or if none has been opened. HBOOK.BIN - For HBOOK4 direct access files. example TD:SET HIST FILE=MY_HISTS.BIN Gets the histograms from file MY_HISTS.BIN. TD:SET HIST FILE="MY_HISTS.BIN;1" Gets histograms from the first version of the file. 15.64.31.9 HISTOGRAM - If HISTOGRAM=ON selects only histograms. IDENT IDENT=nnn - Selects the histogram by id number. The data in the histogram is loaded into the data buffer. If this is combined with NAME='hist_name' then the next histogram that first matches either the ID or NAME is selected. 15.64.31.10 LOG - This causes TOPDRAWER to type the histogram name when it sets it. The histogram ID,NAME,size, and range of values is typed on your terminal. If you omit ON or OFF then ON is assumed. (Default:LOG=OFF) 15.64.31.11 MESH - If MESH=ON only histograms with 3-d or mesh data are set. If you omit ON or OFF then ON is assumed. example TD:SET HISTOGRAM NEXT MESH Gets the next mesh plot. 15.64.31.12 NTUPLES - You may select the NTUPLE data and put it into a 1-d histogram. These options remain the same, unless respecified. If the option is used without any parameters it is reset to the initial value. You may show the options by: SHOW HISTOGRAM SELECT These options are also used to control NTUPL usage by: DEFINE HISTOGRAM ADD/SUBTRACT commands 1. NTUPLES selects only NTUPLES. Normall NTUPLES are excluded, so you must use this option to look at NTUPLE data. 2. EVENTS FROM n1 TO N2 selects the event range The event selection remains the same, unless respecified. 3. X/DX/Y/DY...NDW=n selects the value to put into X/DX... from each NTUPLE Initially they are X=1, Y=2, ...W=6, DX=-1, DY=-2, DZ=-3. 0 is the event number while positive values are each of the variables in an NTUPLE. 4. NLIMIT=n FROM n1 TO N2 places limits on the selected value n. Where n is the coordinate in the NTUPLE. If specified without a value n or with n=0 then all limits are set. If all parameters are unspecified then all limits are reset to large values. 5. NMASK=n Sets MASK number n. If 0 all masks are cleared. A. IDENT=n Will mask the data by histogram n B. X=m Specifies which Variable to check against the X of histogram n Zero is the event number. C. Y=m Specifies which Variable to check against Y of histogram n The data is checked against the histogram and if the correspoinding bin of the histogram is non zero the NTUPL is kept, and discarded if not. These options are also use by the DEFINE HISTOGRAM command to ADD or SUBTRACT NTUPL data from histograms. example You have an NTUPLE with 6 coordinate values A,B,C,D,E,F You may place all of the C values into X and the F values into Y While limiting the B values to the range -1 to 1. TD:SET HIST ID=5 EVENTS X=3 Y=6 NLIMIT=2 FROM -1 TO 1 The resulting data may then be histogrammed using the BIN command. 15.64.31.13 NUMBER - The number of hists to fetch when specifying FILE=name. This only works it the ID was specified along with the FILE name. example TD:SET HIST FILE=my_file IDENT=200 NUMBER=25 Fetches 25 histograms from my_file beginning from number 200. Hist number 200 is put into data. 15.64.31.14 OVERFLOWS - Selects underflow and overflow data in the first and last bin of the histogram. If you omit ON or OFF then ON is assumed. (Default:OVERFLOWS=OFF) 15.64.31.15 CURRENT|NEXT|PREVIOUS|FIRST|LAST - Selects the current, next, previous, first or last histogram. This may be modified by ID=n, NAME='hist_name', MESH... to select the next histogram with the desired ID, NAME, or type. When NEXT, PREVIOUS, FIRST or LAST are specified, no error messages are issued for duplicate histograms selected one. 15.64.31.16 SECTION - SECTION=SECTION_NAME maps a global section to Topdrawer, for getting histograms. If IDENT is specified then the selected histogram is fetched from the global section. If the section has a blank name (SECTION="") the already mapped section is used. SEE:TOPDRAWER LINK To show available global sections: $ INSTALL :==$sys$system:install/command $ INSTALL LIST/GLOBALS The available globals sections will be near the end under the category Group Globals. 15.64.31.17 SELECT - NAME='hist_name' Selects the histogram by name or title. The data in the histogram is loaded into the data buffer. The entire list of histograms is searched starting at the first one for a name matching the hist_name. If a histogram has more characters in its name than the hist_name, the extra characters are ignored. If the option NEXT, PREVIOUS, FIRST, or LAST is used, the search begins from the NEXT, PREVIOUS, FIRST, or LAST histogram. Percent '%' and star '*' are wild characters. '%' means any single character while '*' means any character string. For example NAME='*ENERGY' will select a histogram name containing the word ENERGY. However NAME='ENERGY' will select a histogram beginning with the word ENERGY. NAME='*PI*ENERGY' will find all histograms with the name containing the string 'PI' followed by the word ENERGY separated by any number of characters. The case of the hist_name is ignored. If more than 1 histogram match the selected name, a warning message is issued. 15.64.31.18 TITLE - This plots the histogram name as a title. The name may be split into 4 parts, Top, X, Y, and Z by separating them with semicolons. Top label;X label;Y label;Z label If the number of lines is insufficient for a title, then it is omitted. For example you wish to omit the Y title so you: TD:SET TITLE LEFT LINES=0 WARNING For 3-D histograms the title should not be plotted until after the histogram has been plotted. If you omit ON or OFF then ON is assumed. (Default:TITLE=OFF) 15.64.31.19 TREE - Searches the entire directory tree for the histogram starting with the current area. This option remains set from one SET HISTOGRAM command to the next. You may only search a directory tree in a forward directions so this does not work for the option PREVIOUS or LAST. Essentially the first time you specify TREE the entire directory tree is setup for a search. Subsequent SET HISTOGRAM commands should not use the TREE option unless a new search is desired. 15.64.31.20 WILD - If WILD is on then the characters "*" and "%" are "wild" and may be used in AREA names. A wild character in an area causes a directory tree search, of only the selected subdirectories. 15.64.31.21 WRAP - If WRAP is on then when you SET HIST NEXT and the current histogram is the last one, the histogram number will wrap around to the first number. Similarly SET HIST PREVIOUS will wrap around to the last one. If you specify WRAP=OFF then you will get a warning message instead of wrapping. If you omit ON or OFF then ON is assumed. By default WRAP is ON when TOPDRAWER is used interactively, but OFF when it is used in a batch stream. 15.64.31.22 Lexicals - When a histogram is set S_HIST_NAME contains the the current histogram name. If the histogram package has limits or markers set on the histogram they are put into V_XMARKER[n] and V_YMARKER[n]. HBOOK has no markers. The number of markers is limited to n=8. The lexicals are set to a very large number 1.0E+30 if they do not contain markers. 15.64.31.23 Restrictions - The maximum number of histograms you may restore is 499. The maximum memory for HBOOK histograms is 150,000 words. (1.2 Mbyte) The maximum title length is 256 characters. If you have a file exceeding these restrictions you must restore each histogram individually by: TD:SET HISTOGRAM HBOOK FILE=name ID=n 15.64.31.24 Examples - The following sequence will plot a histogram stored by HSTORE. TD:RESTORE HIST FETCH FILE=filename (Get the hists) TD:SET HIST ID=5;HIST or... TD:SET HIST NAME='title of hist 5' TD:HISTOGRAM or... TD:SET HIST HBOOK FILE=filename ID=5 TD:HISTOGRAM TD:SET HIST NAME='ENERGY' sets the first histogram named "ENERGY...." into the data array. TD:SET HIST NEXT NAME="*ENERGY" sets the next histogram with a title containing the word "ENERGY". TD:SET HIST NEXT NAME='*ENERGY' CONFIRM types the name of each histogram containing the word "ENERGY", then you are asked if it is acceptable. You type "Y" if it is, and press "Return" if it is not. TD:SET HIST LAST HIST NAME='ENERGY' sets the last 1 dimensional histogram named "ENERGY...." into the data array. 15.64.32 INPUT See command: SET CARD 15.64.33 INTENSITY SET {INTENSITY|WIDTH} level [PERMANENT] This sets the intensity level or line width of a plot. The permanent default is restored when a new plot is started. level=1 to 5. (Default:2) 5 is the brightest (widest). If no intensity is specified it is set to 2. PERMANENT - Sets the current width to be the new default. 15.64.34 LABELS This sets the size and enables the numeric labels on each axis. To control the default number of ticks see SET SCALE. SET LABELS [SIZE=n] [CHARACTERS=n] [INSIDE[=ON|OFF] [ALL|TOP|BOTTOM|RIGHT| LEFT|X|Y|Z] [ON|OFF] [SHIFT=n] [INTENSITY|WIDTH=n] [NOCOLOR|WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [PERMANENT] This acts on the current plot only if PERMANENT not specified. If the parameters are omitted they are reset to the original default. To control other individual elements of the axes use: SET AXES, SET TICKS, SET OUTLINE, SET SCALES (DEFAULT:LEFT ON,BOTTOM ON) 15.64.34.1 ALL|TOP|BOTTOM|LEFT|RIGHT - Selects labels for top, bottom, right and left. Top selects labels for the TOP of plot and so on. 15.64.34.2 X|Y|Z - selects the axis to plot. Y selects both LEFT and RIGHT, while X selects TOP and BOTTOM. 15.64.34.3 CHARACTERS - CHARACTERS=n specifies the maximum number of characters in left or right titles. When setting up the windows room is allocated for the specified number of characters. The room is only allocated if the corresponding axis and labels are enabled. If negative the actual number of characters needed is used to locate titles. LEFT or RIGHT titles are only moved over according to the number of actual characters if they are plotted after the corresponding axes. Example TD:SET LABELS CHARACTERS=4 PERMANENT All plots will allocate room for 4 character labels on the left and right. TD:SET LABELS CHARACTERS=-6 TD:PLOT AXES TD:TITLE LEFT 'Flush title First the window is allocated leaving room for 6 characters, then the title is located according to the actual number of characters used to form the labels. 15.64.34.4 INSIDE - INSIDE=OFF turns off labels for adjacent axes of negative windows. If you wish to plot data in a set of windows with the same scales and limits, you may want to have each window flush against the next one. This is achieved by using negative windows. Unfortunately when plotting the axes, you will get labels inside the windows. With INSIDE=OFF you will only get labels on the perimeter. Example Assume you have 6 data sets to plot in separate windows. TD:SET LABELS INDIDE=OFF TD:SET WINDOW X 1.2 OF -3.5 Y 1.2 OF -2.5 SET WINDOW 1;PLOT SET=1 SET WINDOW 2;PLOT SET=2 SET WINDOW 3;PLOT SET=3 .... 15.64.34.5 SIZE - SIZE=n is the character size in tenths of an inch Normally this is automatically set according to the paper size, and window to give you pleasing results. This applies to all labels. The units may be modified by SET UNITS CHARACTER. (Default:2) 15.64.34.6 SHIFT - selects the amount to shift the label from the edge of the plot to the center of the first character. It is specified as the number of characters. This should be preceded by the option ALL,BOTTOM.... If the axis is not specified ALL is assumed. 15.64.34.7 ON|OFF - Allows or prevents drawing labels This should be preceded by the option ALL,BOTTOM.... If the axis is not specified ALL is assumed. 15.64.34.8 INTENSITY - Sets line intensity or width (0-5). 0 gets the intensity from the SET INTENSITY command. 15.64.34.9 WHITE... - Sets the line color. 15.64.34.10 PERMANENT - Makes the current settings permanent from plot to plot. 15.64.34.11 Examples - TD:SET LABELS ON SHIFT=2 Selects labels on all axes shifted by 2. TD:SET LABELS RIGHT ON SHIFT=2 Selects labels for the right hand axis shifted by 2. All other axes remain the same. TD:SET LABELS ALL OFF TOP ON RIGHT ON SHIFT=2 Selects labels on the top,right axes only. The right label will be shifted by 2. The shift for the other axes remains the same. 15.64.35 LIMITS SET LIMITS [CURSOR] [PERMANENT] [SCALE n1 [[TO] n2]] either... FROM [X=]nx,[[Y=]ny,[[Z=]nz]]] TO [X=]nx,[[Y=]ny,[[Z=]nz]]] or... [X [FROM] x [TO] x] [Y [FROM] y [TO] y] [Z [FROM] z [TO] z] [XMIN=x] [XMAX=x] [YMIN=y] [YMAX=y] [ZMIN=z] [ZMAX=z] [PERMANENT] Limits define the space to draw the data. They do not necessarily limit the data points plotted. Normally limits are automatically set from all available data during the first plot. If you read data, plot and then read more data and plot again, the first data set determines the limits. This command allows you to set the limits of the plot independently of the data. This should be used before the first PLOT, JOIN, HIST, or BARGRAPH command. The limits are reset when a new plot is started. If this command is issued without any limits specified, all currently set limits are removed. WARNING If this command is issued in between 2 plots overlaying each other, they will not have the same scales. See also:SET WINDOW 15.64.35.1 SCALE - This sets a uniform scale for both X,Y. The window size is n1/n2 of the displayed X,Y. If n2 is omitted it is assumed to be 1.0. If both n1 and n2 are omitted, both x,y have the same scale as determined by the limits, and window size. The plot is centered with respect to any selected limits. TD:SET LIMITS X 20,40 Y 40,60 SCALE 1 to 10 TD:SET WINDOW X 1 to 4 Y 1 to 2 The X is displayed from 10 to 50 Y is displayed from 40 to 60. 15.64.35.2 CURSOR - CURSOR puts a cursor on the screen. Move the cursor to the desired first limits. Then hit the space bar. Next move the cursor to the desired second limits, and again hit the space bar. A new set of limits are now set for the next graph. If you wish to set only the X limit hit "X" instead of "space". Likewise hit "Y" or "Z" if you wish to set only Y or Z limits. The new limits are entered into the journal file. If both X limits are the same, then they are ignored. Likewise identical Y or Z limits are ignored. For 3-d data the limits are not changed. Instead the parameters SCRD, THETA, PHI, and CENTER are adjusted. The CURSOR option should be the last option in the command line for 3-d plots. For example the following command will set new limits, and replot the current data: TD:SET LIM CUR;NEW;PLOT 15.64.35.3 PERMANENT - PERMANENT sets the current limits permanently or until the next SET LIMIT command. If you wish to unset permanent limits, set them permanently immediately after an NEW PLOT command. 15.64.35.4 Example - The following commands are equivalent: TD:SET LIMITS X FROM 0 to 10.0 Y 5 6 TD:SET LIMITS X 0 10 Y FROM 5.0 to 6.0 TD:SET LIMITS XMIN=0.0 XMAX=10.0 YMIN=5 YMAX=6 TD:SET LIMITS FROM 0.0,5 TO 10.0,6 TD:SET LIMITS FROM Y=5 X=0.0 TO Y=6 X=10.0 15.64.36 MODE This controls a grab-bag of options. SET MODE [AUTOPLOT[=ON|OFF]] [ABORT[=ON|OFF]] [APPEND[=ON|OFF]] [CHECK[=ON|OFF]] [CONFIRM[=ON|OFF]] [ERASE[=ON|OFF]] [DEBUG[=ON|OFF]] [ECHO=[n]|NOECHO] [EXPAND[=ON|OFF]] [FILECASE=UPPER|LOWER|MIXED] [HARDTEXTURE[=ON|OFF]] [JOURNALING[=ON|OFF]] [LISTING[=ON|OFF]] [LOG[=ON|OFF]] [MONITOR[=ON|OFF]] [PROPORTIONAL[=ON|OFF]] [QUICK|SLOW] [SHOW[=ON|OFF]] [TITLE[=ON|OFF]] [TRACE[=ON|OFF]] [TREE[=ON|OFF]] [VECTOR[=ON|OFF]] [VLOG[=ON|OFF]] If ON|OFF is omitted ON is assumed. Most of these options remain the same until explicitly reset. They are generally not reset by a NEW PLOT command. (Default:AUTOPLOT=ON, ABORT=ON, APPEND=OFF, CONFIRM=OFF, ERASE=OFF, DEBUG=OFF, ECHO=20, HARD=ON, JOURNALING=ON, LISTING=ON, LOG=OFF, MONITOR=OFF, PROPORTIONAL=ON, SHOW=OFF, TRACE=OFF, TREE=OFF, VECTOR=ON) 15.64.36.1 AUTOPLOT - If an EXIT or CLEAR command occurs and none of the current data set has been histogrammed, plotted, or joined, then it is plotted. When AUTOPLOT is off no plotting is automatically done. 15.64.36.2 ABORT - If an error occurs during a command the command is aborted. This applies generally to commands that produce output such as ARROW, BOX, CIRCLE, HISTOGRAM, PLOT, BAR, JOIN, and LIST as well as SMOOTH, BIN, X=, and so on. It does not apply to the SET commands. In addition ABORT just prevents journaling of inconvenient commands such as SHOW, SPAWN, and HELP. 15.64.36.3 APPEND - This is equivalent to using the APPEND option for all commands that create new data sets. 15.64.36.4 CONFIRM - This is equivalent to using the CONFIRM option for any command that uses this option. When this mode is on you must confirm all data deletions with a YES, NO, QUIT, or ALL answer. 15.64.36.5 CHECK - CHECK=OFF is equivalent to using the CHECK=OFF option for commands such as ADD, SMOOTH, FFT, DEFINE HIST .... It turns off the checks for appropriate data. Usually this means that the data must be a histogram with equally spaced bins. For commands that take 2 data sets there is the requirement that the data sets must match. 15.64.36.6 DATAVECTOR - This modifies the interpretation of DX,DY,DZ to be vector components. It modifies only the PLOT, ADD, SUBTRACT, and MULTIPLY commands. 15.64.36.7 DEBUG - Automatic flush at the end of each command. If you SET FILE LIST=TT: and DEBUG=ON you can see each command and its result in order. For compatability with previous versions NODEBUG is a synonym for DEBUG=OFF. 15.64.36.8 ECHO - ECHO=n selects n data points to be listed when read. NOECHO is the same as ECHO=0 If you do not specify n it is assumed to be 1000. 15.64.36.9 ERASE - Selects erase mode for plotting. While plotting in this mode The plotted data erases previous data. This mode is reset to ERASE=OFF whenever a new plot is begun. 15.64.36.10 EXPAND - Selects EXPAND=ON whenever you PLOT, JOIN, or HISTOGRAM. 15.64.36.11 FILECASE - Selects the case of file names. 1. Upper - File names are converted to upper case 2. Lower - File names are converted to lower case 3. Mixed - The case remains the same as typed. If a file name is enclosed in quotes, then it is never converted. 15.64.36.12 HARDTEXTURE - Selects hardware or software texture generation. 15.64.36.13 JOURNALING - Turns on or off output to the journal file. 15.64.36.14 LISTING - Turns on or off the output to the listing file. 15.64.36.15 LOG - Turns on or off automatic logging. Many commands use the option LOG to tell you what they are doint. When logging mode is on these commands automatically log teir actions. For example with LOG=ON when you use the MULTIPLY command, it informs you which data sets are multiplied. 15.64.36.16 MONITOR - This is the same as using the MONITOR option for all commands where it is legal. For example if MODE MONITOR=ON then when you do a fit the result is automatically plotted. 15.64.36.17 PROPORTIONAL - Selects proportional or fixed spacing for the text. 15.64.36.18 QUICK - This turns off certain calculations to make plotting faster. One side effect of this is to prevent proper centering or justification of titles, and labels. If you wish both speed and proper justification, you can get proper justification for titles with no sub/superscripts by: TD:SET MODE PROPORTIONAL=OFF Plots can be made still faster by: TD:SET MODE VECTOR=OFF This only works if your output device has hardware character generation for the size characters you select. 15.64.36.19 SHOW - Show mode automatically generates a SHOW command after any SET command is used. 15.64.36.20 TITLE - Automatically plots the title of a data set along with the data when you use a CONTOUR, HISTOGRAM, JOIN, or PLOT command. This is equivalent to specifying TITLE=ON along with the commmand. 15.64.36.21 TRACE - Produces traceback whenever an error occurrs. For compatability with previous versions NOTRACE is a synonym for TRACE=OFF. 15.64.36.22 TREE - Setting mode TREE=ON is the same as specifying TREE=ON for any command that uses this option. This is used when searching HBOOK4 for histograms. 15.64.36.23 VECTOR - VECTOR=ON requires software drawn characters instead of hardware chars. Character generation is slower, but more uniform. Software characters are always drawn when a non blank case string is supplied, or if your output device can not produce hardware characters in the size selected. You may request hardware characters by setting the title/label size to a negative value. For compatability with previous versions NOVECTOR is a synonym for VECTOR=OFF. 15.64.36.24 VLOG - Enables Video logging. When you use the cursor a Cross will be drawn at the selected cursor location, and a dotted line will be drawn around the resulting limits. 15.64.37 MONITOR This sets the type of plot each monitor mode produces. SET MONITOR [{ALL|DATA|MESH} {BIN|CONTOUR|JOIN|HISTOGRAM|PLOT "options"}] The options may be any legitimate options for the type of plot selected. If you do not supply any options then the defaults are used. example TD:SET MONITOR MESH HISTOGRAM "BLOCK" Produces a block or "Lego" plot when you monitor a mesh histogram. TD:SET MONITOR DATA JOIN "1 dots Joins normal data sets with single dotted line segments. TD:SET MONITOR DATA PLOT "SYM=5O" MESH JOIN Plots normal data and joins mesh data. (Default:MESH PLOT "NORAN VAR SYM=10" DATA HISTOGRAM "") 15.64.38 NAME SET NAME "New data set name" [CONFIRM[=ON|OFF]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="old name"] Sets a new name for all the selected data sets. If no sets are specified, then all data set names are modified. If the name ends in "%" then the old name is appended to the new name. Options 1. CONFIRM - If selected Topdrawer will prompt you for each data set. You repy YES, NO, ALL, or QUIT. ALL will do the rest without any more prompts, while QUIT skips all the rest. 2. SETS - Selects a range of data sets to rename. 3. SELECT - Selects the data sets by name. WIld characters are permitted "*" or "%" See:SET EXACT. Example TD:SET NAME "My data" SET=5 Data set number 5 has the new name "My data" TD:SET NAME "My %" SELECT="Your*" All data sets beginning with the name "Your" are renamed to "My Your..." 15.64.39 ORDER This sets the order in which data must be entered. The order is the same as specified in the set order command. This option remains the same until the next SET ORDER or NEW PLOT command. This has no effect on mesh data input. SET ORDER [[N][R|D]{X|THETA} [fctr]] [[N][R|D]{Y|RADIUS} [fctr]] [[N][R| D]{Z|PHI} [fctr]] [[N][R|D]U [fctr]] [[N][R|D]V [fctr]] [[N][R| D]W [fctr]] [SYMBOL] [DUMMY[=n]] [PACKED[=ON|OFF]] [PERMANENT] 15.64.39.1 Options - 1. X,Y,Z - The data to plot 2. U,V,W - Auxiliary coordinate data 3. DX,DY,...DW - The error on the data as half width for the error bars. 4. NDX,NDY,...NDW - The negative half of the error bar. If not defined then it is the same as the error (DX...). 5. RX,RY,...NRX,...NDW - Errors given relative to the central value. (DX=RX*X) 6. RADIUS,DRADIUS,THETA,DTHETA - Polar coordinates are also enabled for the current plot. 7. PHI,DPHI - Spherical coordinates are enabled for the current plot. 8. RRADIUS,RTHETA,RPHI - Errors given relative to a central value. If PHI is used SPHERICAL is enabled, otherwise POLAR is enabled. 9. SYMBOL - The symbol to plot. This should not be the first item. If you need to have the symbol first, then you must use the READ POINTS command, or omit the symbol for the first data point. 10. DUMMY - Specifies this entry is a dummy and should be ignored. If n is specified then n entries are ignored. Only numbers are ignored. 11. fctr - Is a scale factor to multiply the data by when it is read. (Default:1.0) 12. PACKED - Specifies that dats is in packed format with several points per line and no semicolons ";" between them. 13. PERMANENT - Specifies that this order is permanent until the next SET ORDER command. (Default:X 1.0,Y 1.0,DX 1.0,DY 1.0,SYMBOL) If this command is used without any options other than PERMANENT, the order is set to the default. Numeric fields preceding the symbol may be onitted. 15.64.39.2 Examples - TD:SET ORDER X,Y,DX,DY,SYMBOL,Z,DZ TD:1,2 1O 3,4,5,6,7 Enters a point X=1, Y=2, DX=DY=0, SYMBOL=1O, Z=3, DZ=4 The numbers 5,6, and 7 are ignored. SET ORDER X Y PACKED 1 2 3 4 Enters 2 points X=1,Y=2 and X=3,Y=4 SET ORDER Y PACKED 1 3 5 X=0 BY 1 Enters 3 points (0,1), (1,3) and (2,5) 15.64.40 OUTLINE This enables the outline on each axis. The outline is the line drawn at the edge of the plot. SET {OUTLINE|FRAME} [INHIBIT|ENABLE] [ALL|TOP|BOTTOM|RIGHT|LEFT] [ON|OFF] [INTENSITY|WIDTH=n] [NOCOLOR|WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [NOTEXTURE|SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [PERMANENT] This acts on the current plot only if PERMANENT not specified. To control other individual elements of the axes use: SET AXES, SET TICKS, SET LABELS, SET SCALES (Default:ON) 15.64.40.1 Options - 1. INHIBIT|ENABLE - inhibits or enables the automatic outline generation for the current plot or window. (Default:ENABLE) You may still draw the outline with the PLOT OUTLINE command. 2. ALL - enables outlines for top, bottom, right and left. 3. TOP - enables outline for the TOP of plot 4. BOTTOM - selects outline for the bottom of the plot. 5. RIGHT - selects outline for the right hand side 6. LEFT - selects outline for the left hand side. 7. ON - allows drawing outlines 8. OFF - prevents drawing outlines 9. INTENSITY - Sets line intensity or width (0-5). 0 gets the intensity from the SET INTENSITY or SET AXES command. 10. WHITE... - Sets the line color. 11. SOLID... - Sets the line texture. (Default:SOLID) See:Command SET TEXTURE 12. PERMANENT - Makes the current settings permanent from plot to plot. 15.64.41 PATTERN This selects the pattern for patterned lines. These are produced by JOIN, HIST, PLOT, or BAR commands. This option remains the same until changed by a SET PATTERN command. SET PATTERN [RANDOM|FUNNY] [DOT] [DASH] [DAASH] [SPACE] [SIZE=n] [PERMANENT] SET PATTERN p1 s1 p2 s2 ....p10 s10 1. RANDOM - The distance following this is random. 2. DOT - Draws a single dot followed by a 0.1" space. 3. DASH - Draws a short dash 0.1" long followed by 0.1" space. 4. DAASH - Draws a long dash 0.3" followed by 0.1" space. 5. SPACE - Adds 0.05" of blank space. 6. SIZE=n - Size of dashes, and the distance between dashes and dots. (Default:0.1) 7. p = distance to draw in inches. If negative it varies randomly. 8. s = distance to skip in inches. If negative it varies randomly. 9. PERMANENT - Makes the current SIZE the permanent default. You may enter up to a maximum of 20 values or 10 DOT/DASH/DAASH specifiers. Random values vary from zero to the value specified. You may also specify patterns as part of any drawing command. For example: TD:HISTOGRAM PATTERN DOT DOT DASH is the same as ... TD:SET PATTERN DOT DOT DASH; HISTOGRAM PATTERN or... TD:HISTOGRAM DOT DOT DASH See:Command SET TEXTURE 15.64.41.1 Example - TD:SET PATTERN DOT DOT DASH DASH or... TD:SET PATTERN 0.,.1,0.,.1,.1,.1,.1,.1 is a dot,dot,dash,dash pattern TD:SET PATTERN DOT DOT SPACE or... TD:SET PATTERN 0,.1,0,.15 is an assymmetrical dot,dot pattern. TD:SET PATTERN .3,.1,.1,.1 or... TD:SET PATTERN DAASH DASH is a long,short dash pattern. TD:SET PATTERN -.2,.1 is a dash pattern where the dash varies in length from 0.0 to 0.2 TD:SET PATTERN RANDOM DOT or... TD:SET PATTERN 0.0,-0.1 is a randomly spaced dot pattern. TD:SET PATTERN RANDOM DOT DASH or... TD:SET PATTERN 0,-.1,.1,.1 is a random dot,fixed dash pattern. TD:SET PATTERN SIZE=.05 DOT DASH or... TD:SET PATTERN 0,.05,.05,.05 is a small dot dash pattern. 15.64.42 PAUSE SET PAUSE|WAIT [ON|OFF] Pause is normally set on for interactive devices, and off for non interactive. The Pause occurrs at each NEW PLOT command inside an input file, or when deferred errors must be typed. 15.64.43 PEN This selects the default Calcomp plotter pens or the color. This is effective only for the current plot, or until another SET COLOR or SET PEN command. SET PEN 1|2|3|4|5|6|7 See:Command SET COLOR (Default:1) If no pen number is specified it is set to 1. 15.64.44 POLAR SET POLAR [ON|OFF] [DEGREES|RADIANS|GRAD|PERCENT|FULLCIRCLE=n] [PERMANENT] This sets up to plot in polar coordinates. Coordinates are (R,THETA,Z) representaton. This affects not only the plotting of data, but also the FFT and TRANSFORM commands. 1. ON|OFF turn the polar coordinates on or off. (Default:ON) 2. PERMANENT - Sets these parameters permanently. 3. DEGREES... - Selects angle representation (Default:DEGREES) A. GRAD - (0-400) B. DEGREES - (0-360) C. PERCENT - (0-100) D. RADIANS - (0-6.2831853) E. FULLCIRCLE=n - (0-n) This feature is not fully implemented. You still set the limits in X,Y,Z coordinates, and automatic scaling centers the origin. When you plot, the axes are not automatically generated if polar coordinates are on. You must manually plot the axes with the command: PLOT AXES. If you wish the X and Y axes to be scaled the same way you should. TD:SET LIMITS SCALE See commands:X,SET ORDER,SET STORAGE,SET SPHERICAL Example TD:SET POLAR FULL=1.0 Angles represented by a number from 0 to 1.0 range from 0 to 360 degrees. 15.64.45 PROMPT SET PROMPT [MAIN|PAUSE] [ERASE] [TOP] [BOTTOM] [BELL] [nn] ["prompt_string"] This sets the current prompt string with a maximum of 80 characters. If a null or blank string is used, then there is no prompt. If a prompt has imbedded blanks it must be enclosed in quotes. The prompt string remains the same until a new one is selected. 1. MAIN - Is the main prompt string. (Default:"TD:") 2. PAUSE - Is the prompt string used when a NEW PLOT is started. (Default:"PAUSE:") 3. ERASE - The prompt erases the screen (ANSI terminal). This erases text from a VT-1xx/2xx compatible terminal. This does not erase TEKTRONIX graphics, but REGIS graphics will be erased. This must be precede the string. 4. TOP - The prompt is at the top of the screen (ANSI terminal). 5. BOTTOM - The prompt is at the bottom of the screen (ANSI terminal). 6. BELL - This rings the bell for each prompt. 7. nn - This inserts a control character (0-255) into the string. 8. This command is useful for controlling the prompt for different types of terminals. On some terminals you can control the position of the prompt, so that it will not interfere with the plot, while on others, you may not want any prompts. 15.64.45.1 Examples - TD:SET PROMPT MAIN TOPDRAWER: PAUSE " " Changes the main prompt and sets no prompt for pause. TD:SET PROMPT MAIN "TD: " This puts a space at the end of the prompt. TD:SET PROMPT MAIN=TOP "TD:" or... TD:SET PROMPT MAIN=27,"[f",27,"[KTD:" Puts the prompt at the top of an ANSI (VT100 etc.) terminal for the prompt. 15.64.46 REVISION SET REVISION=n.m Sets the current revision level. This affects the operation of TOPDRAWER. By lowering the revision level you may return to old behavior. Some of the old revision levels are: * 1.0 - Original version * 2.0 - SET THREE THETA modified to conform to documentation. * 2.2 - X= SET=n FROM=n1 TO=n2... Worked incorrectly if n>1. 15.64.47 SECONDARY SET SECONDARY [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [NOTEXTURE|SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] 15.64.48 SEGMENTS SET SEGMENTS [ALL |AXES |LABELS |OULINE |POINTS |PLOTS |TICKS |TITLES =[ON|OFF]] Breaks the selected objects into separate segments. Each segment is immediately flushed. 15.64.49 SCALE This selects the scales to use. To select the range of data to plot See:Command SET LIMITS. SET SCALE {X|Y|Z|ALL} [LINEAR] [MONTHS] [YEARS] [DAYS|TIME|HOURS|MINUTES|SECONDS] [POWER[=n]|ROOT[=n]] [USER=[n1[,n2,...n10]]] [LABELS|TICKS=n [LONG|SHORT|NONE]] [NORMAL [MEAN=x] [DEVIATION=s] ] [[-]LOGARITHMIC] [LABELS=n1,n2... [EXPONENTIAL[=ON|OFF]][NONE]] [TICKS=n1,n2... [LONG|SHORT|ALL|NONE]] [DECADES=n] [SUBTICKS=n] [REVERSE[=ON|OFF]] [BASE=n] [PERMANENT] To control other individual elements of the axes use: SET AXES, SET TICKS, SET LABELS, SET OUTLINE (Default:ALL LINEAR LABELS=6 TICKS=5) 15.64.49.1 X|Y|Z|ALL - Selects which axis to set. You may set all three axes with one set axes command. 15.64.49.2 BASE - BASE=n - Selects the base for the plot. * LINEAR this is useful for non-decimal units. The labeled ticks are put at locations BASE*ROUND*POWER where: POWER = a power of 10 1,10,100 ROUND = 1.0,1.0,2.5, or 5.0 * LOG scaling large ticks are put at powers of the base. This determines where ticks are put. BASE 2 would put labels at 1, 2, 4, 8, 16,.... If exponential notation is selected then the base is used in the notation. 15.64.49.3 DAYS - Values are the number of days from the base date. See:Command SET SCALE TIME 15.64.49.4 LABELS - This selects the maximum number of ticks with labels. For more information See:LINEAR or LOGARITHMIC. 15.64.49.5 LINEAR - Linear scale is used * LABELS - maximum number of big ticks with labels. (Default:6) * TICKS - number of subintervals with unlabeled ticks. SHORT|LONG determine whether the unlabeled ticks are short or long. If unspecified SHORT is assumed. (Default:5 SHORT) If TICKS=1 then there are no unlabeled ticks. 15.64.49.6 LOGARITHMIC - Log scale is used. Each decade may be divided into subintervals corresponding to the leading digit of the scale (1,2...,9). -LOGARITHMIC generates a log scale for negative values. * LABELS=n1,n2.. - Specify which subintervals within a decade are labeled (2-9). ALL labels all subintervals while NONE labels no subintervals. If you specify NONE then no subintervals are labelled. If EXPONENTIAL is specified exponential notation is used. * TICKS=n1... - specifies which subintervals have unlabeled ticks (2-9). ALL puts ticks on all subintervals while NONE draws no ticks. SHORT|LONG determine whether labelled ticks are short or long. If unspecified LONG is assumed. Labelled ticks at each decade are always long. * DECADES=n - (1 to 31) Specifies how often decades are labelled. For example DECADES=2 labels every other decade. * SUBTICKS=n - (0-9) Specifies how many subticks are between subinterval ticks. If n is greater than 0 then long ticks are drawn at for each interval and n short subticks are drawn in between. If unspecified labels, and ticks are picked for "pleasing" results. Generally if less than one half decade is plotted the rules for making linear scales and ticks are followed. Otherwise a maximum of 6 or 7 labels are produced. Exponential notation is only used if specified or when the the label would exceed 6 digits or more than 3 decades are plotted. 15.64.49.7 MINUTES - Values are the number of minutes from the base date. See:Command SET SCALE TIME. 15.64.49.8 MONTHS - This selects labels of the form Jan, Feb etc. This invokes a special scale where Noon Jan 1=1.01 An entire day is from 1.005 to 1.015. 1,13,25 are labeled January. 2,14 is February and so on. No year titles are generated. Every 4'th year is a leap year with 366 days. Year 1,2,3 are non leap years while years 4,8,12 are leap years. The current year is number 1. 1. LABELS - The value n specifies the maximum number of labels. SHORT,LONG generate either 1 Letter labels or 3 Letter labels. (Default:1) 2. TICKS - Specify the maximum number of small ticks between labels. SHORT,LONG specify either long or short ticks. (Default:6 SHORT) 15.64.49.9 NORMAL - The scale is in units of standard deviation from the center of a normal curve. MEAN, DEVIATION set the center, and width of the normal curve. 15.64.49.10 POWER|ROOT - This sets the scale to be the selected power or root. N must be in the range 0.1 to 100. If n is not specified it is assumed to be 2. The sign of the axes is preserved to avoid multiple values. The rules for determining ticks and labels are the same as for linear scales. Example TD:SET SCALE Y ROOT=3 Y is scaled as Y'=SIGN(ABS(Y)**(1/3),Y) TD:SET SCALE X POWER=2 X is scaled as X'=SIGN(ABS(X)**2,X) 15.64.49.11 REVERSE - If this is specified before any data is plotter it makes the scale go from large to small rather than small to large. For example the limits on the x scale are 0.0 and 1.1. The left hand side of the X axis would be 0.0 and the right would be 1.0. REVERSE makes the left hand side 1.0 and the right hand side 0.0. If this is specified for 3-d plots after the data is plotted, it moves the origin of the axes to the other side of the specified axis. For example the following will plot axes along the sides of a 3-d cube. TD:plot axes TD:set scale x reverse y reverse;plot axes TD:set scale x reverse=off y reverse z reverse;plot axes TD:set scale x reverse=on y reverse=off;plot axes 15.64.49.12 SECONDS - Values are the number of seconds from the base date. See:Command SET SCALE TIME 15.64.49.13 TICKS - This selects the maximum number of unlabeled ticks. This varies with the type of scale selected. For more inforation see:LINEAR or LOGARITHMIC. 15.64.49.14 TIME-HOURS - Values are the number of hours from the base date. Normally date/time may be expressed as YYY\MM\DD or YYY\MM\DD\HH:MM:SS.SS or HH:MM:SS.SS. This is translated into the number of hours from the base date. See:Command SET DATE. You may have the axes labels in date/time format by selecting either a time or hour scale. If the time is stored as seconds,minutes, or days then you may select the scale appropriately. 15.64.49.15 USER - USER=n1,n1... specifies the type of user scale. This is only useful if you supply your own scaling routines. n1 is the scale type. n2...n10 are values passed to the user routine. The user function is called: Value=TDFNCT(X,SCALE) X is the value to rescale. SCALE(10) is the array of values n1...n10. For example a log scale would be: TDFNCT=ALOG(X) 15.64.49.16 YEARS - Values are given by year and Julian day. YEAR+DAY*.001 Example Jan 1 1976=1976.001 1. LABELS - Specifies the maximum number of labelled years. (Default:6) 2. TICKS - Specifies the maximum number of ticks per year. SHORT,LONG specify either long or short ticks. 15.64.49.17 PERMANENT - sets the values permanently for the current axis. Other axes are not affected. Any values specified to the right of the option permanent are not set permanently. 15.64.49.18 Example - TD:SET SCALE X LOG Y LINEAR Sets the X scale to logarithmic, and Y to linear. TD:SET SCALE X LOG SCALE 1,5 TICKS 2,3,4,6,7,8,9 This sets the log scales on the X axis so that labels will be drawn at 1,10,100... and 5,50,500... All subintervals will have small ticks 2,3,4,6,7,8,9,20,30,40,60.... TD:SET SCALE X LINEAR LABELS=10 TICKS=8 LONG Selects a linear scale for X with a maximum of 10 labelled ticks, and a maximum of 8 unlabelled ticks. All ticks will be the same length. TD:SET SCALE ALL LOG Z LINEAR Sets X,Y scales logarithmic, and Z linear. TD:SET SCALE ALL LOG Sets all scales logarithmic. 15.64.50 SHADOW This causes a 3-d plot to be shadowed onto the back side where the grid is drawn. SET SHADOW [ALL[=ON|OFF]] [SYMBOL[=ON|OFF]] [Y|X!Z[=ON|OFF]] [XY|YZ| ZX[=ON|OFF]] [INTENSITY|WIDTH=n] [NOCOLOR|WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [NOTEXTURE|SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [PERMANENT] To produce shadowing you must select at least one plane to shadow the plot in (XY,YZ,ZX). 15.64.50.1 Options - 1. ALL - Turns on or off all shadowing options. 2. SYMBOL - Shadows the symbol. 3. X - Draws lines from point to back plane along the X axis. 4. Y - Draws lines from point to back plane along the Y axis. 5. Z - Draws lines from point to back plane along the Z axis. 6. :XY - Shadows in XY plane. 7. YZ - Shadows in YZ plane when THREE=ON. 8. ZX - Shadows in ZX plane when THREE=ON. 9. INTENSITY - Sets line intensity or width (0-5). 0 gets the intensity from the SET INTENSITY or SET AXES command. 10. WHITE... - Sets the line color. (Default:Same as axes) 11. SOLID... - Sets the line texture. (Default:Same as axes) See:Command SET TEXTURE. 12. SYMBOL - Draws a symbol [sym] to be plotted at intersection of vertical and horizontal lines. (Default:sym=0O) 13. PERMANENT - Sets the current shadow options permanently for all NEW plots. If no options are specified, then all shadow parameters are reset to the original defaults. (Default:ALL=OFF) 15.64.50.2 Example - TD:SET SHADOW DOTS YZ ZX X SYM This shadows the PLOT in 2 planes. The plot symbol will be shadowed in both planes. In addition a dotted line parallel to X will be drawn from the point to the YZ plane. 15.64.51 SHIELD Sets an area to be shielded. Nothing may be drawn inside this area while shielded. SET SHIELD [=n] [OFF] [DAtA|TExT] [FROM]|TO [[X=]nx,[Y=]ny,[Z=]nz]] [CURSOR] 1. n - The shield number between 1 and 4. If unspecified the next available shield is used. 2. OFF - Turns the n'th shield off. If n is not specied all shielded areas are turned off. 3. FROM|TO - Allows you to specify the limit of the shielded area. If no limits are specified the current window is shielded. 4. DATA - Specifies the limit in data coordinates. 5. TEXT - Specifies the limit in text coordinates. 6. CURSOR - You use the cursor to specify the limits. example TD:SET SHIELD FROM 1,2 to 3,5 Sets a shielded area in text coordinates. TD:SET SHIELD DATA FROM Y=5 Shield all data from Y=5 for all X values. 15.64.52 SIZE This sets the physical size of the plot. Once set it remains the same until a new SET SIZE command is issued. This command should only be used immediately after a NEW PLOT command or a SET DEVICE command. It may not be used after any commands that plot data. SET SIZE [[X=]x [BY|Y=] y] [UNITS=units] [CM|CENTIMETERS|MM|MILLIMTERS|METERS|INCHES] [MAGNIFY|REDUCE=factor] [SIDEWAYS|ROTATED|NORMAL|ORIENTATION=n] [MARGINS=[nl,[nr,[nb,[nt]]]]] [LEFT=n] [RIGHT=n] [BOTTOM=n] [TOP=n] If no options are specified the sizes are reset to the defaults. (Default:NORMAL 13 by 10 inches MARGINS=0) 15.64.52.1 X,y - Set the overall size of the plot The final size is the selected size plus the margins. The actual size of the plot depends on the device you are using. The x,y are the size of the TEXT system. If the final size plus margins is larger than the physical size of the display, the plot is automatically reduced to fit. If the final size is smaller than the physical size of the device, the plot plus margins is centered. 15.64.52.2 UNITS - Sets the units of x and y. For example UNITS=2.54 sets the units to centimeters. This changes only the position units. All character sizes are still measured in tenths of an inch. If you wish to set the units without changing the size of the plot or you wish to change the character size measurement use the command SET UNITS 15.64.52.3 CM.... - This sets the units to a standard set of units. 15.64.52.4 MAGNIFY|REDUCE - Magnifies or reduces the overall plot by the specified factor. This modifies the entire plot including the character sizes. If the requested final size is too big for the device, REDUCE is automatically set to a value smaller than 1. The magnification or reduction is limited to the range 1.0E-5 to 1.0E+5. example TD:SET SIZE REDUCE=2 or... TD:SET SIZE MAGNIFY=0.5 reduce the plot from 13 by 10 to 6.5 by 5.0 inches in size. 15.64.52.5 ORIENTATION - This is an integer value from 0 to 3 specifying the orientation of the plot. *** 0 Normal orientation *** 1 Rotated 90 degrees clockwise. This is the same as sideways. X goes from top to bottom, while Y points to the right. *** 2 Rotated 180 degrees or Upside down *** 3 Rotated 270 degrees clockwise, appropriate for TeX 15.64.52.6 SIDEWAYS - Rotates the entire plot by 90 degrees. If SIDEWAYS was specified by SET DEVICE, the plot is already rotated, in which case NORMAL will rotate it back. 15.64.52.7 MARGINS - Sets the left,right,bottom, and top margins. Any unspecified margins are set equal to the left margin. If no margins are specified then all margins are set to zero. 15.64.52.8 LEFT|RIGHT|TOP|BOTTOM - Sets just the specified margin. 15.64.52.9 Examples - TD:SET SIZE 10 BY 13 SIDEWAYS or... TD:SET SIZE X=10 Y=13 SIDEWAYS This rotates the normal plot from landscape to portrait and uses the full page. TD:SET SIZE Y=13 Sets Y to 13 while leaving X at the previous settting. TD:SET SIZE SIDEWAYS This rotates the plot and it occupies 13 by 10. TD:SET SIZE 6.0 BY 9.0 SIDEWAYS MARGINS=1.15,.65,.775,.775 This sets the size and margins to produce a 1.5" margin on the left, and 1" on all other sides for a portrait plot on the VERSATEC. TD:SET SIZE 9.0 BY 13.5 SIDEWAYS MARGINS=1.725,.975 This sets the size and margins to produce a 1.5" margin on the left, and 1" on all other sides for a portrait plot on the VERSATEC. This example uses a 9 by 13.5 drawing space instead of a 6 by 9 space. There will be an automatic reduction of .666667. 15.64.53 SPHERICAL SET POLAR [ON|OFF] [RADIANS|DEGREES|FULLCIRCLE=n|GRAD] [PEERMANENT] This sets up to plot in spherical coordinates. (THETA,R,PHI) instead of (X,Y,Z). The data in X is now interpreted as THETA, Y is intepreted as R and Z is intepreted as PHI. The data is not modified, just reinterpreted. R=sqrt(X**2=Y**2+Z**2) THETA=ATAN2(Y,X) PHI=ATAN2(sqrt(x**2+Y**2),Z) NOTE: There is no universally accepted convention for THETA or PHI. Various books use different conventons. I have adopted a convention that gives THETA the same definition in both spherical and polar coordinates. 1. ON|OFF turn the spherical coordinates on or off. (Default:ON) 2. PERMANENT - Sets these parameters permanently. 3. DEGREES... - Selects angle representation (Default:DEGREES) A. GRAD - (0-400) B. DEGREES - (0-360) C. PERCENT - (0-100) D. RADIANS - (0-6.2831853) E. FULLCIRCLE=n - (0-n) You still set the limits in X,Y,Z coordinates, and automatic scaling centers the origin. When you plot, the axes are not automatically generated if spherical coordinates are on. You must manually plot the axes with the command: PLOT AXES. 15.64.54 STATISTICS SET STATISTICS [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] This sets the range of data used by the lexicals. If any changes are made to the data you need to use this command again. 15.64.54.1 LIMITED - Limits the data to the specified range. For 3-d data the limit on the dependent variable is ignored. If limits are not specified, the default is the current plot limits. See:Command SET LIMITS. 1. X - Specifies X limit 2. Y - Specifies Y limit 3. Z - Specifies the Z limit 4. CURSOR - Brings up the cursor. You move it to the X,Y value you wish then press the space bar to enter both X,Y or X to enter X or Y to enter Y. 5. RECURSOR - The cursor enters both limits. TD:SET STATISTICS LIMITED RECURSOR is the same as... TD:SET STATISTICS LIMITED FROM CURSOR TO CURSOR 6. VLOG - Draws a cross when you press the space bar, and draws a dotted line around the final limits. 15.64.54.2 LINES|ROWS - For 3-d plots specifies which lines or rows of the mesh data to use. 15.64.54.3 POINTS|COLUMNS - This specifies which points to use. For 3-d this is the range of column numbers. 15.64.54.4 SETS - This specifies which data set to use. 15.64.55 STORAGE This defines what is kept in storage. SET ORDER automatically calls SET STORAGE if room for extra data is needed. This option remains the same until changed by a SET ORDER or SET STORAGE command. The VAX uses virtual memory, so the actual amount of storage is not not limited, but expands as needed. If you have a virtual memory allocation failure, you may prevent it by preallocating the needed memory with the SIZE option. If you still get memory allocation failures, ask your system manager to increase the available virtual memory. SET STORAGE [ALL] [[N][R|D]X|THETA] [[N][R|D]Y|RADIUS] [[N][R|D]Z|PHI] [[N][R|D]U] [[N][R|D]V] [[N][R|D]W] [SYMBOL] [SIZE=n] (Default:SYMBOL,X,Y,DX,DY) ALL selects all coordinates. If this command is used without any options, the storage is reset to the default. If all 3 coordinates X,Y,Z are included in storage, 3-d plots are turned on. If DX, the error on X, is selected then X is also selected. If NDX is selected then both DX and X are selected. Likewise DY,DZ,..DPHI automatically select Y....PHI. SYMBOL, X and Y are always included in the storage. All other variables must be declared. The NDX is the negative half of the error bar while DX is the positive half. If NDX is not in stoage then DX specifies both halves. Similarly NDY and NDZ are the negative halves of the Y,Z error bars. If THETA is specified polar coordinates are enabled permanently. If PHI is specified spherical coordinates are enabled. SIZE=n allows you to pick the number of words of storage to allocate for the VAX. This is not necessary, but it may save time since you may preallocate the storage and avoid multiple automatic storage expansion. Normally the amount of storage needed for regular data is about n*d+4 where n is the number of points and d is the number of coordinates available in storage (SYMBOL,X,DX,Y,DY,....). For mesh data it is ((n+1)*(m+1)+4)*d+4 where n and m are the mesh dimensions and d is 1 for regular mesh data or 2 for data with errors. If you have a name for the data set it takes up 1 storage location for every 4 characters. Example TD:SET STORAGE X Y SYMBOL To see the current storage use the command: SHOW STORAGE. TD:SET STORAGE SIZE=<4+101*201+20> Preallocates storage for a 100 by 200 mesh with an 80 character name. 15.64.56 SYMBOL This selects the default symbol SET SYMBOL "xx" [SIZE=n] [THETA=n] [PHI=n] [ANGLE=n] [PERMANENT] If no parameters are specified the symbol and size are set to NONE and 2 and the angles are turned off. In other words SET SYMBOL is the same as SET SYMBOL=NONE SIZE=2. This command determines the symbol plotted data that have no symbol. If you SET SYMBOL before reading data the symbol is assumed for the data you are reading. See:Command READ POINTS and PLOT. 15.64.56.1 Xx - is the symbol to plot 0O to 9O or any duplex character. DOT or " " produces a dot. The second character in the xx pair selects the case or font to use. Only plot symbols 0O to 9O are guaranteed to be properly centered. If no symbol is desired specify NONE. 15.64.56.2 ANGLE - Specifies the orientation angle of the symbol in a plot of 3-d data. This is the rotation angle around the axis specified by THETA and PHI. 15.64.56.3 SIZE - is the size in tenths of an inch If the size is negative then it is adjusted automatically by the window size. The units may be modified by SET UNITS CHARACTER. (Default:2) 15.64.56.4 THETA - Specifies the polar angle of the normal to the symbol in a plot of 3-d data. 15.64.57 PERMANENT Makes the current symbol the permanent default. Normally a NEW PLOT command resets the symbol to the permanent default. 15.64.57.1 PHI - Specifies the azimuthal angle of the normal to the symbol in a plot of 3-d data. A negative value makes the symbols plot with the normal perpendicular to the screen. In other words you are looking normally at the symbol for a negative value. 15.64.57.2 3-d - If you plot 3-d data and PHI is greater than 0, the symbol is oriented according to the specified THETA, PHI, and ANGLE. 15.64.57.3 Example - TD:SET SYMBOL "$" SIZE=3.5 plots dollar signs .35 inches in size. TD:SET SYMBOL 0O SIZE=10 plots "X" 1 inch high. TD:SET SYMBOL GF plots uppercase Greek Gammas. See:FONTS TD:SET SYMBOL 0O PHI=0 ANGLE=45 plot crosses with the arms along the X,Y axes TD:SET SYMBOL 0O PHI=90 THETA=90 ANGLE=45 plot crosses with the arms along the X,Z axes 15.64.58 TEXTURE SET TEXTURE|STRUCTURE [SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY| SPACE] [PERMANENT] This sets the default texture of a line drawn by a BOX, CIRCLE, ELLIPSE, DIAMOND, PLOT, BAR, JOIN, or HIST command. To set the Texture of the axes, ticks, or outline See:Command SET AXIS, SET OUTLINE, or SET TICKS. You may also specify the texture with any command that draws. For example you may JOIN DOTS or JOIN PATTERN and so on. 1. SOLID - Solid line 2. DOTS - Dotted line 3. DASHES - Short dashed line 4. DAASHES - Long dashed line (3x) 5. DOTDASH - Dot-dash line 6. SPACE - Adds an extra space between dots/dashes 7. PATTERNED - Line determined by SET PATTERN. 8. FUNNY - is a dot at the ends of each line segment. This is generally only useful for joined and smoothed curves. 9. PERMANENT - Sets the current texture to be the permanent default. (Default:SOLID) If no options are specified it is set to SOLID. When a new plot is started the texture is set to the permanent default. If you specify more than 1 texture option, or use the option PATTERN, then a patterned texture is assumed and the pattern is generated. When FUNNY precedes any other texture specifier then it is generated randomly. 15.64.58.1 Example - TD:SET TEXTURE DAASH This generates a "hardware" texture or long dashes. TD:SET TEXTURE DOT DOT DASH or... TD:SET PATTERN DOT DOT DASH; SET TEXTURE PATTERN This is a dot-dot-dash texture, which is also set to be the current pattern. TD:SET TEXTURE DOT FUNNY DASH or... TD:SET PATTERN DOT RANDOM DASH; SET TEXTURE PATTERN This is a uniformly spaced dot 0.1" followed by a random length dash. TD:SET TEXTURE PATTERN DASH; JOIN or... TD:SET PATTERN DASH; SET TEXTURE PATTERN; JOIN Sets the texture to be a patterned dash. This will produce device independent pictures, but they will be slower than: TD:SET TEXTURE DASH; JOIN or... TD:JOIN DASH 15.64.59 THREE This sets parameters for 3-dimensional plots and turns ON 3-d graphics. Essentially you must set up the viewpoint for 3-D. The plot is seen by an observer through a "screen" or window. The location of the screen and observers eye may be specified. SET THREE [ON|OFF|AUTOMATIC]] [CENTER=x,y,z] [VERTICAL=xv,yv,zv] [DIRECTION=xv,yv,zv] [THETA=angle] [PHI=angle] [DISTANCE|RDISTANCE=n] [SCRD=n] [REDUCE|MAGNIFY=n] [ORIGIN=x,y,z] [SEPARATION=s|LEFT|RIGHT|MIDDLE] [WORLD=x [BY] y [BY] z] [XAXIS|YAXIS|ZAXIS=angle] [PERMANENT] NOTE: The actual view also depends on the window size selected by SET WINDOW. WARNING If this command is issued in between 2 plots overlaying each other, they will not have the same scales. 15.64.59.1 Options - 1. CENTER=x,y,z - Is the center of the 3-d view. This moves the plot around. 2. DIRECTION=xv,yv,zv - Controls the direction you are "looking" from. 3. THETA=angle - The direction you are looking from (polar angle) 4. PHI=angle - The direction you are looking from (Azimuthal angle) 5. DISTANCE - Distance from you to the object. 6. SCRD - Distance from you to the viewing window. 7. RDISTANCE - Modifies DISTANCE + SCRD together (DISTANCE from you to object) 8. REDUCE|MAGNIFY - Modifies size of the object relative to current size. 9. ON|OFF - Turns 3-d plot on or off. 10. AUTOMATICE - 3-d plots are on if the data is 3-d. 11. ORIGIN=x,y,z - Set origin of axes for a PLOT AXES command. 12. PERMANENT - Makes current parameters permanent for subsequent plots. 13. SEPARATION=n - Specifies left, right separation for stereo plots 14. LEFT - Specifies left eye view. 15. RIGHT - Specifies right eye view. 16. MIDDLE - Specifies center view (neither left nor right "Cyclops") 17. VERTICAL=xv,yv,zv - Direction of vertical. 18. WORLD=x BY y BY z - Limits on x,y,z coordinates. 19. X|Y|ZANGLE=n - Specifies orientation of labels and titles around axis. 15.64.59.2 CENTER - CENTER=x,y,z The center of the picture in 3-d WORLD coordinates. This defines the center of the object being viewed. If unspecified it is at the center of the WORLD size. (Default:6.5,5,5 inches) 15.64.59.3 DIRECTION - DIRECTION=xv,yv,zv Direction vector from CENTER to eye. THETA=angle PHI=angle br;Alternate specification of DIRECTION in polar coordinates. This is probably an easier number to specify. You should specify either the DIRECTION or THETA and PHI. These are specified relative to the VERTICAL vector. PHI is the angle in degrees from vertical to line through the eye. PHI is the azimuthal angle of the viewers eye. (Default:60.0) WARNING The alogorithm used in Histogramming or Joining the data requires that the viewpoint can not be "over" the structure being plotted. The hidden line removal algorithm will not work for an improperly placed viewpoint. You should avoid PHI=0 or PHI=180. THETA is the angle between projections in the horizontal plane of the X-Axis and the line to the viewing position. THETA is the polar angle of the viewers eye. (Default:30.0) Example You wish to look at the plot from the +X axis: TD:SET THREE THETA=0 You wish to lood at the plot from the +Y axis: TD:SET THREE THETA=90 15.64.59.4 DISTANCE,SCRD,RDIST - DISTANCE=nnn Distance from CENTER to the EYE (Default:35in.) SCRD=nnn Distance from screen or viewing window to EYE. (Default:-18in.) RDISTANCE=nnn Same as distance, but the SCRD is changed also to keep the view the same. (Relative distance) If SCRD is negative then the actual SCRD is adjusted so that the view is the same independent of the current window size. If |SCRD| = 0.5*DISTANCE then the plot will fill the current window. Essentially the SCRD is the distance from you to the screen, and DISTANCE is the distance to the object being viewed. The ratio of SCRD/DISTANCE determines the plot size while the absolute distance determines the perspective of the plot. Large distances produce essentially a parallel projection. If you wish to modify the plot size use the MAGNIFY or REDUCE option. Sometimes vertical lines are treated as being hidden when in fact they are visible. This may be corrected by moving the view point far from the screen. To set a distant viewpoint: TD:SET THREE RDIST=8000 RDIST adjusts the viewpoint without changing the size of the resulting plot. 15.64.59.5 REDUCE|MAGNIFY - These change the size of the plot without changing the perspective. REDUCE=0.5 or MAGNIFY=2 both increase the size by a factor of 2. The SCRD is modified but not the DISTANCE. The magnification or reduction is limited to the range 1.0E-5 to 1.0E+5. 15.64.59.6 ON|OFF|AUTOMATIC - This turns on or off 3 dimensional graphics. AUTOMATIC specifies that 3-d graphics is determined by the data. 3-d is turned on only for Mesh data or if all 3 coordinates X,Y,Z are in storage. (Default:ON) 15.64.59.7 ORIGIN - ORIGIN=x,y,z Sets the position in DATA system at which 3 axes will intersect when drawn. (For MESH data, PLOT AXES is needed to draw them) The origin is normally set to be the minimum X,Y,Z value entered. When set this value is used locate the axes and the title. 15.64.59.8 PERMANENT - This makes all currently set parameters the default. Since the command line is parsed from left to right, options on the left side of this option are permanent, but options to the right are not. When a new plot is started the current options revert to the permanent value. 15.64.59.9 SEPARATION - This specifies the distance between the true viewing point and viewing axis. This is used for making stereo pairs. (Default:SEPARATION=0) 1. LEFT - SEPARATION = -1.5 2. RIGHT - SEPARATION = 1.5 3. MIDDLE - SEPARATION = 0 15.64.59.10 VERTICAL - VERTICAL=xv,yv,zv Direction vector in WORLD system which projects onto a vertical line in the window. (Default:0,0,1 - Z axis) 15.64.59.11 WORLD - WORLD x [BY] y [BY] z This sets the limits in inches on x,y,z in the world coordinates. All data outside of these limits is clipped. This is not set to the default when a new plot is started. (Default:13,10,10 inches) 15.64.59.12 XAXIS - XAXIS|YAXIS|ZAXIS angle These options are used to control how the ticks and labels are drawn relative to the axes. If the angle is not specified or it is greater than 360 degrees the axes are drawn in either the XY,YZ, or ZX plane for maximum visibility. The angle allows you to rotate the labels,ticks, and title around the axis. The rotation is specified by permuting the axes XYZ. For a given axis n the angle 0 lies in the n,n+1 plane, and angle 90 lies in the n,n+2 plane, with the labels in the negative side. Table of axes This gives the plane and direction of the labels. The sign indicates the side the labels are drawn on. Axis 0 90 180 270 degrees X -XY -ZX XY ZX Y -YZ -XY YZ XY Z -ZX -YZ ZX YZ TD:SET THREE XAXIS=0 This draws the X labels and ticks in the XY plane with the labels in the negative X side of the axis. TD:SET THREE YAXIS=90 This draws the X labels and ticks in the YZ plane with the labels in the negative Z side of the axis. 15.64.59.13 Revisions - Originally there was a major problem with TOPDRAWER. The documented definition of THETA was not the same as the actual definition. THETA was actually measured from the Y axis and positive valued put the eye closer to the positive X axis. The actual definition has been modified to conform to both the documentation and conventional notation. If this is a problem, you may return to the old definition by: SET REVISION=1. 15.64.59.14 Examples - There is a set of sample plots you may view. They include a drawing of the various angles and distances. They are: TOPDRAWER_ROOT:[EXAMPLES]TD3D.TOP 15.64.60 TICKS This determines the presence or absence of tick marks and their sizes. To control the default number of ticks see SET SCALE. SET TICKS [SIZE=n] [LONG=n] [ALL|TOP|BOTTOM|RIGHT|LEFT|X|Y|Z] [ON|OFF] [INTENSITY|WIDTH=n] [NOCOLOR|WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [NOTEXTURE|SOLID|DOTS|DASHES|DAASHES|DOTDASH|PATTERNED|FUNNY|SPACE] [PERMANENT] This acts on the current plot only if PERMANENT not specified. If the parameters are omitted they are reset to the original default. To control other individual elements of the axes use: SET AXES, SET TICKS, SET LABELS, SET OUTLINE (Default:ALL ON) 15.64.60.1 Options - 1. SIZE - Sets the size of the smaller ticks in inches. The larger ones are normally 3 times the small ones. If unspecified this is automatically set according to the paper size, and window to give you pleasing results. (Default:0.1) 2. LONG - Sets the ratio of long ticks to short ticks. This may be varied from 0.1 to 10. (Default:3) 3. ALL - enables ticks for top, bottom, right and left. 4. TOP - enables tick for the TOP of plot 5. BOTTOM - selects tick for the bottom of the plot. 6. RIGHT - selects tick for the right hand side 7. LEFT - selects tick for the left hand side. 8. X,Y,Z - selects the axis to plot. 9. ON - allows drawing ticks 10. OFF - prevents drawing ticks 11. INTENSITY - Sets line intensity or width (0-5). 0 gets the intensity from the SET INTENSITY command. 12. WHITE... - Sets the line color. 13. SOLID... - Sets the line texture. (Default:SOLID) See:Command SET TEXTURE 14. PERMANENT - Makes the current settings permanent from plot to plot. 15.64.60.2 Examples - TD:SET TICKS ALL OFF BOTTOM ON LEFT ON specifies ticks only on the bottom and left of the plot. TD:SET TICKS RED DOTS SIZE=0.2 LONG=2 specifies dotted red ticks with short ticks 0.2 inches long and long ticks 0.4 inches. 15.64.61 TITLES This sets default title values. SET TITLES [ALL|TOP|BOTTOM|RIGHT|LEFT|X|Y] [INDEX=n] [LINES=n] [MARGIN=n] [SCALE=n] [SHIFT=n] [SIZE=n] [INTENSITY|WIDTH=n] [NOCOLOR|WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] [PERMANENT] [ESCAPE="char"] [SUBSTITUTE="char1char2"] If the parameters are omitted they are reset to the original default. You should make modifications to the title options before any plotting is done. The MARGIN, SIZE, SCALE, INDEX, and LINES all modify the location and size of relative windows. See:Command SET WINDOWS. 15.64.61.1 Options - 1. ALL,TOP,BOTTOM,RIGHT,LEFT,X,Y - Selects title to modify 2. INDEX=n - The separation between consecutive lines for all titles 3. INTENSITY=n - The intensity (width) of all titles 4. LINES=n - The maximum number of lines to reserve for a title 5. MARGIN=n - Extra margin around the window for titles 6. PERMANENT - Makes values permanent 7. SCALE=n - Multiply title size by n 8. SIZE=n - Character size for all titles 9. WHITE... - Title color for all titles 10. ESCAPE - Sets the escape character for imbedded text/case 11. SUBSTITUTE - Sets the begin, end substititute characters. This allows you to include predefined text strings. 15.64.61.2 ALL|TOP|BOTTOM|LEFT|RIGHT|X|Y - Selects the title you wish to change. (Default:ALL) 15.64.61.3 INDEX - Sets the height of a title line. The actual character height is the same as the size. This determines the separation between 2 lines of text for the titles. The INDEX applies to all titles LEFT...TOP. (Default:2) 15.64.61.4 INTENSITY - Sets the title intensity or line width. (0-5) (Default:NONE) 0 gets the intensity from the SET INTENSITY command. 15.64.61.5 LINES - Sets the number of lines to reserve for a title. For example if you wish to have a 2 line title at the top of the plot you should: TD:SET TITLE TOP LINES=2 Negative lines puts the title inside the window. TD:SET TITLE BOTTOM LINES=-2 puts the bottom title inside the window and allocates room for 2 lines of title. (Default:1.2 BOTTOM 2) 15.64.61.6 MARGIN - This sets a fractional margin around each window. Normally this is 0.025 or 2.5% of the total window size. You may set it to any value from 0.0 to 0.4. If you use relative or numbered windows the final window size is reduced by the margin as well as the number of title lines, and labels. The margin is not absulute. You may still put titles inside the margin, by specifying the title location. (Default:0.025) 15.64.61.7 PERMANENT - makes the current values the permanent values. 15.64.61.8 SCALE - This sets a scale factor on the title size. Normally LEFT,RIGHT, and BOTTOM are 1.0 while TOP is 1.5. This makes the Top title 50% bigger than other titles. You may modify this to range from 0.1 to 10.0. (Default:1.0 TOP 1.5) 15.64.61.9 SIZE - SIZE=n gives the approximate spacing between chars. in tenths of an inch. If n is negative hardware characters will be used when available. If n is positive software characters will be used when mode VECTOR=OFF. This size determines the title size when a TOP,BOTTOM,... title is specified. The TOP title is normally 1.5 times this value. Normally the size is automatically set according to the paper size, and window to give you pleasing results. The SIZE applies to all titles LEFT...TOP. The units may be modified by SET UNITS CHARACTER. (Default:2) 15.64.61.10 WHITE... - sets the title color. (Default:NONE) 15.64.61.11 Windows - When you specify a relative or numbered window the window is first reduced by the margin fraction. Then each title is allocated INDEX*LINES*SIZE*SCALE around the window. Finally the window is reduced to make room for labels. Each title except for the bottom will be positioned INDEX*SIZE*SCALE*(LINES-.5) from the edge of the window+labels. The bottom is positioned INDEX*SIZE*SCALE/2 from the window+labels. 15.64.61.12 ESCAPE - This defines a character to use as an "escape" character. After the escape character you enter a "text","case" pair. This allows you to imbed text case pairs in the text, without using a separate case line. When used with the substitution you can define macros for expressions. To output the ESCAPE character you must enter it twice followed by a space. example TD:SET TITLE ESCAPE="@" TD:TITLE TOP "This is a Greek alpha @AG" Writes a title with an imbedded alpha. TD:TITLE TOP "This an at symbol @@ ." Writes the title:"This an at symbol @." 15.64.61.13 SUBSTITUTE - This defines a pair of characters to delimit a substitution. Substitutions may not be nested. You define a string, and then it will be included in your text when the name is bracketed by the substitute pair. When used with the escape character, you can build complicated expressions and include them in your titles in a simple fashion. If you need to output the begin substitute character you should define a substitution for it. example TD:SET TITLE SUBSTITUTE="{}" TD:DEFINE STRING curly "{" TD:DEFINE STRING SEASONS "spring,summer,winter,fall" TD:TITLE TOP "The seasons are {SEASONS}." Writes the title: "The seasons are spring,summer,winter,fall." TD:TITLE TOP "A left curly bracket is {curly}" Writes the title: "A left curly bracket is {" TD:SET TITLE SUBSTITUTE="\\" TD:TITLE TOP "The seasons are \SEASONS\." Writes the title: "The seasons are spring,summer,winter,fall." TD:SET TITLE SUBSTITUTE="\" TD:TITLE TOP "The seasons are \SEASONS ." Writes the title: "The seasons are spring,summer,winter,fall." NOTE: in this example the trailing substitute char is a blank. 15.64.61.14 Examples - TD:SET TITLE INDEX=3 increases the space per line to make room for sub/superscripts. TD:SET TITLE TOP LINE=2.5 allocates room for 2 lines of title at the top, with a half line margin between the titles and the window. TD:SET TITLE SCALE=1.0 RIGHT MARGIN=0 BOTTOM MARGIN=0 LINE=-1 sets all titles to the same size and removes the margin at the right and bottom. The bottom title is allocated 1 line of space inside the window. 15.64.62 UNITS This sets the units that you may use to specify sizes and locations. SET UNITS [REDUCE=units] [ALL|TEXT|CHARACTERS] [CM|CENTIMETERS| DM|DECIMETERS| MM|MILLIMTERS|METERS|INCHES| POINTS|MILS] If no options are specified the sizes are reset to the defaults. (Default:TEXT INCHES CHARACTERS REDUCE=10) 15.64.62.1 CM.... - This sets the units to a "standard" set of units. 1. MM = CM/10 2. DM = 10 CM 3. METERS = 100 CM 4. INCHES = 1.54 CM 5. MILS = INCHES/1000 6. POINTS = INCHES/72 7. FEET = 12 INCHES 8. YARDS = 3 FEET 9. FATHOMS = 6 FEET 10. RODS = 16.5 FEET 11. FURLONGS = 40 RODS 12. MILES = 8 FURLONGS 13. LEAGUES = 3 MILES 15.64.62.2 REDUCE - Sets the units by the specified value. This is the number of units per standard unit. 15.64.62.3 ALL... - This selects which set of units to modify. There are 2 sets of units. One is the TEXT units which specify the location in TEXT space, while the other is used to specify the character and symbol sizes. The character units are also used to speicify the fill sizes. Normall text sizes are in inches while the character units are one tenth of the text units. 15.64.63 WAIT See:Command SET PAUSE 15.64.64 WIDTH This sets the default line width or intensity of a plot. SET WIDTH level [PERMANENT] level=1 to 5. (Default:2) 5 is the widest (brightest). PERMANENT - Sets the current width to be the new default. If no options are specified it is set to 2. 15.64.65 WINDOWS There are 3 ways to set windows, absolute, numbered, or relative. Absolute windows SET WINDOW|AREA [CURSOR] {X|Y}[FROM] n1 [TO] n2] [AT n1 [SIZE] n2] [LEVEL=n] or... SET WINDOW|AREA [FROM] nx,ny [TO] nx,ny] [AT nx,ny [SIZE] nx,ny] Sets the X,Y axes to run between the specified limits in inches. Numbered SET WINDOW [{FIRST|LAST|NEXT|PREVIOUS|n1 [OF n2]}] [LEVEL=n|INSIDE| OUTSIDE] Divides the entire screen into n2 windows of equal size, and sets the current window to number n1. The windows are as close to square as possible. Relative SET WINDOW [{X|Y} n1 [OF n2]] [LEVEL=n] Divides one axis of the screen into n2 windows of equal size and selects one of them. WARNING If this command is issued in between 2 plots overlaying each other, they will not have the same scales. 15.64.65.1 ABSOLUTE - The window may not exceed the current plot SIZE. See:Command SET SIZE. If CURSOR is specified, the cursor may be used to set windows. Simply move the cursor to one corner of the window and hit the space bar. Them move the cursor to the diagonally oppostte corner and hit the space bar. The new limits are entered into the journal file. example TD:SET WINDOW X FROM 1 to 6 Y FROM 1.5 to 9.0 or... TD:SET WINDOW FROM 1,1.5 TO 6,9.0 or... TD:SET WINDOW AT 3.5,5.25 SIZE=5,7.5 or... TD:SET WINDOW X AT 3.5 SIZE=5 Y AT 5.25,7.5 All produce the same window in inches. TD:SET WINDOW CURSOR You move the cursor to diagonally opposite corners of the window and press the space bar to enter the cursor location. 15.64.65.2 NUMBERED - A numbered window is a special type of relative window. If n2 is omitted then the n2 is assumed to be the last n2. Both n1 and n2 must be greater than or equal to 1.0. n2 must be smaller than or equal to n2. You may initially set up a window as relative, and specify it as a set of numbered windows. When you do this the window number modifies only the integer part of the relative window. For example: TD:SET WINDOW 1 OF 4 This sets the lower left window out of 6. TD:SET WINDOW 6 OF 6 Sets the upper right window out of 6. TD:SET WINDOW X 1.1 of 3.2 Y 1.2 of 2.4 TD:SET WINDOW 5 is the same as TD:SET WINDOW X 2.1 of 3.2 Y 2.2 of 2.4 15.64.65.3 RELATIVE - If n2 is omitted then the last n2 for the current plot is assumed. Both n1 and n2 must be larger than 0.8 and n1 may not be larger than 1.2*n2. If both n1 and n2 are positive the window is reduced in size to allow for labels and titles. If negative the window occupies the entire space. If you do not specify a fixed symbol, grid, label, title, or tick size then they are adjusted to be in proportion to the window size. Absolute windows do not adjust the sizes. If n2 is omitted then the current n2 is assumed. For windows which do not occupy the entire space, the actual size of the window depends on the location and position of labels and titles. The size is set to allow a 5% border with room for titles and labels. The default is a window with approximately 8.5% left on the right and top for titles, and 13% on the bottom and left for labels and titles. For 3-d plots it is assumed that no labels will be produced. To change the size available for titles and labels use the SET TITLE and SET LABELS commands. Non integral n1 or n2 may be used for fine adjustment. If you use negative windows you may also need to turn off INSIDE labels. See:Command SET LABELS INSIDE 15.64.65.3.1 Example - TD:SET WINDOW Y 1.2 OF 2.5 Divides y into 2.5 windows and sets the current window to 1.2. Assuming the y size is the default 10 inches, the total window runs from 0.8 inches to 4.8 inches. Since the window is positive, the actual window area is reduced to make room for labels. The actual plot area would be approximately 1.6 inches to 4.3 inches. TD:SET WINDOW Y 1.2 OF -2.5 Divides y in the same fashion as above, except that the actual window occupies the entire specified area from y=0.8 inches to y=4.8 inches. If a second window is then specified: TD:SET WINDOW Y=2.2 it is adjacent to the first one, with the top axes of the first window in the same location as the bottom axes of the second window. 15.64.65.4 LEVEL - INSIDE,OUSIDE, or LEVEL=n sets the window level. Levels may range from 1 to 4. INSIDE increases the level by 1 and OUTSIDE decreases the level by 1. Using this option you may inset windows inside other windows. When you increase the LEVEL by 1 the current window is used to set the maximum limits of the new window. You may increase LEVEL by 1 or decrease it to any number from 1 to the current level. When you increase the level, you have effectively decreased the plot size to the current window size. example As an example you wish to create a set of six windows within a definite location. TD:SET WINDOW X FROM 1 TO 12 Y FROM 1 TO 7 Set the outer level TD:SET WINDOW 1 OF 6 INSIDE or... TD:SET WINDOW 1 OF 6 LEVEL=2 Now you have 6 equal size windows bounded by 1,1 and 12,7. To return to having only 1 window TD:SET WINDOW LEVEL=1 example TD:SET WINDOW X FROM 1 TO 12 Y FROM 5 TO 7 TD:SET WINDOW LEVEL=2 FROM 1,1 TO 2,2 Insets a window within another. The actual physical location of the new window is X=2 to X=3 and Y=6 to Y=7. 15.64.65.5 Labels - Normally space for labels is allocated according to the current AXES, and LABEL settings. For example if you SET LABELS LEFT OFF, no space will be allocated for labels on the left side, so the window will be larger. If you need to have several plots all sharing the same scale, use either negative windows or absolute windows. For example 2 plots which share the same X axis may be plotted. TD:SET WINDOW Y 1.2 OF -2.6 TD:PLOT SET=1 TD:SET LABELS BOTTOM OFF TD:SET WINDOW Y 2.2 TD:PLOT SET=2 Only 1 bottom axes is plotted for both windows. It is assumed that LEFT or RIGHT labels will occupy 6 characters. If this is incorrect you may adjust this value when you set the window with the CHARACTERS parameter. TD:SET LABEL CHARACTERS=4 allocates only 4 characters for the labels. This gives you more usable plotting area. 15.64.65.6 Examples - Assuming you have a plot size of 13 by 10 you may setup 6 windows, and start with the window in the middle, bottom: TD:SET WINDOW 2 of 6 or... TD:SET WINDOW X 2 OF 3 Y 1 OF 2 you may select the next window (Right, bottom) by: TD:SET WINDOW X NEXT or... TD:SET WINDOW X 3 or... TD:SET WINDOW 3 You may set the previous window by: TD:SET WINDOW X PREVIOUS or... TD:SET WINDOW X 1 you may select the last window (right, upper corner) by: TD:SET WINDOW 6 or... TD:SET WINDOW X 3 Y 2 15.64.65.7 3-d - When setting the windows for 3-d plots there is compensation for the viewing distance from the object if SCRD is negative. For the same DISTANCE and positive SCRD a window which is half the size of a normal window will only show half of the view. You may compensate for this effect by changing DISTANCE or SCRD. The effect is similar to what you would see if you, and the window remained in the same position and only the window size changed. The following will plot approximately the data with the same view. TD:SET THREE DISTANCE 100 SCRD 50 TD:SET WINDOW X 1 of 1 Y 1 of 1 TD:HISTOGRAM or ... TD:SET THREE DISTANCE 100 SCRD -50 TD:SET WINDOW X 1 of 2 Y 1 of 2 TD:HISTOGRAM or ... TD:SET THREE DISTANCE 100 SCRD 25 TD:SET WINDOW X 1 of 2 Y 1 of 2 TD:HISTOGRAM The following will show a similar view, but from a more distant perspective: TD:SET THREE DISTANCE 200 SCRD 50 TD:SET WINDOW X 1 of 2 Y 1 of 2 TD:HISTOGRAM Since the size of 2 windows is less than half of a single window the example with 2 windows shows slightly less than 1 window. 15.65 SHOW SHOW opt1 opt2 ,.... optn Shows options for the current plot. Most options for SET may be used for show. The options are: ALL ARROW AXIS BAR BOX BLINK CARD CHARACTER CYCLE CIRCLE CLEAR COLOR COMMAND Ctrl_Z CURSOR DATA DATE DEVICE DIAMOND DIGITS ELLIPSE ERRORS EXACT FIT FILE FLUSH FONT FORMAT GRID HISTOGRAM INTENSITY KEYS LABELS LEXICALS LIMITS MODE MONITOR ORDER OUTLINE PATTERN PAUSE PEN PLOTS POLAR REVISION SCALE SECONDARY SHIELD SIZE STATISTICS STORAGE STRINGS SYMBOL TEXTURE THREE TICKS TIME TITLE UNITS WIDTH VALUES VERSION WINDOW The "Default" values are the values that are automatically set for the next plot. These are controlled by the "PERMANENT" option on the SET commands. The SHOW commands are not usually journaled with the exception of SHOW CURSOR. 15.65.1 Options 1. ALL - Shows all options except for CURSOR, FLAGS, and HISTOGRAM. 2. ARROW - default arrow format 3. AXIS - default axis 4. BAR - ends of error bars 5. BOX - default box size 6. BLINK - whether plots are in blink mode 7. CARD - Maximum length of input lines 8. CYCLE - The color,width, texture to cycle through. 9. CHARACTERS - Shows character definitions 10. CIRCLE - Same as SHOW ELLIPSE 11. CLEAR - Clear setting is Deferred or Immediate. 12. COLOR - default color or pen number 13. COMMAND - Shows the currently defined commands. 14. Ctrl_Z - Whether Ctrl_Z stops TOPDRAWER. 15. CURSOR - Shows the location of the cursor. 16. DATA [options] - Show current data. 17. DATE - Show current base date. 18. DEVICE - Show current device being used 19. DIAMOND - default diamond size 20. DIGITS - The number of digits to use for output 21. ELLIPSE - default ellipse size 22. ERRORS - Shows status of error messages, and any errors for the current plot are displayed. 23. FILE - shows current files open, and line number. 24. FILL - the current fill patterns 25. FIT [FULL] - shows the current fit [with error matrix]. 26. FLUSH - Controls automatic flushing of plot data 27. FONT - the current character set 28. FORMAT - Format for input lines 29. GRID - grid marks that overlay plot 30. HISTOGRAM - Shows the list of histograms available. 31. INTENSITY - default intensity (line width) 32. KEYS [key names] - the defined keypad keys 33. LABELS - numeric labels on axes 34. LEXICALS [lexical] - exams the current values of lexicals. 35. LIMITS - limits for plot axis 36. MODE - Misc. options. These change the mode of operation. 37. MONITOR - Plot options for monitor command. 38. ORDER - Determines interpretation of input data 39. OUTLINE - outline around plot 40. PATTERN - the pattern for PATTERNED lines 41. PAUSE - controls whether TOPDRAWR pauses at NEW PLOT 42. PEN - the pen or color to use in plotting. 43. PLOTS - The number of plots produced 44. POLAR - Whether mode is polar or spherical plots 45. REVISION - The current revision level. 46. SECONDARY - Secondary contour line options. 47. SCALE - scale (log/linear) and units. 48. SHIELD - the location and sizes of shielded areas. 49. SIZE - size and orientation of screen or paper 50. STATISTICS - The statistics set by the last SET STATISTICS or SHOW DATA command. 51. STORAGE - what is kept in storage 52. STRINGS - strings defined by DEFINE STRING 53. SYMBOL - default symbol to plot 54. TEXTURE - default line style (DOTTED,SOLID...) 55. THREE - parameters for 3-dimensional plots 56. TICKS - tick marks on axes 57. TITLE - size of title 58. UNITS - the units of measurement 59. VALUES - The user defined Lexical values. 60. VERSION - The current version number of TOPDRAWER 61. WIDTH - the line width or intensity 62. WINDOW - the plotting area (labels may be outside area) 15.65.2 CURSOR SHOW CURSOR This puts a cursor on the graph. After moving the cursor to the desired location, press any key. The current location of the cursor will be typed and entered into the journal file as a comment. This does not work if the device has no cursor. If you have not plotted any data this command will not work. The position of the cursor is given in both TEXT and DATA units. If a 3-d plot is displayed, The X,Y,Z given are on a plane through the origin parallel to the screen. 15.65.3 DATA SHOW DATA [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [BRIEF|FULL|STATISTICS|TOTAL[=ON|OFF]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [OUTPUT=file] This types the current data and statistics on the data. You may terminate the listing in the middle by pressing Ctrl_C. 15.65.3.1 BRIEF... - 1. BRIEF=ON or FULL=OFF displays only the number of data points and sets. 2. FULL=ON or BRIEF=OFF displays both data and statistics. (Default:FULL) 3. STATISTICS=ON displays the statistics on the data for each set, and the grand total if more than 1 set. 4. STATISTICS=OFF displays the data without statistics. 5. TOTAL=ON displays only the total statistics for all data sets. 6. TOTAL=OFF displays the data with statistics, but no total. If you do not specify ON or OFF then ON is assumed. 15.65.3.2 LIMITED - Limits the data shown to the specified range. For 3-d data the limit on the dependent variable fully modifies the statistics. The actual data shown my include data outside the Z limits, but the statistics reflects only the data within all limits. If limits are not specified, the default is the current plot limits. See:Command SET LIMITS. 1. X - Specifies X limit 2. Y - Specifies Y limit 3. Z - Specifies the Z limit 4. CURSOR - Brings up the cursor. You move it to the X,Y value you wish then press the space bar to enter both X,Y or X to enter X or Y to enter Y. 5. RECURSOR - The cursor enters both limits. TD:SHOW DATA LIMITED RECURSOR is the same as... TD:SHOW DATA LIMITED FROM CURSOR TO CURSOR 6. VLOG - Draws a cross when you press the space bar, and draws a dotted line around the final limits. example TD:SHOW DATA LIMITED FROM 1,1 to 2,5 or... TD:SHOW DATA LIMITED FROM X=1 Y=1 TO X=2 Y=5 Shows all points that with X between 1 and 2 and Y between 2 and 5 inclusive. TD:SHOW DATA LIMITED FROM Y=1 TO Y=5 Shows all data points with Y values between 1 and 5 inclusive. TD:SHOW DATA LIMITED FROM CURSOR TO CURSOR Shows all data points as defined by the cursor limits. TD:SHOW DATA LIMITED FROM X=CURSOR TO X=CURSOR Shows all data points according to X values defined by the cursor. 15.65.3.3 LINES|ROWS - For 3-d plots specifies which lines or rows of the mesh data to show. 15.65.3.4 OUTPUT - This specifies the output file for the DATA. If this option is not used, the default is SYS$OUTPUT, or your terminal. If OUTPUT=NONE is specified, then there is not output. 15.65.3.5 POINTS|COLUMNS - This specifies which points to show. For 3-d this is the range of column numbers. 15.65.3.6 SETS - This specifies which data set to show. 15.65.3.7 Statistics - The statistics on the data are typed at the end of the data. This includes the following: 1. Range of data for X and Y 2. Sum of all Y values and average Y value per point. 3. Error in the sum. This is only produced if the Y values have a non zero DY. To specify errors for existing data see the command X. 4. Mean X value, and standard deviation of the mean. Mean=SUM(X*Y)/SUM(Y) Std=SQRT(SUM((X-MEAN)*Y))/SUM(Y) 5. Error on the mean and standard deviation. These are only produced if either DX or DY are non zero for the data. DY is used if available otherwise DX is used to calculate the error. If the number of data points with Y,DX,DY non zero is less than 3 then DX is also used to calculate the error. 15.65.3.8 Example - You have entered a 3 dim array with 20 by 20 points. X ranges from 0 to 10, Y from 100 to 200. The total array will not fit on the terminal screen so you show a subset of the data: TD:SHOW DATA POINTS 3 to 8 LINES 5 to 10 TD:SHOW DATA POINTS 1 5 LINES 1 5 (SHOWS 25 points) TD:SHOW DATA LINE=1 (Shows only first 20 points) TD:SHOW DATA LIMITED FROM .5,100 TO .8,120 Example You have entered 100 data points X,Y,DX,DY etc. To show only points number 5 to 20 TD:SHOW DATA POINTS 5 to 20 15.65.4 ERRORS This shows the status of the error reports, and any error messages for this plot are displayed. 15.65.5 FLAGS This show the status of all flags. This is generally only useful for debugging TOPDRAWER. There is no SET FLAGS command. 15.65.6 HISTOGRAMS This command shows the list of histograms made available by the SET HISTOGRAM command. You may terminate the listing in the middle by pressing Ctrl_C. SHOW HISTOGRAMS [CURRENT] [[IDENT=] n] [FROM] [n1] [TO] [n2] [SELECT|NAME='hist_name'] [EXACT[=ON|OFF]] [ALL|FULL|BRIEF[=ON|OFF]] [CONTENTS[=ON|OFF]] [OPTIONS[=ON|OFF]] [STATISTICS[=ON|OFF]] [AREA|DIRECTORY="dir/subdir..."] [SEARCH[=ON|OFF]] [TReE[=ON|OFF]] [ENTRIES[=ON|OFF]] [HISTOGRAM[=ON|OFF]] [ARRAY[=ON|OFF]] [MESH[=ON|OFF]] [NTUPLES[=ON|OFF]] [NLMIT[=n]] [NMASK[=n]] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] 15.65.6.1 Options - 1. AREA/DIRECTORY - Specifies the area to list. 2. ALL, or FULL - Shows everyhing about the histograms. 3. EXACT - Histogram names are treated as exact strings, and they are not searched in a case independent manner. This must precede the option NAME="...". 4. BRIEF - Shows only a list of the hist IDENTS. 5. CONTENTS - Shows a listing of the histogram contents. NTUPLES are shown according to the SET HISTOGRAM SELECT options. 6. STATISTICS - Shows the histogram statistics. 7. POINTS|COLUMNS - Selects the range of contents to show. 8. SEARCH - Prints information only if the specified histograms are found. 9. TREE - Looks through the specified directory tree. 10. OPTIONS - Shows the histogram options. 11. AREA - Shows a brief directory of the selected area. 12. CURRENT - Selects the current hist to show. 13. FROM, TO - Selects a range of histograms to show. 14. IDENT - The histogram number to show. 15. MESH - Chooses only MESH data or regular data. 16. NTUPLE - Selects only NTUPLE data. OFF selects both MESH and regular data. 17. NAME - Selects hist by name. 18. NLIMIT - Shows the limits on NTUPLE variables. 19. NMASK - Shows the hist masks on NTUPLE variables. 15.65.6.2 AREA|DIRECTORY - Selects the area to list histograms. You may use wild characters to select the particular areas to show. See COMMAND SET HISTOGRAM. If you wish to get a directory of the direct access file: TD:SHOW HIST AREA=//FILE/subdir/sub-subdir... If you wish to get a directory of a global comman section: TD:SHOW HIST AREA=//SECT/subdir/sub-subdir... example TD:SHOW HIST AREA=/X Shows all histograms in subdirectory //PAWC/X. TD:SHOW HIST TREE AREA=/X Shows all histograms in the directory starting with //PAWC/X. TD:SHOW HIST AREA=/X/* Shows all histograms in subdirectories of area //PAWC/X TD:SHOW HIST AREA=/X*/Y Shows all histograms in the selecte areas. For example //PAWC/X1/Y and //PAWC/X2/Y will be shown but //PAWC/N/Y and //PAWC/X1/Z will not. 15.65.6.3 ALL|FULL - Shows all data about the histograms. This includes the ID,NAME, SIZE, and range of values. For some packages entries, over/underflows, sum, mean, and standard deviations are also listed. For Rice histograms the cuts are also listed. This option may slow the time to show each histogram, especially MESH histograms. This will not show extra information about histograms in an HBOOK4 RZ file. ALL=ON is the opposite of BRIEF=OFF. 15.65.6.4 BRIEF - Shows only the list of IDs available. ALL=OFF is the opposite of BRIEF=ON. 15.65.6.5 CONTENTS - Shows the contents of the histograms. This only works for NTUPLES and Arrays. POINTS selects the range of the array or the element of the ntuple. LINES selects the NTUPL element. The actual Ntuples shown are modified by previous SET HISTOGRAM SELECT commands. The number of significant figures in the output is set by the SET DIGITS command. 15.65.6.6 CURRENT - Specifies the current histogram. See:Command SET HISTOGRAM. 15.65.6.7 ENTRIES - If ON it selects only histograms which have entries (contain data). If OFF it selects only histograms without entries. The default is ON. If the option ENTRIES is not used, then no selection by entries is made. 15.65.6.8 EXACT - If ON and SELECT is used, then the histogram names are searched for in a case sensative manner. 15.65.6.9 FROM|TO - Specifies the range of histogram IDs to show. 15.65.6.10 IDENT - Specifies a single histogram to show. 15.65.6.11 HISTOGRAM - If HISTOGRAM=ON selects only histograms. 15.65.6.12 NTUPL - Selects only NTUPL data to show. (Default:ON) 15.65.6.13 NLIMITS - Shows you the existing limits on NTUPL variables. If the variable number is negative, it has not been used. 15.65.6.14 NMASKS - Shows you the existing masks on NTUPL variables. If the histogram number is negative, it has not been used. 15.65.6.15 MESH - If ON only 3-d or mesh histograms (scatterplots) are listed. If ON or OFF are omitted, ON is assumed. 15.65.6.16 SELECT - Selects the histograms by name. All histograms beginning with the hist_name will be shown. Percent '%' and star '*' are wild characters. 15.65.6.17 SEARCH - Information is printed only if the specified histograms are found. If SEARCH=OFF then the number of histograms and the current AREA are printed. (Default:SEARCH=OFF) 15.65.6.18 STATISTICS - Shows the statistics on the histograms. This consists of the number of entries, the range and the number of over/underflows. This will not show extra information about histograms in an HBOOK4 RZ file. 15.65.6.19 TREE - Searches the current or specified directory tree for histograms. For example you have directories //PAWC/X/A, //PAWC/X/B, and //PAWC/Y. You wish to list all histograms in directories X/A and X/B: TD:SHOW HIST AREA=//PAWC/X TREE or ... TD:SET HIST AREA=//PAWC/X TD:SHOW HIST TREE 15.65.6.20 Example - TD:SHOW HIST BRIEF Lists just the IDs of all available histograms. TD:SHOW HIST ID=5 FULL Types all information about histogram ID number 5. TD:SHOW HIST FROM 10 SELECT='ENERGY' Types the names and ids of all histograms with ID above 9 which have names beginning with 'ENERGY'. TD:SHOW HIST SELECT='*ENERGY' Types on your screen the names of all histograms with names containing the word 'ENERGY'. TD:SHOW HIST SELECT='*PI*ENERGY' Types the names of all histograms containing 'PI...ENERGY' in the name. TD:SHOW HIST SELECT='*ENERGY' MESH Types on your screen the names of all 3-d histograms with names containing the word 'ENERGY'. TD:SHOW HIST SELECT='*ENERGY' MESH BRIEF Types on your screen the IDs of all 3-d histograms with names containing the word 'ENERGY'. 15.65.7 KEYS TD:SHOW KEYS [key1,key2....] Shows you the current key definitions for the selected keys. If ALL or no keys are specified then all keys will be shown. See:Command SET KEY. To show KP0-KP9 keys you may specify just KP. Likewise you may specify PF for PF1-PF4 or F for F1-F20. key names are: PF1-PF4, KP0-KP9, MINUS, COMMA, PERIOD, ENTER, F1-F20, INSERT, DO, PREV_SCREEN, NEXT_SCREEN. 15.65.8 LEXICALS SHOW LEXICALS [V_lex1] [V_lex2]... Shows you the values of the specified lexicals. 15.65.9 TIME This shows the current CPU and clock time for your process. There is no SET command corresponding to SHOW TIME. 15.65.10 Example TD:SHOW BOX CIRCLE DIAMOND shows the default sizes for drawing boxes etc. TD:SHOW COLOR INTENSITY TEXTURE shows all the default attributes for lines. TD:SHOW STORAGE shows the current storage allocation. 15.66 SMOOTH SMOOTH [{X|Y|Z|RADIUS|THETA|PHI}] [LEVEL=n] [APPEND[=ON|OFF]] [NAME="name"] [CHECK[=ON|OFF]] [ERROR[=ON|OFF]] [FLAT[=ON|OFF]] [AVERAGE[=ON|OFF]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [LOG[=ON|OFF]] [MONITOR[=ON|OFF]] Replace the X,Y, or Z values by new values that give a smooth curve. The data is assumed to be a histogram of equally spaced bins. An alternate way of smoothing data is by convolution. See COMMAND CONVOLUTE. A convolution may be used to both smooth and "sharpen" the data. 15.66.1 Options 1. APPEND - Puts the smoothed data into a new data set. (Default:OFF) 2. AVERAGE - Modifies FLAT. When average=off each channel is the sum of n adjacent channels. (Default:ON) 3. CHECK - Checks the data to see if it is a proper histogram with X or X/Y for mesh equally spaced. IF it is not an error message is issued,and no smoothing is done. (Default:ON) 4. ERROR - Modifies the errors on the data assuming statistical errors. If OFF the errors are not modified. Essentially the smoothing algorithm is used on the square of the errors. (Default:ERROR=ON for REVISION>4.99) 5. FLAT - Smooths the data by adding together and averaging every n points. The result has every n points identical. LEVEL=n selects the number of points. For example SMOOTH FLAT LEVEL=2 averages points 1+2, 3+4, 5+6... (Default:OFF) 6. LEVEL=n - Selects approximately the number of points on either side of the bin that are used in determining the value for that bin. The range of levels is 1 to 5. 1 Will smooth over 3 points, while 5 will smooth over 11 points. (Default:3) 7. LINES/ROWS - Selects which rows of a mesh are smoothed. 8. LIMITED - Selects the range of X,Y,Z values to smooth. 9. LOG - Logs or types the results on your terminal. 10. MONITOR - Histograms the original data and joins the result. See: SET MODE MONITOR The result is joined using the SECONDARY attributes. to change them use the SET SECONDARY command. 11. NAME - Selects the name of the appended data set 12. POINTS/COLUMNS - Selects which data points or columns of a mesh are smoothed. If omitted all are smoothed. 13. SELECT - Selects the data set by name 14. SETS - Selects which data sets to use. 15. X,Y,Z... selects whether X, Y, or Z values are replaced. For MESH data it selects the axis to smooth along. (Default:Y) 15.66.2 Algorithm The data is smoothed by repeatedly transforming the points and residuals, using running means, quadratic interpolation, and hanning. Similar algorithms are described in Exploratory Data Analysis by John W Tukey at SLAC. This has been modified slightly by J. Clement to treat sparse statistical data correctly. The original alogorithm would throw away isolated data points which were larger than the surrounding data. 15.67 SORT SORT [SYMBOL] [[N][D]{X|Y|Z|U|V|W|THETA|RADIUS|PHI}] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS=[FROM] n1 [TO] [n2]] [APPEND[=ON|OFF]] [NAME="name"] [LOG[=ON|OFF]] Sorts the data according to the order of the fields (X,Y...) selected. If fields are omitted then they are sorted according to the order SYMBOL,X,DX,Y,DY,Z,DZ. Each data set is sorted independently. example TD:SORT X Y Z SYMBOL Sorts data so that all low X are first. Within groups of identical X values all low Y values are first, and so on. Since DX,DY,DZ are omitted the actual sorting order is: X,Y,Z,SYMBOL,DX,DY,DZ. 15.68 SPAWN This command temporarily spawns out of TOPDRAWER to VMS. The SPAWN command is not journaled unless ABORT=OFF MODE is selected. SPAWN [dcl_command] For example you are trying to do a plot, but you have forgotten the filename with the TOPDRAWER source, so you: TD:SPAWN DIRECTORY You will get a directory listing so you can find the file name. If you use the SPAWN command with no parameters, you return to TOPDRAWER with the VMS command: $ LOGOFF 15.69 STOP STOP|END|EXIT|HALT|QUIT ['string'] These commands all stop TOPDRAWER. Any data remaining in the buffers is flushed, and all output files are closed. This is also equivalent to typing Ctrl_Z if Ctrl_Z is ON. The program is stopped and the string is typed. If you wish to stop in the middle type Ctrl_C. This will abort the current operation and restore the prompt. If you are in the middle of getting data from a file, the file will skip to the next CLEAR or STOP command. Pressing Ctrl_C twice rapidly in succession will abort all file input. If you type Ctrl_C twice rapidly again you will be prompted if you wish to terminate the program completely. 15.70 SWAP SWAP {X|[N]DX|Y|[N]DY|Z|[N]DZ|U|[N]DU|V|[N]DV|W|[N]DW} [WITH] {X|[N]DX|Y| [N]DY|Z|[N]DZ|U|[N]DU|V|[N]DV|W|[N]DW} [POINTS=[FROM] n1 [TO] [n2]] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [ERROR[=ON|OFF]] This command swaps the data for 2 variables. If ERROR is specified then the corresponding errors are swapped with the data. (Default:ERROR=ON for REVISION>4.99) This is useful if the data is in the wrong location for the type of plot you wish to make. An example of this is making 3-d plots from binned data. You have read in data, X,Y,DY and you have binned it into a frequency distribution using the BIN command. Now the result is in X,Y,DX,DY. You wish to make a 3-d histogram, but the data must be in X,Z,DX,DZ. To fix the problem: TD:SWAP Z WITH Y TD:SWAP DZ WITH DY Now you can set the Y value and perform the histogram. TD:Y=10.0 TD:SET THREE ON TD:HISTOGRAM You may copy data using the X,Y,Z,DX,... commands. 15.71 SYMBOL SYMBOL=symbol [LIMITED [VLOG[=ON|OFF]] [[FROM]|TO [[X=]nx,[[Y=]ny[,[Z=]nz]]] [RECURSOR] [CURSOR] ] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS=[FROM] n1 [TO] [n2]] This resets the symbol for the selected data points or sets. Symbols should be 0O,1O,...9O, DOT or NONE. Any other symbol may not be properly centered. 15.72 TITLE Puts a title on the plot TITLE [x, [y, [z]]|CURSOR] 'text_of_title' [TIME] [lexicals] [TOP|BOTTOM|RIGHT|LEFT|X|Y|Z|GENERAL] [DATA|XDATA|YDATA|TEXT] [LJUSTIFY|CENTER|RJUSTIFY] [LINES=n] [SIZE=n] [ANGLE=n] [SPACES=n] [INDEX=n] [DIGITS=n] [CASE 'case modifier string'] [INTENSITY|WIDTH=n] [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN] The text will be written on the plot. It must be enclosed in apostrophes or quotes. 15.72.1 Xyz x, y, z - Specify the position of left most character in the text. If no position is given, and TOP,BOTTOM... are not specified the title is placed below the most recent title. CURSOR produces the cross hair curson on interactive terminals. You move the cursor to the location you wish the title to appear, and press the space bar. The position of the cursor is written to the JOURNAL file so you may repeat the plot exactly. If you need titles at angles other than horizontal, you should also use the option ANGLE=n. 15.72.2 ANGLE ANGLE=n - Gives the angle in degrees measured counterclockwise. ANGLE=90 runs the title from bottom to top. This has no effect on perspective labels for 3-d plots. 15.72.3 LJUSTIFY|CENTER|RJUSTIFY Either left, right or center justifies the title. (Default:LJUSTIFY) * LJUSTIFY - The center of the first character is at x,y,z. * CENTER - The center of the string is at x,y,x. The center is assumed half way between the first and last characters. * RJUSTIFY - The center of the last character is at x,y,z. If TOP,BOTTOM... are specified then the title is automatically centered. example TD:Title TOP LJUST 'Left' TD:Title top 'Center' TD:Title top RJUST 'Right' puts 3 titles at the top of the plot on the left,center, and right. example TD:TITLE 10,5 RJUST 'Location 10,5 -->+' Puts the title with the plus sign at x=10, y=5. 15.72.4 DATA|XDATA|YDATA|TEXT Specifies the DATA or TEXT coordinate frame. Normally x, y are in the text coordinate system. If you specify x,y, and z then the data frame is assumed. DATA - both x,y are in the data frame. TEXT - both x,y are in the text frame. XDATA - x is in data frame y in text frame. YDATA - y is in data frame x in text frame. 15.72.5 DIGITS DIGITS=n selects the number of significant figures to reproduce for lexicals. If n is omitted it is assumed to be 4. You may also set the number of digits with the SET DIGITS command. example TD:TITLE TOP 'Mean=',DIGITS=6,T_MEAN,' err=',DIGITS=2,T_EMEAN The top title will be the mean and error for the data. 15.72.6 Lexicals You may include a lexical value in your title. A title lexical is an option in the form T_xxxx, where xxxx is the value to plot. The number of significant digits in the number is normally 4. You may alter this with the DIGITS=n option or the SET DIGITS command. For example you wish to show the sum of the data in the top title: TD:TITLE TOP 'My data - Sum=',T_SUM You may wish to limit the sum to a portion of the data so you first use show data to calculate the sum for a limited portion, then put it in the title: TD SHOW DATA LIMITED FROM X=5 to X=10 TD:TITLE BOTTOM 'Sum=' T_SUM 'X from ' T_XMIN ' to ' T_XMAX TD:TITLE TOP 'Sum=' T_SUM ' '+' CASE'M' T_ESUM For more information SEE:TOPDRAWER LEXICALS. 15.72.7 TIME Inserts the current DATE and TIME into the title. For example: TD:TITLE TOP '(Date: ' TIME ')' Assuming the current time is noon on the Jan 1, 1987, the following title is plotted at the top: (Date: 1-JAN-87 12:00:00) 15.72.8 TOP|BOTTOM|RIGHT|LEFT|GENERAL TOP,BOTTOM,RIGHT,LEFT - Specify the title position relative to the data window. GENERAL is a synonym for TOP. The title is centered at the appropriate position. The size and angle are determined by the SET SIZE command. If a size, or x,y,z are specified, they override the default position and size. A TOP title is generally drawn with character size 1.5 times the default. If no other options are specified, then the character size is reduced by up to a factor of 4 to keep the title from overflowing the screen. 15.72.9 X|Y|Z For 3-d plots the label is drawn in perspective parallel to the selected axis. For 2-d plots X,Y,Z are synonyms for LEFT,BOTTOM,TOP. 15.72.10 LINES LINES=n - Moves the title up space for n extra lines of text. The title is moved up by n-1 lines. If LINES=1 then the title is not moved at all. 15.72.11 SIZE SIZE=n gives the approximate spacing between chars. in tenths of an inch. If n is negative hardware characters will be used when available. If n is positive software characters will be used if mode VECTOR=ON. If not specified the size is determined by the most recent title command. Once this parameter has been set, the character size remains the same unless a BOTTOM,TOP,RIGHT,LEFT,X,Y,Z or SIZE option is used. If not specified the angle is determined by the most recent title command. 15.72.12 INDEX INDEX=n - Specifies the line spacing in multiples of character spacing. This is used for multiline titles. 15.72.13 SPACES SPACES=n This specifies how much space the title occupies. This is only necessary if variable character spacing, or sub/superscripts are used and you wish to center the title. 15.72.14 INTENSITY INTENSITY - Determines the intensity or line width of the title. 15.72.15 WHITE... WHITE.... Determines the color of the title. 15.72.16 CASE Controls the format of the title. It must be the next command after the TITLE or MORE command or on the same line with the TITLE command. It modifies only the preceding string. It must immediately follow the string either on the same, or the next line. CASE 'case_text' This specifies the case or character type of each character in the title text. For the definitions of all possible CASE characters see: TOPDRAWER FONTS It is not necessary to use a case command if you only want upper and lower case ASCII characters. Simply type them into your title as you wish to see them. example TD:TITLE TOP 'ABG' CASE 'GGG' Produces a title with 3 lower case Greek letters alpha,beta,gamma. TD:TITLE TOP 'ABC' 'ABG' CASE 'GGG' Produces a title with 3 Roman letters followed by 3 Greek letters. TD:TITLE TOP 'S=' CASE 'G' V_SUM Produces a Greek "Sigma". TD:TITLE TOP 'S=' V_SUM CASE 'G' Does not produce any Greek because the case and string are separated by a lexical. 15.72.17 3-d If the options X,Y, or Z are used, then the title is plotted in perspective relative to the default X,Y,Z axis. If you set each axis to be in a particular location, then you should plot the axis title specifying X,Y,Z or specify the origin using the SET THREE command. The title starts at the origin of the axis. If the option CENTER is used the title is centered along the axis. If the title position is also specified, then the title is plotted according to the position specified. The AXIS angle determines the orientation of the title. See the command SET THREE. If a title is drawn in perspective, subsequent title commands without any position specifications will draw more titles above or below the first one. The displacement is picked away from the axis. 15.72.18 Consecutive_titles If a title command omits the options TOP, BOTTOM, RIGHT, LEFT, X, Y, or Z and no locations (x,y,z) are specified, then the title is placed under the previous one. The spacing is determined by the INDEX option. The previous INDEX, ANGLE, SIZE, justification, LINES, and SPACING are retained. If the previous title was a 3-D title then the current title may be placed above it, depending on the axes angle and orientation of the view. 15.73 TRANSFORM TRANSFORM [FROM|TO CARTESIAN|POLAR|SPHERICAL] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [APPEND[=ON|OFF]] [NAME="name"] [LOG[=ON|OFF]] Transforms data coordinates from one frame to another. This will not work with mesh data. If omitted, the FROM or TO is assumed to be CARTESIAN coordinates. 1. APPEND - Appends the transformed data as a new data set. 2. LOG - Logs the operation on your terminal. 3. POLAR - THETA,R,Z cordinates selected 4. SPHERICAL - THETA,R,PHI cordinates selected 5. CARTESIAN - X,Y,Z cordinates selected (Default) example TD:TRANSFORM FROM POLAR TO SPERICAL SET=5 Transforms data set 5. TD:TRANSFORM TO POLAR All data sets are transformed from X,Y,Z to polar coordinates THETA,R,Z respectively. 15.74 TYPE TYPE [ERASE] [TOP] [BOTTOM] [BELL] [BOLD] [BLINK] [REVERSE] [UNDERLINE] [WIDE] [BACKGROUND|FOEGROUND [ [WHITE|RED|GREEN|BLUE|YELLOW| MAGENTA|CYAN]] [nn] ["string"] The string is typed on your terminal. This is useful for typing messages on the users terminal while plots are being produced from an input file. 1. ERASE - This erases the screen (ANSI terminal). This erases text from a VT-1xx/2xx compatible terminal. This does not erase TEKTRONIX graphics, but REGIS graphics will be erased. This must be precede the string. 2. TOP - The string is at the top of the screen (ANSI terminal). 3. BOTTOM - The string is at the bottom of the screen (ANSI terminal). 4. BELL - This rings the bell. 5. BOLD,BLINK,REVERSE,UNDERLINE,WIDE - Sets the video attributes of the line. These must be after the ERASE,TOP options and before the string. Several of these may be used together. These only work for a VT-100 or compatible ANSI terminal. 6. BACKGROUND|FOREGROUND control the color. (ANSI terminal) Once the color has been set it remains set until another type command sets new colors. 7. nn - This inserts a control character (0-255) into the string. nn and string may be repeated to generate control characters. See also: SET PROMPT. 15.75 U See:Command X 15.76 V See:Command X 15.77 W See:Command X 15.78 X Put a sequence of values into one of the data point or error arrays. This is useful when the X values are uniformly spaced, and you only wish to enter the Y values. This may also be used for entering constant, proportional or counting errors. You may also modify the data by a constant or an equation. For example you can normalize the data. {[N][D]{X|Y|Z|U|V|W|THETA|RADIUS|PHI}}= Generate a range of values [BINS|VALUES] [[FROM] xlow] [TO xhi] [BY|WIDTH|STEP xstep] [N=n] Operations "expression" or ... {[N][D]{X|Y|Z|U|V|W|THETA|RADIUS|PHI}} [PLUS|+|MINUS|-|TIMES|*| DIVIDE|/] n [[NO]ERROR=n] or ... [POISSON|SQRT|SAMPLES=s] Data selection [APPEND[=ON|OFF]] [NAME="name"] [SETS=[FROM] n1 [TO] [n2]] [SELECT="name"] [POINTS|COLUMNS=[FROM] n1 [TO] [n2]] [LINES|ROWS=[FROM] n1 [TO] [n2]] [LOG[=ON|OFF]] 15.78.1 APPEND The specified points are appended to last data set. If you wish to create a new set you should use the DATA SET command. This option may not be used with the SETS or POINTS options. It is also illegal for mesh data. Along with APPEND you must specify 3 of the options FROM,TO,BY,N. 15.78.2 BINS|VALUES BINS creates values at the centers of bins whose edge is defined by the values. VALUES specifies the values for the specified coordinate. If you specify a range of values or bins, you may not specify operations such as TIMES,DIVIDE,MINUS,PLUS or a coordinate such as X,Y,DX... or an equation. If you generate a new data set you must specify 3 numbers for FROM,TO,BY, and N. If you modify an existing data set only 2 numbers are spcified. You may also specify a single value. examples TD:DX=0.5 Sets all DX values to 0.5 TD:X=BINS FROM 1 to 10 by 2 Generates a new data set with values X=2,4,6,8 TD:X=VALUES FROM 1 TO 10 BY 2 or... TD:X FROM 1 TO 10 BY 2 Generates a new data set with values X=1,3,5,7,9 TD:X FROM 1 BY 2 SET=2 Modifies data set 2 with values X=1,3,5,7,9... TD:X=Y TIMES FROM 1 TO 10 BY 2 Is illegal TD:X=Y TIMES 2 is legal 15.78.3 ERROR This specifies the error on the value you have specified. If you use NOERROR the error analysis is turned off. This only works when you are modifying X,Y,Z values. The specified error is used to modify the DX,DY,DZ value. example Y=Y * 5.0 Will multiply each Y and DY value by 5.0. Y=Y * 5.0 ERROR=0.1 Will multiply each Y and DY value by 5.0. The specified error of 0.1 Will be used to compute the actual DY value. Y=Y * 5.0 NOERROR Will multiply each Y value by 5.0. The DY values will remain unchanged. Y="LOG(YV)" NOERROR Will take the LOG to base 10 of each Y value. The DY values will remain unchanged. Y="LOG(YV)" Will take the LOG to base 10 of each Y value. The DY values will be modified as: DY=ABS(LOG(Y+DY)-LOG(Y)). 15.78.4 Expression You may use an expression inside quotes to actually calculate the value for an existing data set. The expression is evaluated for each value required. The lexicals V_XVALUE,V_DXVALUE,V_ZVALUE... are the current X,DX,Y... needed to perform the calculation. If you do not specify NOERROR then the error is also computed when X,Y,Z are modified by the expression. If you use an expression you may not use any other options except for POINTS, LINES, COLUMNS, SETS, and LOG and ERROR. 15.78.4.1 Errors - The error is generated in a simple fashion. The computation is repeated for the value+err. For example you specify: TD:Y="SIN(YV)" then the result is: NDY=-(SIN(Y-DY)-SIN(Y)) DY=SIN(Y+DY)-SIN(Y) Y=SIN(Y) This computation may not be correct, so the error analysis must be carefully checked. It will work for many simple cases. 15.78.4.2 Examples - TD:X FROM 0 to 360 by 5 TD:Y="SINE<XV>" Generates a sine wave between 0 and 360 degrees in 5 degree steps. TD:Y=Y TIMES 10 or... TD:Y="YV*10" Both multiply y by the constant value 10.0. The first method is faster, and it also multiplies DY by the constant, while the expression does not alter DY. 15.78.5 LINES|ROWS selects the mesh rows for which values are generated. If a single number is specified it is the row number to set. If both n1 and n2 are specified they are the first and last row to set. 15.78.6 LOG Types on your terminal the results of the operation. (Default:LOG=OFF) 15.78.7 NAME The new set will usually have a name consisting of a transformation name followed by the old set name. If you specify a new name it is applied to the new data set. If the name ends in "%" then the old name is appended to the new name. See option:APPEND 15.78.8 POINTS|COLUMNS selects the points or mesh data columns for which values are generated. If a single number is specified it is point number to set. If both n1 and n2 are specified they are the first and last point to set. 15.78.9 POISSON|SQRT applies only to Dn and makes Dn=SQRT(n). This is counting statistics. It is a special case of binomial statistics for a large number of samples. 15.78.10 SAMPLES SAMPLES=s applies binomial statistics to Dn, Dn=SQRT(max(n,1)*max(s-n,1)/s). You must supply the number of samples (s). If you generate a set of data by a Monte-Carlo method where the total number of hits s is selected, but the distribution of the hits is generated by the program then you should use Binomial statistics. 15.78.11 SETS selects the data set to modify. 15.78.12 TIMES Multiplies the selected coordinate by the selected value. If you are multiplying X,Y, or Z by a constant the DX,DY, or DZ are also multiplied by the constant. In addition if ERROR was specified then the final Dn will be modified by the specified error. DY=SQRT(DY**2+(e*n/c)**2)*c where C is the specified constant. If a coordinate and a number are specified, but no operator then TIMES is assumed. example To multiply y by 2+-0.1 Y=Y TIMES 2 ERROR=.1 or... Y=Y * 2 ERROR=.1 To multiply y by 2 with no error on the value 2. Y=2 Y or... Y=2 TIMES Y or... Y=2 * Y 15.78.13 PLUS Adds the value to the coordinate. If you specify ERROR and you are adding a constant to X,Y, or Z the DX,DY, or DZ are also modified. DY=SQRT(DY**2+(e)**2) where e is the specified error. example To add 2+-0.1 to y Y=Y PLUS 2 ERROR=.1 or... Y=Y + 2 ERROR=.1 15.78.14 MINUS Subtracts the value from the coordinate or the coordinate from the value. If you specify ERROR and you are subtracting a constant to X,Y, or Z the DX,DY, or DZ are also modified. DY=SQRT(DY**2+(e)**2) where e is the specified error. example To subtract 2+-0.1 from y Y=Y MINUS 2 ERROR=.1 or... Y=Y - 2 ERROR=.1 To subtract Y from 2. Y=2 MINUS Y or... Y=2 - Y 15.78.15 DIVIDE Divides the coordinate by the value or a value by a coordinate. If you are dividing X,Y, or Z by a constant the DX,DY, or DZ are also divided by the constant. In addition if ERROR was specified then the final Dn will be modified by the specified error. DY=SQRT(DY**2+(e*n/c)**2)/c where C is the specified constant. example To divide y by 2+-0.1 Y=Y DIVIDE 2 ERROR=.1 or... Y=Y / 2 ERROR=.1 To divide 2+-0.1 by Y Y=2 ERROR=.1 DIVIDE Y or... Y=2 ERROR=.1 / Y 15.78.16 Warning If you have already plotted the current data, this command will delete it if just a value, or range of values is specified for X,Y, or Z. If you wish to keep the data, you should use the option POINTS, SETS, or APPEND. 15.78.17 Examples TD:X VALUES FROM 0 to 10 by 1 creates a data set with 11 values for X 0,1,2,...10 TD:X BINS FROM 0 to 10 N=10 or ... TD:X FROM 0 to 10 by 1 BINS create a data set with 10 values for X 0.5,1.5....9.5 TD:X FROM 0 to 20 BINS POINTS=1 TO 10 generates 1,3,5,...19 for Data points 1 to 10. TD:Y=2.0 POINT=5 data point number 5 is set to 2.0 TD:DY =5 Sets all Y errors to +-5. TD:DX =.1 * X or .... TD:DX =.1 TIMES X Sets all X errors to 1. times the X value. TD:X = 1 PLUS X or ... TD:X = 1 + X Adds 1.0 to all X values. TD:X = 1 + X ERROR=0.1 Adds 1.0 to all X values and adds 0.1 in quadrature to all DX. DX=SQRT(DX**2+(0.1)**2) TD:Y = DIVIDE 5 Both Y and DY are divided by 5. TD:Y =Y * 5 ERROR=0.1 The Y coordinate is multiplied by 5, and the DY is modified according to the error. DY=5*SQRT(DY**2+(0.1*Y/5)**2) TD:SET ORDER Y TD:1.5; 3.8; 9.7 TD:X FROM 1 to 3 or.... TD:X FROM 1 BY 1 is the same as: TD:1 1.5; 2 3.8; 3 9.7 TD:DY SAMPLES=100 Each DY is now equal to SQRT(Y*(100-Y)/100). This assumes that each Y represents the number of sucesses out of a sample of 100. TD:Y=Y / V_SUM Normalizes the data to the total sum over all data. Note: This may not have the desired effect if you have more than 1 data set. To normalize only one data set: SET STATISTICS SET=2 TD:Y=Y / V_SUM Normalizes only data set 2. TD:Y="LOG(YV)" Transforms Y by taking the LOG to base 10. DY is likewise modified. Y=LOG10(Y) and DY=ABS(LOG10(Y+DY)-LOG10(Y)) 15.78.18 Mesh_examples Assume you have mesh data X,Y (ROW,COLUMN) of size 20, 30. TD:X=X MINUS 5 Shifts the X scale TD:Y=Y TIMES 2 Expands the Y scale TD:Z=10 ROW=5 COLUMN=3 Modifies 1 entry TD:Z=0 Sets all mesh values to 0.0 TD:Z=Z PLUS 1 ROW=5 TO 10 COLUMN=3 TO 5 Adds 1 to all mesh values for the specified range of rows and columns. 15 values are modified. 15.79 Y See:Command X 15.80 Z See:Command X

CHAPTER 16 LEXICAL_VALUES

You have access to data via lexicals. For example you may access the sum, mean, standard deviation of your data set and put them into a title. See:Command TITLE. Quantities such as points, sum etc. are calculated by a SET STATISTICS or SHOW DATA command. If you do not use SET STATISTICS or SHOW DATA to generate them, they are automatically calculated from the entire data set. Whenever you modify the data set, you must use SET STATISTICS to set the statistics if you wish the lexicals to represent only a subset of the data. To use a lexical value you must use a symbol of the form: T_NAME, S_NAME, or V_NAME. The T_NAME inserts the value of the name into a title string. V_NAME or <NAME> is used to get the value as a number. S_NAME gets a value as a string. You may define lexical values by the command DEFINE VALUE or DEFINE STRING. The lexicals may be abbreviated to the shortest unique name. For convenience V_ may be omitted inside an expression. This will increase the time to parse an expression. For example <V_XVALUE> is the same as <XVALUE> or V_XV. 16.1 LIST_OF_NAMES NAMES - Value * INPUT_LEVEL - The number of input files opened by SET FILE INPUT. * CPUTIME - The current cpu time * CPULIMIT - The cpu time remaining * SETS - The number of data sets. * CURRENT_SET - The current data set (Set by option:SETS=) * XVALUE[np,nr,ns] - The X value for point n in set ns. * DXVALUE[np,nr,ns] - The error on X for point np row nr in set ns * NDX[np,nr,ns],NDY,NDZVALUE - Negative part of error bar. * YVALUE[np,nr,ns] * ZVALUE[np,nr,ns] * UVALUE[np,nr,ns] * VVALUE[np,nr,ns] * WVALUE[np,nr,ns] * DYVALUE[np,nr,ns] * DZVALUE[np,nr,ns] - (data for point n) * RVALUE[np,nr,ns],DRVALUE[np,nr,ns] - Radius in polar or spherical coordinates * THVALUE[np,nr,ns],DTHVALUE[np,nr,ns] - Theta in polar or spherical coordinates * PHIVALUE[np,nr,ns],DPHIVALUE[np,nr,ns] - Phi in Spherical coordinates * PLOTS - The number of plots produced. * WINDOWS - The maximum number of windows * CURRENT_WINDOW - The current window number * XWINDOWS - The maximum number of X windows * CURRENT_XWINDOW - The current X window number. * YWINDOWS - The maximum number of Y windows * CURRENT_YWINDOW - The current Y window number. * COLUMNS - Number of columns in a mesh. * CURRENT_COLUMN - Current column of a mesh (Set by option:POINT| COLUMN=) * ROWS - Number of rows in a mesh. * CURRENT_ROW - Current row in a mesh. (Set by option:LINE|ROW=) Calc by SET STATISTICS or SHOW DATA * POINTS - The points in your data set. * nMIN - The minimum value of n where n=X,Y, or Z. * nMAX - The maximum value of n where n=X,Y, or Z. * SUM - The sum over all points. * AVERAGE - The average over all points. * MEAN - The mean of the data. * STD - The standard deviation of the data from the average. * ESUM - The error on the sum. * EAVERAGE - The error on the average. * ESTD - The error in the STD. * EMEAN - The error in the mean. Calc by FIT command * TERMS - The maximum term fit or constrained. (0...20) * NPFIT - Then number of points fit * NTFIT - The number of terms fit. * CHISQR - The chi squared/point. * FTEST - The value of FTEST. * FIT[n] - 1 if coefficient n has been fit (n=0-19), 0 if not. * CONSTRAINED[n] - 1 if this coefficient has been picked or constrained. * COEFFICIENT[n] - Value of the coefficient of the fit. * ECOEFFICIENT[n] - Error on coefficient n. SET by SET HIST command * CURRENT_HISTOGRAM - The current histogram ID (See:Command SET HISTOGRAM) * HIST_NAME - Current hist name (S_ only) * HIST_ENTRIES - The number of entries in the hist * HIST_MEAN - The mean of the hist * HIST_STD - The hist standard deviation * HIST_SUM[n1,n2] - The sum over this histogram. n1 = 1,2,3 for X Under,sum,over n2 = 1,2,3 for Y Under,sum,over If n1 or n2 are omitted or are 0 then you get the sum of all 3. * XMARKER[n] - Array of 8 X markers * YMARKER[n] - Array of 8 Y markers * ZMARKER[n] - Array of 8 Z markers 3-d Parameters * VIEW_THETA - Viewing angle * VIEW_PHI - Viewing angle * VIEW_SEPARATION - Eye separation * VIEW_DISTANCE - Distance from observer to object * VIEW_SCRD - Distance from observer to screen Miscellaneous * REPEAT[n] - Repeat number for loop n. 16.2 VALUES V_XVALUE[n,ns] is the n'th value in set ns. Likewise V_DXVALUE[n,ns] is the n'th value in set ns. You may also access Y,DY,Z, and DZ. S_SYMBOL[n,ns] is the symbol for the the n'th value in set ns. If ns is omited then n is the point number. For MESH plots V_XVALUE[n1],V_YVALUE[n2],V_ZVALUE[n1,n2] are used to access the data point values where n1 is the column number and n2 is the row number. If both n and ns are omitted then it is the value for the current point in an X=,DX=,Y=... command. 16.3 REPEAT V_REPEAT[n] This is the repeat index for repeat commands. It starts at 1 and is equal to the number of repeats when the loop terminates. You may specify the loop number as n. If n is omitted it is the current inner loop. If n is negative it is the next outer loop. example TD:REPEAT 2 "TYPE ""A"",S_REPEAT;REPEAT 3 ""TYPE S_REPEAT,'| 'S_REPEAT[-1]"""; Types: A1.0 1.0|1.0 2.0|1.0 3.0|1.0 A1.0 1.0|2.0 2.0|2.0 3.0|2.0 16.4 EXAMPLES TD:TITLE TOP 'Mean=' T_MEAN Writes the mean of our data at the top of the current plot. TD:SET ORDER X Y DX DY TD:DATA SET TD:V_MEAN,V_SUM,V_ESTD,V_ESUM TD:DELETE SET=FIRST Creates a new data set containing the Y=SUM, X=MEAN, DX=STD, DY=error on SUM, then deletes the old data set. TD:IF V_FIT[1] .gt. 0 TITLE 'Coef(1)=',T_COEFFICIENT[1] Writes coefficient 1 if it has been fit. TD:SET STATISTICS LIMITED FROM 0,1 to 5,10 TD:TITLE TOP 'Sum=',T_SUM,' between x=0,5 y=1,10' Plot a title with the sum over the data between limits on x,y. TD:SET STATISTICS SET=2 TD:TITLE TOP 'Sum=',T_SUM,' for data set 2' Plot a title with the sum over data set 2.

CHAPTER 17 EXAMPLES

There are several files that give examples of TOPDRAWER plots. Fonts + 2 dimensional graphics TOPDRAWER_ROOT:[EXAMPLES]TDINTRO.TOP 3 dimensional graphics TOPDRAWER_ROOT:[EXAMPLES]TD3D.TOP Character set TOPDRAWER_ROOT:[EXAMPLES]FONT_TABLE.TOP Color graphics on VT-240 or GIGI TOPDRAWER_ROOT:[EXAMPLES]COLORGRAPH.TOP Test routines TOPDRAWER_ROOT:[EXAMPLES]BENCH.TOP TOPDRAWER_ROOT:[EXAMPLES]RESOLUTION_TEST.TOP TOPDRAWER_ROOT:[EXAMPLES]FIT_TEST.TOP Test to make sure coefficients and errors are correct TOPDRAWER_ROOT:[EXAMPLES]FIT_GAUS_COEF_TEST.TOP TOPDRAWER_ROOT:[EXAMPLES]FIT_EXP_COEF_TEST.TOP TOPDRAWER_ROOT:[EXAMPLES]FIT_PARABOLA_COEF_TEST.TOP

CHAPTER 18 SUBROUTINES

The TOPDRAWER package is available as a collection of subroutines. You can call them to produce plots from any program. Each subroutine is the same as giving a TOPDRAWER command. They are available in library: TOPDRAWER_DIR:TOPDRAWER 18.1 NAMES Most internal subroutines used by TOPDRAWER begin with T1,T2,TD, or TX. The unified graphics routines all begin with UG. The exceptions to these rules except for TOKEN are documented here. The CERN library histogram routines used by TD do not follow any clear conventions. 18.2 STRINGS WARNING Routines TDSET,TDTITL and TDCASE are not fully Fortran-77 compatible. You must use either hollerith data, byte arrays, literals, or character variables sent by reference when using those routines. If you use a byte array or a character array sent by reference, you must terminate it with a semicolon (;) The following are all legal: CHARACTER*8 str DATA str /'Title;'/ CALL TDTITL(%REF(str)) or... CALL TDTITL('Title') or... CALL TDTITL(6HTitle;) or... REAL*8 str DATA str /'Title;'/ CALL TDTITL(str) or... byte str(5) DATA str /'T','i','t','l','e',';'/ CALL TDTITL(str) 18.3 UNIT_NUMBERS The following logical unit numbers are used: Unit Routine Usage 1 T2SETH Histogram input 6 All Error message/Information output 7 TDMAIN Journal file output 8 All Listing output 9-19 TDMAIN Input 86 All Error message for deferred errors The journal file, and listing are not output unless the following set commands are used: TD:SET FILE LOG filename TD:SET FILE LIST filename 18.4 LINKING For more information on linking see UGS. The following routines should be linked to your program. $ LINK Routine, - TOPDRAWER_OLB[/INCLUDE=TD]/LIBRARY, - PACKLIB_OLB/LIBRARY,MATHLIB_OLB/LIBRARY, UGS_OLB/LIBRARY If you wish to link a standalone version of topdrawer use /INCLUDE=TD. For example you wish to make up a version of Topdrawer to do fits with your own supplied function TDUFUN. You would link a new version as follows: $ LINK TDUFUN, - TOPDRAWER_OLB/INCLUDE=TD/LIBRARY, - PACKLIB_OLB/LIBRARY,MATHLIB_OLB/LIBRARY, UGS_OLB/LIBRARY 18.5 DEMO_PROGRAM There are Demo programs in TOPDRAWER_ROOT:[EXAMPLES] called TD_DEMO.FOR,TD_DEMO3.FOR and also a command file to build it called TD_DEMO.COM. This illustrates the usage of the TOPDRAWER subroutines. 18.6 LIST_OF_SUBROUTINES Miscellaneous routines 1. CPULIM - Gives you the CPU time remaining. 2. CPUTIM - Gives you the consumed CPU time. 3. DEFKEY - Defines keypad keys. 4. HELP - Types help info in your terminal. 5. INTRAC - Tells you if you are running interactively. 6. SPAWN - Spawns a subprocess 7. TRACE - Generates traceback. 8. READPR - Reads input with prompt. TOPDRAWER routines 9. TDARRO - Draws ARROWN 10. TDCRCL - Draws BOX, CIRCLE, DIAMOND 11. TDEND - Empties buffers and closes graphics. 12. TDFLSH - Flushes the buffers 13. TDGETV - Gets a lexical value. 14. TDHIST - Does histograms 15. TDJOIN - Joins points 16. TDLIMS - Sets plot limits 17. TDNEW - Same as NEW FRAME command (with ALIAS) 18. TDNEWP - Same as NEW FRAME command 19. TDPLOT - Same as PLOT command 20. TDSETS - Sets parameters - same as SET command 21. TDSHOW - Type parameters on your terminal - same as SHOW command 22. TDTEXT - Draws text - same as TITLE command 23. TDVAX_PLOT - Set up default device 24. TD3JIN - Join 3-d data 25. TD3HST - Histogram 3-d data 26. T2MAIN - The main program for TOPDRAWER 27. T2CURS - The cursor routine 28. T2UPCS - Converts string to upper case 29. T2SQEZ - Squeezes multiple blanks from character strings. 30. T2_TRAP - Sets up to trap Control_C 18.7 CPUTIM TIME = CPUTIM(OTIME) This call will give you the difference in cputime between the current time and the previous time (OTIME) in seconds. If otime=0.0 then the total cpu time since the start of your process is returned. This subroutine is independent from the rest of TOPDRAWER 18.8 CPULIM TIME = CPULIM(OTIME) This call will give you the difference in cputime between the remaining cpu time and the previous time (OTIME) in seconds. If otime=0.0 then the total time limit since the start of your process is returned. If CPULIM(0.0) is zero then there is no time limit on your process. Example TIME=CPULIM(CPUTIM(0.0)) This gives you the time remaining. If this is negative, then there was no limit. This subroutine is independent from the rest of TOPDRAWER 18.9 HELP CALL HELP(string) INPUT: string = string of arguments to pass to help This program was copied from Fortran Users Guide D-16 It assumes the primary help library is TOPDRAWER_HLB. This subroutine is independent from the rest of TOPDRAWER 18.10 INTRAC ITEST=INTRAC(I) I - A dummy variable ITEST = .TRUE. if you are running interactively. 18.11 SPAWN CALL SPAWN('command line') A subprocess is created, the command line is executed, and then control returns to your program. If the command line is blank, the user gets the DCL prompt, and control returns after the user types LOG. 18.12 TRACE CALL TRACE Generates an error message including traceback. This may be useful for debugging. 18.13 READPR This reads from the SYS$INPUT after prompting CALL READPR('PROMPT',STRING,LENGTH,[Itimeout]) INPUT: PROMPT= string to prompt with Itimeout= timeout time in seconds (integer) If the time between typed characters exceeds the timeout then the read is terminated. OUTPUT: STRING = input LENGTH = length of the input You may define keypad keys to return a string using DEFKEY. DEFKEY and READPR are routines which work together. This subroutine is independent from the rest of TOPDRAWER example CHARACTER*20 STR CALL READPR('Input:',STR,I,60) IF (I.gt.0) TYPE *,'STR=",STR(1:I),'"' Reads a string of 20 characters or less and writes it on your terminal. You have 60 seconds to begin typing after the prompt. 18.14 DEFKEY This defines a key on the keypad. CALL DEFKEY(string) The keypad key is defined in a manner similar to the DEFINE/KEY VMS command. All of the ASK routines and READPR will interpret the keypad keys, according to the DEFKEY routine. DEFKEY and READPR are routines which work together. Example CALL DEFKEY('/KEY PF2 "HELP"/TERMINATE') This is the default definition of PF2 18.15 TDARRO This draws an arrow from XYZ(1:3,1) to XYZ(1:3,2) CALL TDARRO(XYZ,[DXYZ,[IMODE,[ITYPE]]]) 1. XYZ(3,2) is the array of XYZ to specify the arrow. XYZ(*,1) is the tail while XYZ(*,2) is the head. For 2-d plots the z value is ignored. 2. DXYZ(4) specifies the offsets and size. A. DXYZ(1) - The offset for the tail of arrow B. DXYZ(2) - The offset for the head of the arrow C. DXYZ(3) - Size of arrow if zero the default is used. D. DXYZ(4) - Flare of arrow if zero the default is used. 3. IMODE(2) - Specifies the frame. DATA=0, TEXT=1 IMODE(1) is for tail of arrow. 4. ITYPE - Specifies the Texture,color,intensity For more information see TOPDRAWER COMMAND ARROW. This is similar to giving the command. TD:ARROW FROM XYZ(1,1),XYZ(2,1),XYZ(3,1) LESS DXYZ(1) TO XYZ(1,2),XYZ(2,2),XYZ(3,2) LESS DXYZ(2) SIZE=DXYZ(3),DXYZ(4) Outputs extended titles with case formatting. This routine is not recommended. It is provided for compatability with older versions of TOPDRAWER. Use TDTEXT instead. CALL TDCASE('title','case'[,x,y]) CALL TDCASE('title','case','position') CALL TDCASE('title') See TDTITL for more information 18.16 TDCRCL This draws either a BOX, DIAMOND, or ELLIPSE. CALL TDCRCL(XY,DXY,ITYPE,[IDATA,[MODE[,ANGLES]]]); 1. XY(3) is the array of XYZ to specify the center of the figure. 2. DXY(3) is the array of XYZ to specify the width of the figure. 3. ITYPE 1 2 3 BOX DIAMOND ELLIPSE 4. IDATA 0 - XYZ specified in text coordinates 1 - Center in Data, width in text coordinates. 3 - Both Center and width are in data coordinates. 5. MODE - Specifies Texture, intensity, color. See:Subroutine TDHIST. 6. ANGLES(2) - Range of angles for circle example REAL XY(3),DXY(3) DATA XY/1.,1.,1./,DXY/.5,.5,.5/ CALL TDCRCL(XY,DXY,3,3) Draws an ellipse centered at 1,1,1 of size 0.5 in the data frame. 18.17 TDEND This subroutine ends the graphics and closes any output files. This should not be used to end an individual plot of a series. It only needs to be called once before exiting from your program. 18.18 TDFLSH Normally the graphics buffer is flushed after the subroutine call unless FLUSH is set OFF. TDFLSH will allow you to flush the buffers only when desired. This is much faster than flushing automatically. 18.19 TDGETV LOGICAL L L=TDGETV('string',VALUE) INPUT: string = The name of the lexical to get OUTPUT: VALUE = The actual value returned L = .true. if the lexical was found, .false. if not found. example LOGICAL TDGETV IF (TDGETV('V_SUM',SUM)) WRITE(6,*)'Sum=',SUM 18.20 TDHIST Does histograms CALL TDHIST(Npts,X,Y[,DX[,DY[,LEVEL[,MODE[,Z[,DZ]]]]]]) 1. Npts - Then number of points to plot 2. X(Npts) - The X for each datum to histogram 3. Y(Npts) - The Y for each datum 4. DX(Npts) - The Error in X 5. DY(Npts) - The Error in Y 6. LEVEL = 0 Histogram = 1 BARCHART 7. MODE - Selects the line structure,color,intensiy If zero these are set by the SET command. Intensity*8 (Intensity=1 to 5) 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64 64, 128, 192, 256, 320, 384, 448 DOTS, DASHES, DOTDASH, SOLID, FUNNY, PATTERNED, DAASHES WHITE RED GREEN BLUE YELLOW MAGENTA CYAN 1*512 2*512 3*512 4*512 5*512 6*512 7*512 8. Z(Npts) - The Z for each datum 9. DZ(Npts) - The Error in Z 18.20.1 Example REAL X(5),Y(5),DX(5),DY(5) READ (1,'(4F10.0)') (X(I),Y(I),DX(I),DY(I),I=1,5) CALL TDHIST(5,X,Y,DX,DY,0,64+4*512) Reads 5 lines containing X,Y,DX,DY on each and histograms the result with BLUE dotted lines. 18.21 TDJOIN Joins points CALL TDJOIN(Npts,X,Y[,DX[,DY[,LEVEL[,MODE[,Z[,DZ]]]]]]) 1. Npts - Then number of points to plot 2. X(Npts) - The X for each datum to histogram 3. Y(Npts) - The Y for each datum 4. DX(Npts) - The Error in X 5. DY(Npts) - The Error in Y 6. LEVEL - The number of segments per/point 7. MODE - Texture,color,intensity, and Fit parameters are added together. If zero the default is taken or the SET value is used. Type of fit 0 1 2 Default Spline "GENERAL" The default is initially "GENERAL" Texture params Intensity*8 (Intensity=1 to 5) 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64 64, 128, 192, 256, 320, 384, 448 DOTS, DASHES, DOTDASH, SOLID, FUNNY, PATTERNED, DAASHES WHITE RED GREEN BLUE YELLOW MAGENTA CYAN 1*512 2*512 3*512 4*512 5*512 6*512 7*512 8. Z(Npts) - The Z for each datum 9. DZ(Npts) - The Error in Z 18.21.1 Example REAL X(5),Y(5),DX(5),DY(5) READ (1,'(4F10.0)') (X(I),Y(I),DX(I),DY(I),I=1,5) CALL TDJOIN(5,X,Y,DX,DY,1,64+4*512) Reads 5 lines containing X,Y,DX,DY on each and joins the result with BLUE dotted lines. A single line segment joins each point. CALL TDJOIN(5,X,Y) Joins the 5 points with the default line type (SOLID,WHITE). The data will be joined by multiple line segments to form a smooth curve. 18.22 TDLIMS Sets limit for data set. CALL TDLIMS(OPTIONS,Npts,values[,errors]) 1. OPTIONS: 'XMIN', 'XMAX', 'X', 'YMIN', 'YMAX', 'Y', 'ZMIN', 'ZMAX', 'Z' This specifies what limits are to be set. For example if 'X' is specified, both XMIN and XMAX are set. 2. Npts - The number of data points. 3. Values(NPTS) - The array of data to use in setting the limits. 4. Errors(NPTS) - The corresponding error array 18.22.1 Example REAL X(2),DX(2) DATA DX/0.1,1.0/ DATA X/0.,10./ CALL TDLIMS('X',2,X) This will set the plot to range from 0 to 10 along the X axis. CALL TDLIMS('XMIN',1,0.0) CALL TDLIMS('XMAX',1,10.0) This will set the plot to range from 0 to 10 along the X axis CALL TDLIMS('X',2,X,DX) Sets the plot to range from -0.1 to 11.0 18.23 TDNEW This starts a new plot and optionally gives the frame an ALIAS. CALL TDNEWP('Alias') If ALIAS is blank (' ') then there is no alias. ALIAS may either be a string or a character variable. 18.24 TDNEWP This starts a new plot. This differs from the original TOPDRAWER in that you may not specify an ALIAS. CALL TDNEWP 18.25 TDPLOT Plots points. CALL TDPLOT(Npts,X,Y[,DX[,DY[,'symbol'[,MODE]]]]) This plots the X,Y data using the specified symbol. 1. Npts - Then number of points to plot 2. X(Npts) - The X for each datum to histogram 3. Y(Npts) - The Y for each datum 4. DX(Npts) - The Error in X 5. DY(Npts) - The Error in Y 6. symbol - The symbol to use in plotting 7. MODE - Determines color,intensity - See TDHIST 18.25.1 Example CALL TDPLOT(1,100.,200.,0.,0.,2H0O) or... CALL TDPLOT(1,100.,200.,0.,0.,'0O') Puts a cross at 100.,200. in the data frame. 18.26 TDPLT Plots points. CALL TDPLT(SYMBOL,Npts,X,Y[,DX[,DY[,MODE[,Z[,DZ]]]]]]) This plots the X,Y data using the specified symbol. 1. symbol - The symbol to use in plotting. It may be either a literal or character string. 2. Npts - Then number of points to plot 3. X(Npts) - The X for each datum to histogram 4. Y(Npts) - The Y for each datum 5. DX(Npts) - The Error in X 6. DY(Npts) - The Error in Y 7. MODE - Determines color,intensity - See TDHIST 8. Z(Npts) - The Z for each datum 9. DZ(Npts) - The Error in Z 18.26.1 Example CALL TDPLT('0O',1,100.,200.,0.,0.) or... CHARACTER*2 SYMBOL DATA SYMBOL/'0O'/ CALL TDPLT(SYMBOL,1,100.,200.,0.,0.) Puts a cross at 100.,200. in the data frame. 18.27 TDSET Sets parameters. CALL TDSET(OPTIONS) OPTIONS is a literal, hollerith, or array containing the options. see:Subroutine STRING This routine is not recommended. It is provided for compatability with older versions of TOPDRAWER. Use TDTEXT instead. The options are the same as for the SET command. For convenience you probably should use TDSETS which is Fortran 77 compatible. example CALL TDSET('SIZE 10 BY 8') This sets the size of the plot. CALL TDSET('COLOR BLUE') Now everything is plotted in blue. or.... BYTE STRING(11) DATA STRING/'C','O','L','O','R',' ', 1 'B','L','U','E',';'/ CALL TDSET(STRING) 18.28 TDSETS Sets parameters. CALL TDSETS(OPTIONS) OPTIONS is a literal or character string containing the options. The options are the same as for the SET command. This subroutine is Fortran 77 compatible so %REF should not be used. 18.28.1 Example example CALL TDSETS('SIZE 10 BY 8') This sets the size of the plot. This is the same as the command: TD:SET SIZE 10 BY 8 CALL TDSETS('COLOR BLUE') Now everything is plotted in blue. or.... character*10 string data string/'COLOR BLUE'/ CALL TDSETS(string) CALL TDSETS('DEVICE VERSATEC') Sets the current device to be the Versatek printer/plotter. 18.29 TDSHOW Shows parameters. CALL TDSHOW(OPTIONS) OPTIONS is a literal or character string containing the options to type on your terminal. The options are the same as for the SET or SHOW command. This subroutine is Fortran 77 compatible so %REF should not be used. 18.29.1 Example CALL TDSHOW('SIZE') This types on your terminal the size of the plot. or... character*4 string data string/'SIZE'/ CALL TDSHOW(string) 18.30 TDTEXT Outputs titles CALL TDTEXT('options','title','case'[,x[,y[,z]]]) This puts the title at the specified x,y,z 1. options - This is a string specifying the options. These may be any options used by the TITLE command. Some available options are: TOP, BOTTOM, RIGHT, LEFT, DATA, ANGLE=n, X, Y, Z, SIZE=n 2. title - text to put on the screen. 3. case - The case string. If ' ' is used then the text consists of normal ASCII characters 4. x,y,z - Specify the title position in TEXT coordinates. If omitted and no options are specified, the current title is placed under the last. This is a Fortran-77 compatible subroutine. Do not use %REF with the option, title, or case strings. Options, title, and case must be either literals or character variables. 18.30.1 Example CALL TDTEXT('TOP','My graph',' ') Puts a title at the top of the graph. CALL TDTEXT('BOTTOM','X Axes',' ') Puts a title at the bottom of the graph. CALL TDTEXT(' ','More on the bottom',' ') Then puts another line ender the previous one. CALL TDTEXT('DATA','This is at location 5,1.8',' ',5.,1.8) Puts a title left justified at the data locations 5.0,1.8 CALL TDTEXT('DATA,CENTER','This is at location 5,1.8',' ',5.,1.8) Puts a title centered at the data locations 5.0,1.8 18.31 TDTITL Outputs titles This routine is not recommended. It is provided for compatability with older versions of TOPDRAWER. Use TDTEXT instead. CALL TDTITL('title',,x,y) This puts the title at the specified x,y. CALL TDTITL('title','position') This puts the title at the specified position. CALL TDTITL('title') This puts a title under the last title. 1. title - Title 2. x,y - Specify the title position in TEXT coordinates. 3. position - Specifies the position relative to the data area parameters: 'TOP', 'BOTTOM', 'RIGHT', 'LEFT' 4. If 'title' alone is specified, then the current title is placed under the last. 18.31.1 Example CALL TDTITL('My graph','TOP') CALL TDTITL('X Axes','BOTTOM') 18.32 TDTSET This controls the format of titles. This modifies only the next CALL TITLE or CALL CASE. This routine is not recommended. It is provided for compatability with older versions of TOPDRAWER. Use TDTEXT instead. CALL TDTSET(SIZE,[ANGLE,[SPACES,[IDATA]]]) 1. SIZE - The character size in tenths of inches. 2. ANGLE - The Angle to draw the title at. 3. SPACES - The number of spaces the title occupies. 4. IDATA - Non zero if title is specified in DATA coordinates. 18.33 TD3JIN This joins 3-d data. CALL TD3JIN(ARRAY,NX,NY,[[[[[[IXYZ],ITXTUR],NXL],NYL],NXH],NYH]) 1. ARRAY(NX,NY+1) - Contains the 3-d data. * ARRAY(1,1) - N1+N2*4 - N=1,2,3 for X,Y,Z N1=1 if ARRAY(1,1) is X, 2 if Y, 3 if Z. N2=1 if ARRAY(1,1) is X, 2 if Y, 3 if Z. * ARRAY(2:NX,1) - X values at center of bin * ARRAY(1,2:NY) - Y values at center of bin * ARRAY(2:NX,2:NY) - Z values 2. IXYZ controls type of plot. * 0 = draw X,Y,Z * 1 = draw X lines only * 2 = draw Y lines only * 3 = draw Z lines only 3. ITXTUR - (N*64=texture, N=1:7) 4. NXL - Low X chan to plot (0=plot all) 5. NYL - Low Y chan to plot (0=plot all) 6. NXH - High X chan to plot (0=plot all) 7. NYH - High Y chan to plot (0=plot all) For more information see the sample program: TOPDRAWER_ROOT:[EXAMPLES]TD_DEMO3.FOR 18.34 TD3HST This histograms 3-d data. CALL TD3HST(ARRAY,NX,NY[[[[[[[IXYZ],ITXTUR],DXYZ],NXL],NYL],NXH],NYH]) 1. ARRAY(NX,NY+1) - Contains the 3-d data. * ARRAY(1,1) - N1+N2*4 - N=1,2,3 for X,Y,Z N1=1 if ARRAY(1,1) is X, 2 if Y, 3 if Z. N2=1 if ARRAY(1,1) is X, 2 if Y, 3 if Z. * ARRAY(2:NX,1) - X values at center of bin * ARRAY(1,2:NY) - Y values at center of bin * ARRAY(2:nx,2:NY) - Z values * ARRAY(1,NY+1) - Lower Edge of first x bin * ARRAY(2,NY+1) - Upper Edge of last x bin * ARRAY(3,NY+1) - Lower Edge of first y bin * ARRAY(4,NY+1) - Upper Edge of last y bin 2. IXYZ controls type of plot. * 1 = draw X lines * 2 = draw Y lines * 4 = draw Z lines * 8 = NoDEPTH * 16 = NOHIDE * 32 = NOFRAME * 64 = Shade XY face * 128 = Shade YZ face * 256 = Shade ZX face * 512 = Shade with X's * 1024 = Shade with dots. 3. DXYZ(3) - Distance between lines used to shade plot (DX,DY,DZ) 4. ITXTUR - (N*64=texture, N=1:7) 5. NXL - Low X chan to plot (0=plot all) 6. NYL - Low Y chan to plot (0=plot all) 7. NXH - High X chan to plot (0=plot all) 8. NYH - High Y chan to plot (0=plot all) For more information see the sample program: TOPDRAWER_ROOT:[EXAMPLES]TD_DEMO3.FOR 18.35 TDVAX_PLOT CALL TDVAX_PLOT This will set up your terminal as the default device, provided the symbol PLOT_TERM is correctly set. Normally it is set when you log in so you usually do not need to worry about it. If this routine is not called, you must call TDSET and specify the device to use in plotting. 18.36 T2CURS CALL T2CURS(I,XYZ,XYZ1,XYZ2,LF1,LF2); This subroutine returns both text and data coordinates from the Cursor: 1. I = Character typed ICHAR(character) (If 0 no input) 2. XYZ(2) = Physical device coordinates. 3. XYZ1(2) = Text coordinates. 4. XYZ2(3) = Data coordinates. If the plot is 2-d XYZ2(3)=0 5. LF1 = .true. if text coor. returned 6. LF2 = .true. if data coor. returned 18.37 T2MAIN CALL T2MAIN(IARG,string) This calls the TOPDRAWER main program. INPUT: string This is a command to perform. If it is blank then TOPDRAWER will prompt you until either a RETURN,STOP, or NEW PLOT command is typed. OUTPUT: IARG = 1 if a CLEAR command was typed. = 2 if a STOP command was typed. NOTE This subroutine calls all other TOPDRAWER subroutines. If you call it then all other subroutines will be included in your program. 18.38 T2UPCS CALL T2UPCS(str) Converts a character string to upper case. 18.39 T2SQEZ CALL T2SQEZ(str,ILEN) Squeezes out multiple blanks from str, and returns the location of the last non blank character in ILEN. 18.40 T2_TRAP Traps any control C interrupts. While executing Topdrawer subroutines this returns control back to T2MAIN or the user routine.

CHAPTER 19 LINKING

If you wish to link a program so that it may share HBOOK4 histograms with TOPDRAWER, you need to do the following: 1. Insert the following lines of code into your main program. INTEGER HCREATEG PARAMETER IHSIZE=100000 COMMON /PAWC/MEMORY(IHSIZE) ...... ISTAT=HCREATEG('region_name',MEMORY,IHSIZE) IF (ISTAT .le. 0) STOP 'Can not create region' CALL HLIMIT(IHSIZE) You may adjust the IHSIZE to the proper value. 2. When you link you must also include: TOPDRAWER_DIR:TD_GROUP/OPT To give users in your group only read access to your histograms. ISTAT=HCREATEG('region_name',MEMORY,-IHSIZE) or link using.... TOPDRAWER_DIR:TD/OPT TD_GROUP uses a modified version of HCREATEG rather than the standard CERN version. The modified one in addition to setting up group read/write protection on the section also prevents creation of the same global section by more than 1 person. It creates a new version instead. It will type out the name of the created global section. The modified version will create a read only section if -IHSIZE is passed to it. To create a global section HCREATEG must open a scratch file. The modified version attempts to do this on SYS$SCRATCH:. By reassigning the scratch device you may put this file on a disk with enough quota. $ DEFINE SYS$SCRATCH USR$SCRATCH:[name] For information about using the TD subroutines: SEE:SUBROUTINES

CHAPTER 20 REVISIONS

The original sources were written by: Roger B. Chaffee Computation Research Group Stanford Linear Accelerator Center Stanford, California Modified: J. Clement All syntax has been "regularized" and extended for convenience. 20.1 OBSOLETE_COMMANDS Most commands in the "original" version still work. There are the few known exceptions. 1. DUMP - Removed 2. SET FILE DEBUG - Removed 3. SET FILE ERROR - Removed 4. SET FILE INPUT n - No longer works the same. Instead of a unit number you must specify a file name. 5. SET FILE OUTPUT n - No longer works the same. Instead of a unit number you must specify a file name. 6. TIME - Replaced by SHOW TIME. 7. SET DEVICE 4013 - Removed. 8. Certain undocumented commands were removed. Specifically in the original version the option SET may be omitted entirely, but it must be used in the BONNER LAB version for set commands. 20.2 86 1. SET COLOR - Now accepts full range of UGSYS color specs. 2. SET FILE - Command rewritten. It now accepts a file name and multiple nesting of SET FILE INPUT is possible. 3. Unit numbers modified to allow batch input. 4. SET DEVICE DDNAME=filename - The limitation of 8 chars on filename is removed. 5. SET DEVICE - INTERACTIVE is the default. 6. HELP - New command added. 7. Added prompting for interactive input. 8. PLOT_TERM, PLOT_DEVICE symbols are used to determine default device. 9. TOKEN - Tabs are treated as spaces. 10. SIXELS is now a legal device. 11. SET INPUT is a synonym of SET CARD. 12. SET ERRORS - New command added. 13. Fixed SET DEVICE command so SIDEWAYS works properly. 14. INTENSITY/WIDTH 3 did not work properly, and would cause other options to work improperly. 15. SET DEVICE accepts lowercase chars. in string. 16. SET STRUCTURE can now set FUNNY. 17. HISTOGRAM command now produces a BLOCK plot for 3-d data. 18. FLUSH command flushes the buffers. 19. Fixed UG errors when no plot make. 20. Fixed failure to SET DEVICE in the middle of an interactive session. 21. Added JOURNAL file and SET JOURNAL command. 22. Added SHOW commands as mirror to SET commands. 23. Rewrote T23HST to add fast "LEGO" plots as well as minimal histograms. 24. TITLE X|Y|Z now produces titles next to 3-d axes. The lables and titles are always drawn on the outer side of axes by default. 25. T23HST,T23JIN accept a texture parameter. T23HST may plot hidden lines with the option HIDE. 26. T2FREQ modified for incomplete storage. Now only X,Y are required. 27. Modified TXDOT and TXTSYM to produce points directly from unified graphics. This makes better points for hi resolution displays, and faster points on Tek4010 displays. 28. T23PLT - added to do scatter plots. 29. SLICE - command added to plot slices of mesh data. 30. Fixed T2DEF2 so limits are properly defined at all times. 31. Added SET HIST command. This is conditionalized for the 3 different types of hist routines. You can get RICE format, and HBOOK format hist files to be displayed by TOPDRAWER. 32. SHOW DATA can show you a subset of the data, with calculations of statistics on the data. 33. 3D is now properly selected for each type of hist. 34. DEFINE KEY - Defines keypad keys for ANSII terminals. 35. The previous 20 input lines are stored for recall by ANSII mode terms. This is done using SMG routines so foreign terminals can be defined also. 36. Traceback for input files has been added. 37. Modified TXLINE for optimized point plotting. Essentially drawing points with UGMARK is faster for some protocalls than drawing zero length lines. This is automatically done wherever possible. This is especially true for 4010 graphics. A cluster of Nearby dots can save a factor of 3 in transfer time. 38. Regularized the error messages, and added messages for PEN,WIDTH,CARD LENGTH out of range. 39. Added PERMANENT option to SET SYMBOL,GRID,WIDTH This changed the logic of SET SYMBOL slightly to conform to other commands. 40. The card length was changed to conform to standard screen sizes (80 cols). The Format string is (256A1) to make card size changes easy. 41. Fixed automatic flush so it works properly for interactive use. 42. Fixed NOVECTOR mode so that it works. Make the default VECTOR. Removed '$' as a separator. This is necessary for some filenames! (TXXUG77) 43. 29-Oct-1986 - Added DSIZE,DOTS,... options to CIRCL,ELLIPSE,DIAMOND,BOX commands. (T2MAIN,T2PLOT) 44. 31-Oct-1986 - Added cursor support (T2XFRM,TXXUG77,T2SET1,T2SHOW). 45. 5-Nov-1986 - Fixed the option PLOT SYMBOL so it works, and fixed problem with multiple options after PLOT. 46. Added color,texture,intensity control to SET AXES, OUTLINE, GRID, TITLE. Also color, texture may now be specifed for any command that draws something. PLOT, HIST, BOX, TITLE.... 47. Added support for multiple data sets. option SETS picks data sets. 48. Added MESH data support to SMOOTH command. 49. 14-NOV-1986 - Fixed bug in T2RDPT. Data after a symbol was skipped. 50. Modified string handling to Fortran-77. 51. 26-Nov-1986 - Added IF,ELSE,ENDIF. 52. 1-Dec-1986 - Added options SCALE, TICKS, and PERMANENT to SET SCALE command. Added option PERMANENT to SET COLOR and reset color with each new plot. Fixed a problem with JOIN SPLINE DASH. If the points were closely spaced a solid line is drawn. Added options BLINK, PROPORTIONAL, HARDTEXTURE. 53. 8-Dec-1986 - Added sideways option to SET SIZE. Added options WHITE,... WIDTH=, DOTTED to SET TICKS,LABELS,TITLE. SHOW command now shows the Default values as well as the current ones. 54. 16-Dec-1986 - Added options DOT/DASH/DAASH/RANDOM/SPACE to set pattern. Fixed infinite loop when no pattern specified. 55. 23-Dec-1986 - Added option for automatic pattern generation for drawing commands. ie. JOIN DOT DOT DASH generates the pattern to do this. Added EXPAND option to JOIN,HIST,PLOT. Added VARIABLE, SIZE, NORANDOM options to PLOT. 20.3 87 1. 1-Feb-1987 - Typing Ctrl_C will abort the current plot or print. The SET HISTOGRAM command may select histograms by substring in the title. NEXT|PREVIOUS may be combined with NAME= to select the next hist which matches the name. NEXT|PREVIOUS will wrap around the end of the histogram list unless WRAP OFF is specified or in BATCH mode. 2. 12-Feb-1987 - The journal file will contain coordinates entered by cursor. The AUTOPLOT mode was added. The condition INTERACTIVE may be tested by the IF command. MARGINS may be specified in addition to the SCREEN size in the SET SIZE command. 3. 26-Feb-1987 - Added DEFINE COMMAND and SHOW HIST may now show more information. The option CURRENT has been added to SHOW HIST. 4. 10-Mar-1987 - Added option APPEND to SET HIST. Added options POINTS, and SETS to BIN. Histogramming speed was optimized for cases with a series of identical Y values. SHOW DATA gives errors on statistics, and statistics are generated for each data set separately. Fixed problem with histogramming data withou Z values as 3-d plot. 5. 7-Apr-1987 - Added commands DELETE, FIT. Fixed some problems with separate data sets. 6. 30-Apr-1987 - Added option ADD to SET HIST. If a mesh was read with one axes increasing and the other decreasing, it would not plot properly. This has been fixed. 7. 8-May-1987 - Added contour plotting, and LOG_ERROR routine to trap arithmetic errors. The error handling returns to the T2MAIN program. 8. 19-May-1987 - Virtual memory added to VAX version. 9. 5-Jun-1987 - Fixed hidden line algorithm. It used wrong average X,Y to calculate the vertical. As a result it treated as hidden many lines incorrectly. 10. 11-Jun-1987 - Fixed infinite loop in T2MSFV. Rewrote T2MESH for better hidden line removal. The old algorithm would leave in hidden lines, or omit visible line segments that are bisected by sharp peaks. The new algorith fixes these errors with less than a 5% loss in cpu speed. 11. 17-Jun-1987 - Fixed problems with title overflow for small page sizes. Added LINES parameter to SET TITLE and SHIFT to SET LABELS. Added numbered windows. Negative SCRD will produce constant view of mesh. Dot plots and mesh plots were optimized for max speed. Essentially the user can select windows more easily. 12. 23-Jun-1987 - Fixed problems with 3-d text. The DUPLEX font did not work for 3-d text, it caused array overflows or spurious lines. 3-d text processing was somewhat optimized. The syntax of the SET GRID command has been brought in line with set AXES,LABEL,TITLE commands. 13. 16-Jul-1987 - Fixed SET THREE to conform to documentation. 14. 23-Jul-1987 - Modified T2TLAB so that labels may be generated for data with a large range. Some changes were also made in T2CNTR. Added Table generation for 1/2-d data. Limit generation was modified to keep the limits within reasonable values, when the data has very small relative variation. Title generation was modified to keep long titles on the screen. The character size is reduced by up to a factor of 4 if the title is too long to fit. 15. 30-Jul-1987 - Modified YEAR/MONTH scale so that all days occupy equal space. 16. 30-Aug-1987 A. Lexicals were added as input to allow access to internal numbers. B. The SET STATISTICS command allows the user to set the actual statistical data used by the lexicals. C. SET DIGITS determines the number of digits used for output. DIGITS options in titles allow formatting of numbers in titles. D. PLOT TABLE - plots the data as a table of numbers. E. PLOT AXES/GRID - Has options X,Y,Z... to allow absolute user control over axes/grid generation. F. INHIBIT option has been added to SET LABELS, SET AXES... To allow inhibiting axes generation while still leaveing room for the axes. 17. 16-Sep-1987 - Added mesh data handling to X,Y,Z commands, as well as MINUS and DIVIDE options. MULTIPLY and DIVIDE commands may be used to manipulate histograms or spectra. The X,Y,Z commands were modified to handle DX,DY, and DZ automatically. 18. 14-Oct-1987 - Added Lexicals for external histogram parameters. Modified PLOT command so that the current texture applies to the error bars. DEFINE VALUE and DEFINE STRING commands were added. S_ lexicals were added for access to string lexicals. 19. 31-Oct-1987 - Added LOG option to BIN, SWAP, X, SMOOTH, SET HIST, DEFINE HIST, ADD, MULTIPLY, and DIVIDE commands. Added SET MODE LOG for automatic logging. Added SET WINDOW LEVEL=n to make inset windows easier. Added INSIDE option to SET LABELS to make packed windows easy to create. 20.4 88 1. 15-Jan-1988 - Added expression parsing. This allows you to enter an arithmetic expression wherever a number is called for. The syntax is <expression>. See TOPDRAWER DATA EXPRESSION for more details. Added REPEAT and ENDREPEAT commands. The equals sign "=" may not be replaced by a comma "," or slash "/" where it is used in the documentation. It may be replaced by spaces. Plus, or minus "+-" signs are not allowed in options except as part of a number. 2. 4-Feb-1988 - Added angle lexicals (VIEW_...). Fixed some bugs in MESH plots. Added X="expression" command. Added CREATE MESH command to create mesh data sets. Modified PLOT VARIABLE for mesh data so the symbol size is automatically set to the maximum bin size. 3. Apr-1988 - Fixed LIMITED option for SHOW DATA command, and added LIMITED option to BIN command. Added FOR option to WAIT. Added PACKED option to SET ORDER. The SET ORDER and SET STORAGE commands no longer delete data. The SORT command has been added. 4. Jun-1988 - Fixed the error calculation on MEAN for show statistics. Fixed NEW RESET so that scales are also reset to the original default. 5. Aug-1988 - Added MESH,NORMAL options to BIN command. Added CHECK option to ADD,SUBTRACT,MULTIPLY,DIVIDE commands. Added SPLIT option to PROJECT command. Added ADD,SUBTRACT,MULTIPLY,DIVIDE options to DEFINE HISTOGRAM commnand. Fixed an infinite loop when a single point is histogrammed. 6. Nov-1988 - Added THETA,PHI,ANGLE specifications to SET SYMBOL, and SET GRID. Spiffed up the show formats. Added EXCL driver for native mode support of TALARIS-1590 and LN-03+ printers. 7. Dec-1988 - Fixed several bugs. Set window 3 of -4 did not work as the first window. Only 1 of 4 could be the first window. A call to t2MAIN with blank string after a call with non blank string would not prompt for input. SHOW WINDOW worked incorrectly for - windows. Calls to T2JOIN,T2HIST..., incorrectly reset permanent limits. 8. Dec-1988 - Added NTFIT,NPFIT lexicals, and extended TDPLT, T2JOIN,T2HIST for 3-d data. 9. 28-Dec-1988 - Added options AREA/SHARE/SAVE/READ/WRITE/INPUT/OUTPUT to SET/DEFINE/SHOW HISTOGRAM commands. Created a compatible version with HBOOK4. 20.5 89 1. Jan-1989 - Fixed error calculations for fitting routines. The quoted errors were too large. Added ERROR option to FIT command. Fitted curves are generated with error bars now. ADD FIT to data set now also adds the fitted errors unless ERROR=OFF is specified. Fixed equation evaluation. Exponents were evaluated incorrectly ie. <1.0E-3>-->1000. and <1.0E+3>-->.001 2. Feb-1989 - Added file spec/LIST=/COMMAND=/JOURNAL= options to TOPDRAWER command line. 3. Mar-1989 - Added MERGE command to merge data sets. 4. Apr-1989 - Added mixed data sets. Mesh + regular data may exist as separate data sets. Added error display to JOIN command for mesh data. ADD/SUB/MUL/DIV commands now may add mesh data. Added errors to mesh data. SHOW STAT now shows mean/std... for mesh data. New options: ERROR had been added to command READ MESH,JOIN,CREATE MESH. APPEND has been added to READ MESH,CREATE MESH Modified options: SETS, POINTS|COLUMNS, LINES|ROWS are now independent options. SETS - Specifies the data set only. POINTS - Specifies the point/column number within the set. When the LIMITED option is used, the Z value is used to limit the data. Created NETWINDOW files to use TD over the DECnet. 5. June-1989 - Added TEK4207 support to TEK driver. Speeded up REGIS/TEK drivers. Added VAXSTATION (UGUISD driver) support. 6. Nov-1989 - Added support for NTUPLES to NTOPDAWER. Removed the slash as a separator. It may be put back by the command: SET CHARACTER SEPARATOR "/" 7. Dec-1989 - A number of enhancements have been made to NTOPDRAWER. Added the options TREE to SAVE/RESTORE/SET HISTOGRAM commands and added support for "wild" characters for histogram area specification. Added the MONITOR HISTOGRAM, and DELETE HISTOGRAM. Removed support for RICE histograms from NTOPDRAWER. Added support for a GLOBAL SECTION containing HBOOK4 histograms. NTOPDRAWER is now capable of handling HBOOK4 histograms in a fairly simple fashion. Both NTOPDRAWER and TOPDRAWER have been enhanced as follows. The driver for TEK4010 has been modified to allow you to specify the necessary escape sequences for entering and exiting TEK-4010 mode as well as for reproducing colors. Support for the LSI-7107 color terminal has been added. Support for postscript and am IMAGEN printer has been added. The options SPACE has been added in addition to DOTS,DASH... for line structure. 20.6 90 1. Jan-1990 - Optimized expression evaluation to achieve a 30 fold speedup. Added error handling to smoothing routine. Added support for a postscript printer. 2. Feb-1990 - Added EQUATION option to FIT. For general linear fits. Optimized the auto label generation for logarithmic axes. Removed restrictions on order of DECADES, SUBTICKS in the SET SCALE command. Added device UIS to be able to dump screen of Vaxstation to disk in full resolution. Made VAXstation driver work for color station. Added color mappings for DECGIGI driver. 3. July-1990 - Fixed PROJECT command in TOPDRAWER. It was correct in NTOPDRAWER. It would sometimes give incorrect results for HBOOK histograms. Added options FETCH and READ to TOPDRAWER command RESTORE HIST. (Version 3.5) Note: some versions may have had problems with the fitting lexicals. VCOEFFICIENT... as some modules were compiled with /Gfloat and some were not. The standard is /GFLOAT for all double precision operations if it is supported by the machine that it is compiled on. Fixed lexicals V... inside expressions. Y="VXVALUE**2" yielded incorrect results while Y="XVALUE**2" was correct. This problem dated from Jan-1990 when optimization was introduced. 4. Dec-1990 - Added options WEIGHT, EWEIGHT to ADD,SUBTRACT,MULTIPLY,DIVIDE commands. These allow weighting of data when doing the operation. 20.7 91 1. Jan-1991 - Added documentation to command SET DEVICE on how to create separate plot and command windows for TEK-4010 and REGIS graphics. Added procedures: FREEZE.TOP and FREEZE22.TOP to TOPDRAWER_DIR: 2. 18-Jan-1991 - Fixed bug in module TXLINE that produced spurious lines by incorrect scissoring. 3. Added SET CYCLE, SHOW CYCLE commands and CYCLE option to CONTOUR. 4. 21-Jan-1991 - Fixed bug in PLOT,JOIN,HISTOGRAM commands. SLICES did not work properly when THREE was OFF. Revision level 3.6. Added options OFFSET,DATA,ABSOLUTE,VALUE,CURSOR to PLOT TABLE to move the table to more convenient locations. Add option VECTOR to PLOT command, to plot a vector field, where DX,DY,DZ is the length of the vector. 5. 29-Jan-1991 - Fixed security hole to conceal passwords when using files over DECnet. Fixed some minor bugs in ADD/SUBTRACT/MULTIPLY commands. Add option VECTOR to ADD/SUBTRACT/MULTIPLY commands to do operations on VECTOR fields. 6. 8-Feb-1991 - Added SET MODE CHECK,CONFIRM,TREE. These select whether checking, confirmation, or HBOOK tree searching are defaulted to ON. Added options POINTS,ROWS,LIMITED to ADD/SUB/MULT/DIV commands This allows compete selection of a subset of data to operate on. Added option CHECK to FFT command to allow turning off data checking. 7. 11-Feb-1991 - Fixed problem with short ticks being produced in SET SCALE when option LABEL=n preceded TICKS=m. Version 3.7 8. 28-Feb-1991 - Added options FILL,HIDE to most commands that draw something. This means you may fill and hide BOXES,CIRCLES, DIAMONDS, HISTOGRAMS, ARROWS. In addition the SET/SHOW FILL commands allow you to manipulate the fill patterns. Added the command SET/SHOW SHIELD to shield a section of a plot from further plotting. Added A GKS (DEC) for those devices not availble through UGS. Fixed a minor bug that switched line texture unexpectedly in UIS driver. 9. 4-Mar-1991 - Added SET/SHOW UNITS to allow you to reset both TEXT and character units. Fixed some problems with 3d histograms. Conditionalized the code means that the defaults are all in CM instead of INCHES. You may use these conditionals to build a completely metric verstion of TD. 10. 15-Mar-1991 - Version 4.0 Added options SELECT="name", NAME="name" to add names to data sets. SELECT selects data sets by name, while NAME sets the data set name. HBOOK histogram names are automatically propagated to the data set. Option TITLE added to JOIN, PLOT, HIST, CONTOUR to add title when data set is plotted. 11. 25-Mar-1991 - Added NONLINEAR option to FIT to use MINUIT to perform fits on nonlinear functions. Fixed problem in arbitrary linear fit functions. Version 4.0. 12. 2-May-1991 - Updated HBSEARCHID and T2SETH4 to be HBOOK V4.10 compatible. Added more units to SET UNITS. 13. 14-Jun-1991 - Add options WIDTH, HEIGHT to SET DEVICE. Made the default the new version of TOPDRAWER. Fixed some bugs with SET UNITS. 14. 28-Jun-1991 - Modified the X,Y,Z commands so that DX,DY or DZ are automatically recomputed when an expression is used. 15. 22-Jul-1991 - Fixed a bug in STORE HIST command. The wrong default RECL was used. Removed calls to obsolete HFNEXT routine. 16. 23-Aug-1991 - Added option MESH to FIT command for MESH fits. Added option APPEND to LIST command to append listing on old file. Fixed error handling for MINUIT fits. Now the errors are the same for linear and NONLINEAR fits. Added functiond DGAUSS and DPOLY to list of functions, as fits of Z vs X,Y. Fixed a bug in T2MESH that messed up histograms of mesh data with errors. GMINUT has been added to NTOPDRAWER. 17. Sept-1991 - Added option SAVE to CONTOUR to save the contour lines in data sets. Fixed an 2 outrageous bugs in T2SMOOTH and SMCTRL. One bug incorrectly treated the end points of a curve. The other would delete isolated data points that were adjacent to a flat region in the data. Added INTERPOLATE command to produce interpolated data sets using local fitting procedures. This uses the same procedures as the JOIN command. Added MONITOR option to BIN, FIT, FFT, CONVOLUTE, SMOOTH commands to plot before/after pictures. Added SET MODE MONITOR/APPEND to enable automatic MONITOR, APPEND. Fixed equations inside FIT command. Arbitrary equations would sometimes give incorrect results. It has been fixed. Version 4.31 18. Nov-1991 - Fixed fatal error in FIT that prevented producing a curve from set coefficients. Fixed some bugs in all commands that use the option CHECK. 19. Version 4.4 Added ORIENTATION=n to SET SIZE/DEVICE commands. 20. Apr-1992 Added option PORTRAIT/LANDSCAPE to set device. Also added device EPS. 21. July-1992 A. Fixed the BIN command to work properly with data when DY=0. B. Added options BREAK/SUPPRESS to SET BAR to suppress error bars around the symbol for a PLOT command. C. Added some fixes to SET DEVICE for DECGKS-3D to send the Xwindow output to the correct device. Added some FNAL fixes, and added output options to initial command line. $ TOPDRAWER [filename [device1 [device2 ...]]] D. Added new coordinates NDX,NDY,NDZ to PLOT/BAR/HIST assymetric error bars. These are NOT used in some computations involving errors. E. Fixed an error in TOKEN that prevented access to the data point lexicals when the data set number (3'rd index) was specified. F. Fixed an error that produced spaces when more than 195 points are joined. G. Reversed the default for ERROR option on the SWAP,SMOOTH command. Now the ERROR option should be default be on for all commands. By setting the REVISION to lower than 5.0 this should revert to the old behavior. H. Added the minus (-) sign as a continuation character at the end of a line. I. Added options SET AXES FRONT,BOTH,THREE To allow default plotting of 3-d axes in a "sensible" fashion. J. Added options SET GRID OUTLINE,Z To improve the 3-d grid capability. Version 5.0 22. Aug-1992 V5.1 - Fixed some bugs in the PLOT command. NOSYMBOL did not work POINTS FROM n TO m would not select the correct range of points.

CHAPTER 21 INSTALLATION

To install topdrawer on your system, copy the files in TOPDRAWERROOT:[*...] to a directory of your choice. Execute the SETUP.COM procedure to create the necessary local TOPDRAWER symbols and logics. On the FNAL cluster, the files are placed in LIB:[LIB.TOPDRAWER.version], and SETUP TOPDRAWER causes the SETUP.COM procedure to be run. The TOPDRAWER.HLP help library module has been placed in the LIB alternate help library. You may wish to rename and delete some of the executables, if your system lacks Xwindows or GKS. 1. TOPDRAWERMIN has neither Xwindows nor GKS support. 2. TOPDRAWER has Xwindows but not GKS. 3. TOPDRAWERGKS has both.

CHAPTER 22 AUTHOR

This version is heavily modified from the original written by: Roger B. Chaffee Computation Research Group Stanford Linear Accelerator Center Stanford, California U.S.A. The original docuementation is: CGTM 178 - November 1980 This version was written by: John Clement Bonner Nuclear Lab Rice University P.O. Box 1892 Houston, Tx, 77251 (713) 527-8101 x 2037 Internet: CLEMENT@PHYSICS.RICE.EDU Bitnet: CLEMENT@RICEVM1 Hepnet: FNBIT::RIPHYS::CLEMENT or... RIPHYS::CLEMENT

Index

3-D plots 26, 40, 51, 82, 83, 85, 92, 94, 105, 108, 109, 110, 113, 151, 156, 169, 174, 175, 178, 191, 194, 195, 203, 205, 206, 208, 233 Abbreviations 29 ABORT 158 ALL 175 ANGLE 145, 176 Angles 17 Answerback 8 APPEND 39, 95 Arpanet 139 Astronomical symbols 23 AUTOPLOT 158 AVERAGE 39 Axes 103, 153, 162, 166, 182 AXIS 178 BASE 167 Binomial statistics 64 Block plot 83 Box 43 Case blind 142 CENTER 178, 179 Character case 142 CLEAR 68, 126 COEFFICIENTS 75 COLOR 32, 38, 39, 43, 46, 62, 66, 81, 90, 102, 122, 126, 145, 153, 164, 166, 170, 182, 184, 227, 228 Command 1, 30 ADD 35 ARROW 38 BARGRAPH 38 BIN 39 BOX 43 CASE 207 CIRCLE 45, 66 CLEAR 68 Continuation 29 CONTOUR 45 CONVOLUTE 48 DEFINE COMMAND 53 KEY 59 DIAMOND 62 DIVIDE 64 DPHI 209 DRADIUS 209 DTHETA 209 DU 209 DV 209 DW 209 DX 209 DY 209 DZ 209 ELLIPSE 66 END 100, 102, 140, 203 EXIT 100, 102, 140, 203 FFT 69 FILL 70 FIT 71 FLUSH 81 format of commands 29 HALT 100, 102, 140, 203 HELP 87 HISTOGRAM 81 JOIN 89 MERGE 95 MORE 98 MULTIPLY 99 NDPHI 209 NDRADIUS 209 NDTHETA 209 NDU 209 NDV 209 NDW 209 NDX 209 NDY 209 NDZ 209 NEW FRAME 100 NEW PLOT 100 PHI 209 PLOT 102 PROJECT 110 QUIT 100, 102, 140, 203 RADIUS 209 READ MESH 113 POINTS 112 SET 120 AREA 187 ARROW 122 AXES 122 AXIS 122 BAR 123 BLINK 125 BOX 124 CARD 125 CHARACTER 125 CIRCLE 126 CLEAR 126 COLOR 126 COMMAND 126 Ctrl_Z 126 DATE 127 DEVICE 128 DIAMOND 141 DIGITS 141 ELLIPSE 141 EXACT 34, 142 FILE 142 FONT 144 FORMAT 145 GRID 145 HISTOGRAM 13, 147 INPUT 125 INTENSITY 153 LABELS 153 LIMITS 155 MODE 157 MONITOR 160 ORDER 161 OUTLINE 162 PATTERN 163 PEN 164 POLAR 164 PROMPT 165 REVISION 166 SCALE 166 SECONDARY 166 SEGMENTS 166 SHADOW 170 SIZE 172 SPHERICAL 173 STATISTICS 174 STORAGE 175 STRUCTURE 177 SYMBOL 176 TEXTURE 177 THREE 178 TICKS 182 TITLES 183 UNITS 186 WIDTH 187 WINDOW 187 SHOW 192 CURSOR 193 DATA 141, 194 FLAGS 196 HISTOGRAMS 196 TIME 200 SMOOTH 201 SORT 202 SPAWN 202 STOP 100, 102, 140, 203 SUBTRACT 35 SWAP 203 SYMBOL 204 THETA 209 TITLE 204 TRANSFORM 208 U 209 V 209 W 209 X 209 Y 209 Z 209 Command<SET<ERRORS 142 Comments 29 Contour plots 45 Coordinates 19 Copying data 95 Cosine fit 74 Ctrl_C 52, 53, 100, 194, 196, 203 Ctrl_Z 126, 192, 203 CURSOR 10, 38, 41, 43, 51, 63, 67, 76, 93, 107, 155, 156, 166, 187, 193, 204 CYCLE 46 Cyrillic characters 21 DAASHES 32, 39, 43, 46, 62, 66, 82, 90, 102, 177, 227, 228 DASHES 32, 39, 43, 46, 62, 66, 82, 90, 102, 177, 227, 228 data format 14 Data frame 19 Dates 17, 127 Days 17, 127, 167 DEBUG 158 DECnet 139 DECwindows 139 Degrees 17 Demonstartion programs 223 Devices 8, 128 ADM-3A Retrographics 8, 135 C.ITOH 328 8, 135 C.ITOH 467 135 CGM 131 CIT-467 8 DECwindows 139 Digital GIGI 134 EPS 131 EXCL 9, 129 Falco infinity series 8 GKS 130 GPOSTSCRIPT 131 HP7550 131 HP7580 131 HP7585 131 HPGL 132 IMAGEN 9 Kermit 8, 135 LA-100 9 LA-50 9 LCP01 131 LJ250 131 LJ250_180DPI 131 LN-03 9 LSI 7107 8, 135 LVP16A 131 LVP16B 131 METAFILE 131 POSTSCRIPT 9, 133 Printronix 9, 133 QMS-1200 9, 133 REGIS 9, 134 Selanar HiREZ 100XL 8, 135 Sixels 9 Talaris 1590 8, 9, 129, 135 TEEMTALK 8 Tek-4027 8 TEK4107 131 TEK4128 131 TEK4129 131 Tek4207 8, 131 Tekemulation 8 Tektronix 4010 8, 135 Tektronix 4207 135 Versatec 9, 139 VersaTerm 8 Visual 102 8, 135 VSXXX 131 VT-100 Retrographics 8, 135 VT-240 9, 134, 135 VT125 131 VT125BW 131 VT240 131 VT240BW 131 VT330 131 VT340 131 Xwindow XWINDOWS 9, 139 Diamond 62 Digits 141, 205 DIRECTION 178, 179 DISTANCE 178, 180 DOTDASH 32, 39, 43, 46, 62, 66, 82, 90, 102, 177, 227, 228 DOTS 32, 39, 43, 46, 62, 66, 82, 90, 102, 177, 227, 228 DOUBLE 47 Drawing characters 23 ECHO 158 Efficiency curves 35, 64 Ellipse 66 ERASE 158 Error bars 16, 81, 102, 123, 161 error matrix 72, 76, 78, 193 ERRORS 36, 40, 65, 75, 90, 99, 103, 107, 196, 211 Example 182 EXPAND 46 Exponential fit 74 Fast Fourier Transformation 69 File BENCH.TOP 221 Case of filename 159 COLORGRAPH.TOP 221 Data output 92, 93 FIT_TEST.TOP 221 FONT_TABLE.TOP 221 Histogram 147, 149 Input 6, 10, 143 Journal 11 Listing 11, 223 Logfile 223 Output 11 Plot output 128, 139 TD.OPT 236 TD3D.TOP 182, 221 TDINTRO.TOP 143, 221 TD_DEMO3.FOR 233, 234 TD_GROUP.OPT 236 Fourier series 73, 74 Frequency distribution 39 FUNNY 32, 39, 43, 46, 62, 66, 82, 90, 102, 177, 227, 228 Gaussian fit 74, 75 Global section 55, 59, 96, 98, 117, 118, 147, 151, 197, 236 Greek characters 21 Grids 103 HARDTEXTURE 159 Hardware characters 134, 160, 185, 207 HBOOK 13, 28, 147 Hewlett Packard Plotters 132 HISTOGRAM 4 Histograms 147 Hours 17, 167 input 16, 125, 142, 145 INSIDE 47 INTENSITY 32, 38, 39, 43, 46, 62, 66, 81, 90, 102, 122, 145, 153, 166, 170, 182, 183, 187, 227, 228 Internet 139 Inverse power series fit 73 JOIN 4 journaling 10, 11, 13, 143, 156, 159, 188, 193, 223 Key-pad 59 LABEL 45, 47 Labels 105, 123, 153, 167 Legendre polynomial fit 74 Lego plot 83 Lexicals 141, 174, 206, 217 LIMITED 41, 51, 76, 93, 95, 102, 107 Line texture 177 Line width 153, 187 LINEAR 167 Linking routine 223 Linking with global section 236 Listing 142, 159 LOG 95 LOGARITHMIC 46, 167 Logging 159 Logical PLOT_DEVICE 8 PLOT_TERM 8, 234 LONG 105 MAGNIFY 172, 181 MARGINS 173 Markers 23 Mathematical characters 21 Merging several data sets. 95 MESH 37, 64, 99 Mesh data 26, 34, 45, 51, 82, 84, 85, 88, 106, 109, 112 Minutes 17, 167 MONITOR 39, 40, 42, 71, 72, 79, 95, 157, 159, 201 Months 17, 127, 167 NDU 101 NDV 101 NDW 101 NDX 17, 101, 119, 147, 161, 175, 202, 210, 217 NDY 17, 40, 101, 119, 147, 161, 175, 202, 210, 217 NDZ 17, 101, 119, 147, 161, 175, 202, 210, 217 Network connections 139 Nonlinear fits 74, 75, 77 NTUPLES 52, 54, 56, 94, 147, 150, 197 Option FILL 33, 43, 63, 66, 82, 90, 144 HIDE 33, 83, 90 ORIGIN 178, 181 output 11, 128, 142 OUTSIDE 47 PARALLEL 47 PATTERNED 32, 39, 43, 46, 62, 66, 82, 90, 102, 177, 227, 228 Pen number 126, 164 PERMANENT 122, 123, 124, 126, 141, 145, 153, 155, 161, 162, 170, 176, 177, 179, 183, 184, 187 PERPENDICULAR 48 PHI 145, 156, 161, 174, 176, 178, 179, 180, 200, 210 PLOT 4 Plotting symbols 23 POINTS 95 Polynomial fit 73, 75 POWER 167 PRIMARY 45, 48 Projections 110 PROPORTIONAL Spacing 159 RADIUS 161, 165, 174, 175, 200, 210 RDIST 180 REDUCE 172, 181, 187 Revisions 166, 182, 237 ROOT 167 ROTATED 140, 173 RZ file 197 SCALE 155 Scatter plot 26, 88, 103, 108, 110, 238 SCRD 178, 180 SECONDARY 45, 48, 166 Seconds 17, 167 Segmentation 166 SEPARATION 178, 181 Separators Set up 13 SETS 95 SHORT 105 SIDEWAYS 140, 173 Significant digits 141, 205 Sine fit 73 Slice 31, 34, 81, 84, 90, 92, 102, 111 SOLID 32, 39, 43, 46, 62, 66, 82, 90, 102, 177, 227, 228 SPACE 32, 39, 43, 46, 62, 66, 82, 90, 102, 177, 227, 228 SPLINE 90 Stereo plots 181 Subroutine 222 TDCASE 226 TDHIST 227 TDJOIN 228 TDLIMS 229 TDNEWP 229 TDPLOT 229 TDPLT 230 TDSET 230 TDSETS 231 TDSHOW 231 TDTEXT 231 TDTITL 232 TDTSET 232 TDVAX_PLOT 234 Subroutines 223 Substitution 53, 126, 184, 185, 186 Symbol 16, 17, 102, 145, 161, 170, 175, 176 TCP/IP 139 TEXT 172 Text frame 19 Texture 32, 38, 39, 43, 46, 62, 66, 81, 90, 102, 122, 145, 162, 166, 170, 177, 183 Theoretic special symbols 22 THETA 145, 156, 161, 165, 174, 175, 176, 178, 179, 180, 200, 210 Ticks 105, 123, 167, 169, 182 Time 17 Time scale 169 TITLE 159 TOPDRAWER_INIT 13 TRACE 160 UNITS 172, 186 User function fit 75 USER SCALE 169 VECTOR 160 Vector plot 110 VERTICAL 178, 181 Virtual memory 175 VLOG 41, 51, 76, 93, 107, 160 Windows 187 X 17 Xwindows 139 Y 17 Years 17, 127, 167 Z 17