#!/usr/bin/perl -w


# call gnuplot
open (GP, "|gnuplot ") or die "no gnuplot";
use FileHandle;
GP->autoflush(1);

printf GP ("set term post port color 'Helvetica' 12 solid size 8in, 11in\n");

#printf GP ("set out \"t.ps\"\n");

# plot setup 
printf GP ("set yrang [-20:20]\n");
printf GP ("set xrang [20:-20]\n");
printf GP ("set nokey\n");
printf GP ("set termoption noenhanced\n");
printf GP ("unset xtics\n");
printf GP ("unset ytics\n");
printf GP ("unset mouse\n");
printf GP ("set point 4\n");

printf GP ("set x2label \"NORTH\"  font \"Times,30\" tc lt 3 \n");
printf GP ("set xlabel \"SOUTH\" font \"Times,30\" tc lt 3 \n");
printf GP ("set ylabel \"WEST\" font \"Times,30\" tc lt 3 \n");
printf GP ("set y2label \"EAST\" font \"Times,30\" tc lt 3 \n");

# lables
printf GP ("set label 1 \"90\" at 0,0  center\n");
printf GP ("set label 2 \"-270\" at 10,0 center \n");
printf GP ("set label 3 \"-180\" at 0,10 center \n");
printf GP ("set label 4 \"-90\" at -10,0 center \n");
printf GP ("set label 5 \"0\" at 0,-11 center \n");
printf GP ("set label 6 \"0\" at 0,-12.5 center \n");
printf GP ("set label 7 \"+90\" at 14,0 center \n");
printf GP ("set label 8 \"+180\" at 0,14 center \n");
printf GP ("set label 9 \"+270\" at -13,0 center \n");

printf GP ("set label 10 \"(0)\" at 0,8 center tc  rgb \"yellow\" \n");
printf GP ("set label 11 \"(90)\" at -8,0 center tc  rgb \"yellow\"\n");
printf GP ("set label 12 \"(270)\" at 8,0 center  tc  rgb \"yellow\"\n");
printf GP ("set label 13 \"(180)\" at 0,-8 center  tc rgb \"yellow\"\n");
printf GP ("set label 14 \"RF,LO\"   at  25,16 center font \"Times,60\"\n");
printf GP ("set label 15 \"uRF,LO\"   at -26,16 center font \"Times,60\"\n");
printf GP ("set label 16 \"MHz\" at  25,4 center font \"Times,60\"\n");
printf GP ("set label 17 \"MHz\" at -25,4 center font \"Times,60\"\n");
printf GP ("set label 18 \"GSB\" at  25,-4 center font \"Times,60\"\n");
printf GP ("set label 19 \"BW\"  at  25,-8 center font \"Times,60\"\n");

printf GP ("set label 20 \"MHz\" at  25,-16 center font \"Times,60\"\n");
printf GP ("set label 21 \"GWB\" at -25,-4 center font \"Times,60\"\n");
printf GP ("set label 22 \"MHz\" at -25,-16 center font \"Times,60\"\n");
printf GP ("set label 23 \"+90 Dec\" at -0,9 center font \"Times,10\" tc lt 3 \n");
printf GP ("set label 24 \"+19 Dec\" at -1.5,00 center font \"Times,10\" tc lt 3 \n");
printf GP ("set label 25 \"+00 Dec\" at -0,-2.5 center font \"Times,10\" tc lt 3 \n");
printf GP ("set label 26 \"-54 Dec\" at -0,-9 center font \"Times,10\" tc lt 3 \n");

printf GP ("plot sin(x)\n");
close(GP);
