colorpts.awk

来自「智能画图软件」· AWK 代码 · 共 30 行

AWK
30
字号
# Script for transforming points (x y z) into "rectangular surface".# Can be used to draw colour points in gnuplot with the pm3d enhancement# Petr Mikulik, 14. 10. 1999BEGIN {if (ARGC<4) {  print "Syntax:  awk -f colorpts.awk file dx dy" >"/dev/stderr"  print "\nWhere 2*dx, 2*dy defines the point size (enlargement) in x, y" >"/dev/stderr"  print "Gnuplot usage: set pm3d map; splot '<awk -f colorpts.awk pts.dat 0.01 0.01'" >"/dev/stderr"  exit}dx = ARGV[2]dy = ARGV[3]ARGC = 2}# skip blank linesNF==0 { next }# main{x=$1; y=$2print x-dx "\t" y-dy "\t" $3print x-dx "\t" y+dy "\t" $3printf "\n" # blank line (new scan)print x+dx "\t" y-dy "\t" $3print x+dx "\t" y+dy "\t" $3printf "\n\n" # two blank lines (new surface)}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?