Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #! /bin/tcsh
  2. #
  3. if ("a$1" == "a") then
  4. echo "give a file name..."
  5. exit
  6. endif
  7. if ("a$1" == "ahelp") then
  8. echo "Usage: $0 <datafilename> [numcols]"
  9. echo ""
  10. exit
  11. endif
  12. if ("a$2" == "a") then
  13. set numcols=2
  14. else
  15. set numcols=$2
  16. endif
  17. #
  18. #
  19. # @ numcols = $numcols + 1
  20. set cnum=2
  21. set pltcmd="plot '$1' using 1:2"
  22. while ( $cnum != $numcols )
  23. @ cnum = $cnum + 1
  24. set pltcmd="${pltcmd}, '$1' using 1:${cnum}"
  25. end
  26. #
  27. echo "Plot cmd: $pltcmd"
  28. #
  29. cat << EOF > x.plot.$$
  30. set style data linespoints
  31. $pltcmd
  32. pause -1 "Hit return to continue"
  33. EOF
  34. #
  35. gnuplot x.plot.$$
  36. #
  37. rm x.plot.$$
  38. #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement