#!/bin/csh -f
if ( $#argv < 3) then
  echo "Usage : p objectname [-r] [-l] xvar [-r] [-l] yvar [-sym #] [+sym #] [-siz #]"
  exit(1)
  endif

set obj = "$argv[1]"
#echo "$obj"
set stuff=

set icnt=2
set argc = 0
while ( ( $icnt <= $#argv ) && ( $argc <= 1 ) )
  set stuff = "$stuff $argv[$icnt]"
#	echo $stuff
  if ( "$argv[$icnt]" != "-l"  && "$argv[$icnt]" != "-r" ) then
    @ argc += 1
  endif
  @ icnt += 1
  end

if ( $argc != 2) then
  echo $argv[0] requires object xvar yvar
  exit(1)
  endif

echo scaling...
ez "$obj" $stuff pxy
if ( $status )then
  exit(1)
  endif

echo plotting...
chmod +x tmp.plt
ers
tmp.plt $argv[$icnt-]


