Description
Create a PostScript figure from selected scalar or sampled fields, arranged in
panels by the program's graph and grouping options. Supply valid fields and
choose axis, scale, and page settings appropriate to their units.
Axis formats starting with time: interpret coordinates as Unix epoch seconds
in UTC and use calendar-aligned automatic ticks. Store epoch fields as double
or long to preserve second-level precision.
Synopsis
sggraphps <stdin in.ns=NULL in.subsamp=1 layout=subgroup vector.leglabel="@{index}" xmin=XMIN xmax=XMAX ymin=YMIN ymax=YMAX out=stdout eps=false x=TIME y=VECTOR("data") #data.color="000000" #data.style="" #data.linewidth=1 #data.label=vectname #data.min=par.ymin #data.max=par.ymax legend=none legend.box=true legend.len=20 legend.offx=3 legend.offy=3 legend.space=3 legend.font=Helvetica legend.style=normal legend.size=8 reverse=false xreverse=false yreverse=false left= right= top= bottom=
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
in |
ifile |
stdin
|
input dataset; each group produces a page in the PostScript output |
in.ns |
field |
NULL
|
optional scalar field giving the valid sample count for each vector |
in.subsamp |
int |
1
|
input subsampling interval: 0: automatically reduce each graph to approximately 3000 points 1: use every input point n: use one point for every n input points |
layout |
enum |
subgroup
|
panel layout: subgroup: one panel per subgroup, arranged in rows; all selected fields and columns share the panel column: one panel per column, with subgroups in rows and columns across each row vector: one row per selected field and one column per subgroup |
vector.leglabel |
str |
@{index}
|
legend-label template for vector layout |
xmin |
double |
XMIN
|
minimum x-axis value |
xmax |
double |
XMAX
|
maximum x-axis value |
ymin |
double |
YMIN
|
minimum y-axis value |
ymax |
double |
YMAX
|
maximum y-axis value |
out |
figure |
stdout
|
output PostScript figure |
eps |
bool |
false
|
write Encapsulated PostScript |
x |
field |
TIME
|
optional field or vector supplying x values; defaults to sample coordinates |
y |
fields |
VECTOR("data")
|
fields or vectors to draw on the y axis; defaults to data |
#data.color |
str |
000000
|
line color as an index or hexadecimal RGB string, such as FF0000 |
#data.style |
str |
|
line and marker style: empty string: solid line without markers one marker character, such as o: markers without a connecting line two or four digits, such as 52: dash lengths alternating between drawn and blank segments append a marker to those digits, such as 52o: dashed line with markers Markers: . (dot), * (star), + (plus), x (cross), o (circle), < > ^ v V (triangles), s S (squares), d D (diamonds). |
#data.linewidth |
float |
1
|
line width in points |
#data.label |
str |
vectname
|
legend label |
#data.min |
double |
par.ymin
|
lower y-axis limit for this field in vector layout |
#data.max |
double |
par.ymax
|
upper y-axis limit for this field in vector layout |
legend |
enum |
none
|
legend position |
legend.box |
bool |
true
|
draw a box around the legend |
legend.len |
float |
20
|
length of legend (points) |
legend.offx |
float |
3
|
legend X offset (points) |
legend.offy |
float |
3
|
legend Y offset (points) |
legend.space |
float |
3
|
spacing between legend entries in points |
legend.font |
enum |
Helvetica
|
legend font |
legend.style |
enum |
normal
|
font style |
legend.size |
float |
8
|
font size in points |
reverse |
bool |
false
|
exchange the x- and y-axis positions |
xreverse |
bool |
false
|
reverse the x axis |
yreverse |
bool |
false
|
reverse the y axis |
left |
axis |
Unknown | left axis |
right |
axis |
Unknown | right axis |
top |
axis |
Unknown | top axis for first plot |
bottom |
axis |
Unknown | bottom axis for last plot |
Input and output
Input
input dataset; each group produces a page in the PostScript output
Output
output PostScript figure
Examples
1. Plot epoch-second coordinates with UTC date and time ticks
sggraphps x=epoch y=value bottom.label="UTC" \
bottom.fmt="time:%m-%d %H:%M:%S" bottom.tic=auto5 \
out.width=9 out.edge.left=90 out.edge.right=90 <series.sg >series.psThe input must contain numeric epoch and value fields or matching vectors.
For scalar observations, add value.style=o to display individual points.
Store epoch seconds as double or long. Calendar ticks are aligned in UTC;
auto5 is a density hint rather than an exact count. No origin is required.
2. Show calendar dates on the vertical axis
sggraphps x=value y=epoch left.label="UTC date" \
left.fmt="time:%d-%b" left.tic=auto5 <series.sg >dates.psThe epoch field supplies Unix seconds. Choose a date-only pattern for ranges
spanning days or longer; a shorter range may repeat the same date label.