- /at=(nrow, ncol, row[, col])
- A very efficient way to specify the viewport
of a SCAN. The meaning of the AT qualifier is:
If the graphical window were divided into a grid of
nrow rows and ncol column, put the
scan into the position (row, col).
If row is omitted, col may run from 1 to
ncol
nrow.
Here are two examples to illustrate the function of the /AT qualifier.
Both commands are equivalent
SPECTRA>
set bpu1/v2
SPECTRA>
set bpu1/at=(2,2,1,1)
This example is not very impressive because no keystrokes are saved.
But if you have to display several scans, you can place them on the
screen with such a loop (output in section 15.3.69):
!
! This command file displays the usage of the /at= qualifier
! e.g.:
!
! SPECTRA> run at_example.gra 3 4
!
var ncol nrow
if !gra_status()
end
endif
del *.*
for( i=1; i < (ncol*nrow + 1); i = i + 1)
create/notext "test_"i 0 10 100
set "test_"i/at=(ncol,nrow,i)
endfor
display
post/eps/col/nocon at_example.ps
- /col
our=int_expr
- The colour of the output primitive. The table 15.3.69 contains
the colour codes. An example of how the colour
opaque is used can be found in 15.3.69 (code) and
15.3.69 (output).
- /com_n=text_expr
- The comment lines:
varies from 1 to 10. The first comment
line can also be accessed by /com. During change only the first
comment line is visible, the others can be inspected by show id.
- /date1=text_expr
- Sets date1, it is displayed during change mode.
- /date2=text_expr
- Sets date2, it is displayed by show id.
- /doty=1
- The x-values are considered as date-of-the-year values. The
big tic marks get date strings. Only three big tics are
displayed.
- /li
ne_at_0=int_expr
- If this flag is set, SPECTRA draws a line at y=y_shift.
- /n_b
in=int_expr
- Average groups of n_bin points.
In contrast to the combin command, this attribute has only
an effect on the display. It does not change the data.
- /par
- So far used only for the line-marker primitive. While /type selects the
line type, /par determines the marker type.
- /pa
irs
-
- /nopa
irs
- A flag that determines, if a SCAN is interpreted as
a series of start and end points. Used for error bars.
- /pri
mitive=int_expr
0 - Line
1 - Marker
2 - Histogram
3 - Filled histogram
4 - Filled line
5 - Line and marker
In case '5' is selected, SPECTRA draws markers on a line. The line type is
determined by /type the marker type by bf /par.
A figure that demonstrates some primitive types can
be found in section 15.3.69.
Here is the code that created it.
delete *.*
crea/notex tn 0 10 60
calc tn = tan(tn) + 40
deact tn
cop tn tn1
set tn1/prim=0/v11/col=1
create/text/string="Line (0), Type 1"/x=0.05/y=0.8 tn1
cop tn tn2
set tn2/prim=0/v12/type=4/col=1
create/text/string="Line (0), Type 4"/x=0.05/y=0.8 tn2
cop tn tn3
set tn3/prim=1/v13/col=2/type=1
create/text/string="Marker (1), Type 1"/x=0.05/y=0.8 tn3
cop tn tn4
set tn4/prim=1/v14/col=2/type=4
create/text/string="Marker (1), Type 4"/x=0.05/y=0.8 tn4
cop tn tn5
set tn5/prim=2/v15/col=3/type=1
create/text/string="Hist (2), Type 1"/x=0.05/y=0.8 tn5
cop tn tn6
set tn6/prim=3/v16/col=3/type=1
create/text/string="Hist Area (3), Type 1"/x=0.05/y=0.8 tn6
cop tn tn7
set tn7/prim=4/v17/col=4/type=1
create/text/string="Line Area (4), Type 1"/x=0.05/y=0.8 tn7
!
! par selects the marker type for line-marker
!
cop tn tn8
set tn8/prim=5/v18/col=4/type=1/par=4
create/text/string="Line-marker (5), Type 1, Par 4"/x=0.05/y=0.8 tn8
!
! negative major tic mark factors suppress
! the tic mark numbers
!
set */x_maj=-4/y_maj=-4
display
post/eps/col/nocon
- /scale
factor=float_expr
- The autoscale command sets the y-window limit to
y_max = scalefactor
max(y) and likewise y_min.
Y_min will not be set to negative numbers this way.
- /si
ze=float_expr
- Line width or marker size.
- /ty
pr=int_expr
- Primitive type. See the tables in the sections 15.3.69
and 15.11 for an explanation of the code.
- /x_a
xis=text_expr
-
- /y_a
xis=text_expr
- Sets the axis description string. These strings are copied to
TEXT GQEs when a SCAN is created.
- /x_ma
x=float_expr
-
- /x_mi
n=float_expr
-
- /y_ma
x=float_expr
-
- /y_mi
n=float_expr
- The window limits. They determine how a SCAN is mapped into the
viewport. The autoscale command sets the window limits
to default values.
- /x_max_v
iew=float_expr
-
- /x_min_v
iew=float_expr
-
- /y_max_v
iew=float_expr
-
- /y_min_v
iew=float_expr
- The viewport limits. The viewport is the portion of the
workstation viewport where the window is mapped.
It can also be changed by the locator command.
The size of the viewport is specified in graphical coordinates, from
0 to 1.
- /v0
- Instead of specifying the viewport limits, you
may choose one of the predefined viewports:
/v0 default viewport
/v1 upper left corner
/v2 upper right corner
/v3 lower left corner
/v4 lower right corner
/v5 upper half
/v6 lower half
/v7 left half
/v8 left half
The predefined viewports are displayed in 15.3.69,
.
- /x_f
ormat=text_expr
-
- /y_f
ormat=text_expr
- The output format for the numbers at the major tic marks.
If it is set to AUTO, SPECTRA chooses its own
format.
The format specification has to be done according to the syntax of
the language C (e.g.: Floating point representation with
a mantissa of four digits: "%7.4f", or an exponential representation,
again with a mantissa of four digits: "%7.4e". Integer valued numbers
are printed with : "%d".)
- /x_l
og=int_expr
-
- /y_l
og=int_expr
- The scale type.
0 - Linear
1 - Logarithmic
Logarithmic scales should have maj_tic = 9 and the tic distance
set to the lower window limit.
- /x_maj=int_expr
-
- /y_maj=int_expr
- Every x_majth tic mark is a major tic mark.
If it is less than 0, no
numbers are plotted at the major tic marks.
- /x_maj_o
ff=int_expr
-
- /y_maj_o
ff=int_expr
- The offset for the major tic marks, measured in units of tics.
Example: Suppose there is data that varies from 880 to 2000.
The tic marks should start at 900, the first big tic mark at 1000.
This is accomplished by setting x_tic=100, x_tic_off=20,
x_maj_off=1.
- /x_s
hift=float_expr
-
- /y_s
hift=float_expr
- Shifts the data.
The amount of the
shift has to be supplied in physical coordinates.
- /x_tic=float_expr
-
- /y_tic=float_expr
- The tic distance, measured in units of world coordinates.
- /x_tic_o
ff=float_expr
-
- /y_tic_o
ff=float_expr
- The tic distance offset, measured in units of world coordinates.
- e.g.:
-
- SPECTRA
>
set bpu1/y_log=1/y_maj=9/y_min=0.1/y_tic=0.1