#!/bin/sh
# 
# Input data (data.cmplx):
#
# x	y	z	v	u	w	i
# -	-	-	-	-	-	-
# 0	1	2	3	4	*	6
# 1	2	3	4	5	**	7
# 2	3	4	5	6	***	8
# 3	4	5	6	7	v	9
# 4	5	6	7	8	vi	10
#
# Draw two plots in the same window (or on same paper, etc).
#
# First plot is y vs x, with lines through the points and
# also labels w at the points. For this, the y-column must
# come twice (once for the line and once for the w's). The project and
# compute statements accomplish this.
project x y newy w < data.cmplx |
	compute 'newy=y' |
	scat \
		-H "First figure" \
		-X "Sample X axis" \
		-Y "Rotated Y" \
		-E \
		-Lw \
		-x 0,5,0.5 \
		-y 0,5,0.5 \
		-w 0,0,0.5,0.5

# Second plot has points (x,y), (u,x), and labels i at (v,x):
project x y u v w <data.cmplx |
	scat \
		-H "Second figure" \
		-X "Sample X axis" \
		-e  \
		-Y "NONrotated" \
		-Lw \
		-x 0,10,1 \
		-y 0,10,1 \
		-w 0,0.5,1,1

# NOTE: The -E option is used in the first example.
# This uses the extplotlib routines, which demand rotation and centering
# of text. Centering has been implemented in the enclosed xplot and hpglplot
# filters (essential for labels to make any sense). Rotation (of Y axis)
# has currently only been implemented in hpglplot, and makes much nicer plots.
