Saves information from the last plot on a particular device.
||The devices for which information is required, if the scalar is undefined or contains a missing value, this returns the current device number|
||Window about which the information is required; default
||Lower bound for the x-axis in last graph in the specified device and window|
||Upper bound for the x-axis in last graph in the specified device and window|
||Lower bound for the y-axis in last graph in the specified device and window|
||Upper bound for the y-axis in last graph in the specified device and window|
||Lower bound for the z-axis in last graph in the specified device and window|
||Upper bound for the z-axis in last graph in the specified device and window|
||Returns the value 1 or 0 to indicate whether a file is required for this device|
||Description of the device|
||Returns the value 1 or 0 to indicate whether graphical input is possible from this device|
||Returns the current
DKEEP provides information that can be used in general programs and procedures to control the graphical output. For the specified device you can determine whether it generates screen output or uses a file, whether graphical input is possible, a description of the device, the current
ENDACTION setting, and details of the axis bounds.
The device for which the information is required is specified by the
DEVICE parameter. If you specify a scalar containing a missing value, this will be set to the number of the current graphics device. You can then test whether an output file is needed and open one accordingly.
When writing a procedure you can find out if axes bounds have been set explicitly, using the
SAVE parameter of
ZAXIS. This information may then be used when setting up the axes for other graphs. However, if the bounds were not set, but have been evaluated from the data (or if the axes have subsequently been redefined) the information in the save structure will not be of any use. The actual values used when plotting are recorded internally, for each window of each device, and can be accessed using the
ZUPPER, parameters of
Commands for: Graphics.
" Example 1:6.9.10a & 1:6.9.1010b " DEVICE 4 READ Y,X,Y2 74.38 7.523 78.86 57.84 3.920 50.25 86.06 4.326 68.41 81.19 4.858 43.86 57.31 5.310 64.91 51.63 2.038 76.35 65.11 1.626 38.00 63.25 3.496 49.94 57.74 7.135 59.51 60.22 8.137 40.61 55.90 6.396 56.91 46.46 6.027 68.24 88.49 2.738 82.65 89.95 3.291 59.94 78.44 5.540 75.96 84.79 5.636 71.20 71.82 0.940 72.14 55.09 8.877 44.05 86.97 1.587 77.01 49.58 7.941 68.70 : SCALAR Device DKEEP DEVICE=Device; FILE=File; DESCRIPTION=Name PRINT Name,Device,File IF File OPEN 'Graph.jpg'; CHANNEL=Device; FILETYPE=graphics ENDIF DGRAPH [WINDOW=5;KEYWINDOW=7] Y; X " Now set up window 6 to have the same bounds as window 5, so that Y2 is plotted on the same scale as Y." DKEEP Device; WINDOW=5; YLOWER=Ymin; YUPPER=Ymax; XLOWER=Xmin;\ XUPPER=Xmax PRINT Ymin,Ymax,Xmin,Xmax XAXIS 6; LOWER=Xmin; UPPER=Xmax YAXIS 6; LOWER=Ymin; UPPER=Ymax DGRAPH [WINDOW=6; KEYWINDOW=8; SCREEN=keep] Y2; X CLOSE Device; FILETYPE=graphics; DELETE=yes