⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 surface1.dem

📁 智能画图软件
💻 DEM
字号:
## $Id: surface1.dem,v 1.10 2003/10/28 05:35:54 sfeam Exp $#set samples 21set isosample 11set xlabel "X axis" -3,-2set ylabel "Y axis" 3,-2set zlabel "Z axis" -5set title "3D gnuplot demo"set label 1 "This is the surface boundary" at -10,-5,150 centerset arrow 1 from -10,-5,120 to -10,0,0 noheadset arrow 2 from -10,-5,120 to 10,0,0 noheadset arrow 3 from -10,-5,120 to 0,10,0 noheadset arrow 4 from -10,-5,120 to 0,-10,0 noheadset xrange [-10:10]set yrange [-10:10]splot x*ypause -1 "Hit return to continue (1)"unset arrowunset labelset gridsplot x**2+y**2, x**2-y**2pause -1 "Hit return to continue (2)"rep x*ypause -1 "Hit return to continue (3)"rep (x**3+y**3)/10pause -1 "Hit return to continue (4)"set ticslevel 0.0set title "3D gnuplot demo ( ticslevel = 0.0 )"reppause -1 "Hit return to continue (5)"set ticslevel 2.0set title "3D gnuplot demo ( ticslevel = 2.0 )"reppause -1 "Hit return to continue (6)"set ticslevel 0.5set title "3D gnuplot demo ( ticslevel = 0.5 )"reppause -1 "Hit return to continue (7)"set title "3D gnuplot demo"unset gridsplot x*y with pointspause -1 "Hit return to continue (8)"unset xticsunset yticsset xrange [-1:1]set yrange [-1:1]set title "Surfaces with no grid or tics"splot x*y with lines, x**2*y**3 with dots, x**3*y*2 with pointspause -1 "Hit return to continue (9)"set xtics ("low" -3, "mid" 0, "high" 3)set ytics -2,0.5,2set xrange [-3:3]set yrange [-3:3]set log zset title "Surfaces with z log scale"splot x**2*y**2 + 2, x**2*y**4 + 2, x**4*y**2 + 2pause -1 "Hit return to continue (10)"unset log zset xtics autofreqset ytics autofreqset xrange [-1:1]set yrange [-1:1]set samples 51set isosample 21set dummy u,vset title "3D gnuplot demo"splot u*v / (u**2 + v**2 + 0.1)pause -1 "Hit return to continue (11)"splot [x=-3:3] [y=-3:3] sin(x) * cos(y)pause -1 "Hit return to continue (12)"set zrange [-1.0:1.0]replotpause -1 "Hit return to continue (13)"set title "Sinc function"set zrange [-1:1]set label 1 "This is equal to 1" at 0,3.2,1 leftset arrow 1 from 0,3,1 to 0,0,1sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2)splot [-5:5.01] [-5:5.01] sinc(u,v)pause -1 "Hit return to continue (14)"set view 70,20,1set zrange [-0.5:1.0]set ztics -1,0.25,1set label 1 "This is equal to 1" at -5,-2,1.5 centreset arrow 1 from -5,-2.1,1.4 to 0,0,1splot [-12:12.01] [-12:12.01] sinc(u,v)pause -1 "Hit return to continue (15)"set title "\"fence plot\" using separate parametric surfaces"# A method suggested by Hans-Bernhard Broeker# <broeker@physik.rwth-aachen.de>: display a separate parametric# surface for each fence.set zrange [-1:1]unset labelunset arrowset xrange [-5:5]; set yrange [-5:5]set arrow from 5,-5,-1.2 to 5,5,-1.2 lt -1set label 1 "increasing v" at 6,0,-1set arrow from 5,6,-1 to 5,5,-1 lt -1set label 2 "u=0" at 5,6.5,-1set arrow from 5,6,sinc(5,5) to 5,5,sinc(5,5) lt -1set label 3 "u=1" at 5,6.5,sinc(5,5)set parametricset hidden3dset isosamples 2,33xx=-5; dx=(4.99-(-4.99))/9x0=xx; xx=xx+dxx1=xx; xx=xx+dxx2=xx; xx=xx+dxx3=xx; xx=xx+dxx4=xx; xx=xx+dxx5=xx; xx=xx+dxx6=xx; xx=xx+dxx7=xx; xx=xx+dxx8=xx; xx=xx+dxx9=xx; xx=xx+dxsplot [u=0:1][v=-4.99:4.99] \	x0, v, (u<0.5) ? -1 : sinc(x0,v) notitle, \	x1, v, (u<0.5) ? -1 : sinc(x1,v) notitle, \	x2, v, (u<0.5) ? -1 : sinc(x2,v) notitle, \	x3, v, (u<0.5) ? -1 : sinc(x3,v) notitle, \	x4, v, (u<0.5) ? -1 : sinc(x4,v) notitle, \	x5, v, (u<0.5) ? -1 : sinc(x5,v) notitle, \	x6, v, (u<0.5) ? -1 : sinc(x6,v) notitle, \	x7, v, (u<0.5) ? -1 : sinc(x7,v) notitle, \	x8, v, (u<0.5) ? -1 : sinc(x8,v) notitle, \	x9, v, (u<0.5) ? -1 : sinc(x9,v) notitlepause -1 "Hit return to continue (16)"set title "\"fence plot\" using single parametric surface with undefined points"# Another method suggested by Hans-Bernhard Broeker# <broeker@physik.rwth-aachen.de>: Use parametric variable u to control# x, y, and z.  u=3*fencenumber+remainder, where the remainder selects# one of three types of points:# 	  remainder=0: x=xmin+fencenumber*dx, y=v, z=zbase# 	  remainder=1: x=xmin+fencenumber*dx, y=v, z=f(x,y)# 	  remainder=2: x=xmin+fencenumber*dx, y=v, z=1/0 (undefined)set parametricunset labelunset arrowxmin=-4.99; xmax=5; n=10; dx=(xmax-xmin)/(n-1.)set isosamples 3*n,33zbase=-1set arrow from 5,-5,-1.2 to 5,5,-1.2 lt -1set label 1 "increasing v" at 6,0,-1set arrow from -5,-5,-1.2 to 5,-5,-1.2 lt -1set label 2 "increasing u" at 0,-5,-1.5set arrow from 5,6,-1 to 5,5,-1 lt -1set label 3 "floor(u)%3=0" at 5,6.5,-1set arrow from 5,6,sinc(5,5) to 5,5,sinc(5,5) lt -1set label 4 "floor(u)%3=1" at 5,6.5,sinc(5,5)splot [u=.5:3*n-.5][v=-4.99:4.99] \	 xmin+floor(u/3)*dx, v, ((floor(u)%3)==0) ? zbase : \			 (((floor(u)%3)==1) ? sinc(xmin+u/3.*dx,v) : 1/0) notitlepause -1 "Hit return to continue (17)"unset hidden3d; unset parametric; set isosamples 20,20set xrange [-1:1]; set yrange [-1:1]set ztics autofrequnset arrowunset labelset logset autoset title "This has logarithmic scale"splot [x=1:15] [y=1:15] x**2+y**2pause -1 "Hit return to continue (18)"unset logset xrange [0:15]set yrange [0:15]set auto#set zrange [-0.6:0.7]set ticslevel 0set style data linesset title "Data grid plotting"set parametricsplot "glass.dat"pause -1 "Hit return to continue (19)"splot "glass.dat" using 3:2:1pause -1 "Hit return to continue (20)"set zrange [-1.2:1.2]set ticslevel 0.5unset parametricset xlabel "line index within group"set ylabel "group index"splot "glass.dat" using 1, "glass.dat" using 2, "glass.dat" using 3pause -1 "Hit return to continue (21)"set title "splot of part of a data file"set xlabel "X axis" -3,-2set ylabel "Y axis" 3,-2set hidden3dsplot 'glass.dat' every 2::0::12 with linespause -1 "Hit return to continue (22)"set title "splot with \"set pm3d\" (implemented with some terminals)"set pm3dset hidden3dsplot 'glass.dat' every 2::0::12 with linespause -1 "Hit return to continue (23)"unset hidden3dunset pm3dset paramset title "Test of spherical coordinates"set mapping sphericalsplot "glass.dat"pause -1 "Hit return to continue (24)"# mandelbrot demoset title "Mandelbrot function"unset parametricset mapping cartesianset view 60,30,1,1set autoset isosamples 60set hidden3dcompl(a,b)=a*{1,0}+b*{0,1}mand(z,a,n) = n<=0 || abs(z)>100 ? 1:mand(z*z+a,a,n-1)+1splot [-2:1][-1.5:1.5] mand({0,0},compl(x,y),30)     pause -1 "Hit return to continue (25)"reset

⌨️ 快捷键说明

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