Splot with pattern-filled closed curves and colorbar in Gnuplot -


i've got 2 datafiles need plot, first datafile "surface.dat" nx3 matrix contains x y z data.

am splotting pm3d , set viewmap 2d projection map of current surface z data defines range of colorbar.

the second data file "closed_curve.dat" lies on x-y plane no z components. easy plot surface , curve in same graph using

set view map set cbrange... set xrange... set yrange... splot "surface.dat"  u 2:1:3 title "" w pm3d ,"closed_curve.dat" u 1:2:(0) title  "" 

since closed curve however, want fill 1 of gnuplot patterns can't find works.

a closed curve in form of rectangle example can created object without need of data file , filled in that's not problem e.g

set object 1 rectangle 0,0 0.4,0.8 front fc  lt 1 fs pattern 2 lw 2 

thanks in advance....

i think best option using external tool create polygon object based on data file:

set macros polystr = system('awk -v "ors= " "{printf \"%s %f,%f \",s,\$1,\$2; s = \"to\"}" closed_curve.dat') set object 1 polygon fillstyle pattern 5 @polystr splot "surface.dat" using 2:1:3 pm3d 

i'm not sure if there limit on allowed line length may hit polystr. maybe you'll need write command temporary file , load this.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -