0

firstly, I'm very new to GNUPlot, so please forgive me if I might sound silly or say stupid things.

I have to visualise some 3D data. I firstly wanted to have something that just worked correctly.

Here it is an example: enter image description here

It's a scatter plot, meaning that I have the list of all (x, y, z) values, which come from a given computation.

I was now wondering if there is a way to convert this plot into a surf-like one, but without having to create a grid-mesh, because actually, real plots are made up of many of these zones, contingent in space, but not necessarily in memory (i.e. there's not order in listing all points, as well as each patch has its own setup). In which case, creating a grid is not possible..

Here is the script I built up to now:

# Main window settings
MAINFONT    = ""
WINDOWTITLE = "BRM (mesher)"
WSIZEW = 3040 # base: 1980
WSIZEH = 2080 # base: 1080
set term wxt \
   size WSIZEW, WSIZEH \
   position 50, 50 \
   font MAINFONT title WINDOWTITLE


#
# commands taken from GNU demo folder
#

# unset hidden3d
# set parametric
set view 45, 45
set border linestyle 102 linewidth 2


# draws a grid in the XY plane (at the base)
# set style line 102 lc rgb "#d6d7d9" lt 0 lw 1
set grid back ls 102


#
# setting styles
#

LINETYP = 8
LINEWDT = 2
POINTTY = 7
POINTIN = 0
POINTSZ = 1

#                              "#AARRGGBB"
set style line 1 linecolor rgb "#B5000000" \
   linetype LINETYP linewidth LINEWDT \
   pointtype POINTTY pointinterval POINTIN pointsize POINTSZ

set style line 2 linecolor rgb "#B5EEEEEE" \
   linetype LINETYP linewidth LINEWDT \
   pointtype POINTTY pointinterval POINTIN pointsize POINTSZ
set style data points


# #
# # LEGEND (related)
# #
# LEGENDTITLE = "brm"
# set key nobox \
#    title LEGENDTITLE

#
# Annotation: title and labels
#
FIGURETITLE = "Bispectrum (MESHER)"
XLABEL = "f_1"
YLABEL = "f_2"
set title FIGURETITLE
set xlabel XLABEL
set ylabel YLABEL

# ??
set ticslevel 0.1


#
# RANGES
#
_xrange  = 0
_yrange  = 0

_xrangev_min = -0.58
_xrangev_max =  0.58
if (_xrange == 0) \
   set autoscale x; \
else \
   set xrange [_xrangev_min : _xrangev_max]

_yrangev_min = -0.58
_yrangev_max =  0.58
if (_yrange == 0) \
   set autoscale y; \
else \
   set yrange [_yrangev_min : _yrangev_max]


# by default, always autoscale Z axis
set autoscale z

#
# PALETTE (???)
#
set palette defined


#
# DATA file - ACTUAL PLOTTING (end of script)
#
DATAFILE = "brm_gnu.dat"
splot DATAFILE linestyle 1

set terminal png transparent \
   size WSIZEW, WSIZEH \
   truecolor enhanced
set out 'brm_gnu.png'
splot DATAFILE linestyle 2

Data in file brm_gnu.dat is layed down like this:

 -0.925000000000000      -0.925000000000000      -1.112830727291687E-010
 -0.925000000000000      -0.906500000000000      -1.233145093750881E-010
 -0.925000000000000      -0.888000000000000      -1.366284414075596E-010
 -0.925000000000000      -0.869500000000000      -1.519484378717266E-010
 -0.925000000000000      -0.851000000000000      -1.689727146344101E-010
 -0.925000000000000      -0.832500000000000      -1.886477866098199E-010
 -0.925000000000000      -0.814000000000000      -2.106127410033206E-010
 -0.925000000000000      -0.795500000000000      -2.361154837990765E-010
 -0.925000000000000      -0.777000000000000      -2.647322799551845E-010
 -0.925000000000000      -0.758500000000000      -2.981225082072651E-010
 -0.925000000000000      -0.740000000000000      -3.358043924792572E-010
 -0.925000000000000      -0.721500000000000      -3.800054710485629E-010
 -0.925000000000000      -0.703000000000000      -4.302096737531581E-010
 -0.925000000000000      -0.684500000000000      -4.894396712358350E-010
 -0.925000000000000      -0.666000000000000      -5.572088806295344E-010
 -0.925000000000000      -0.647500000000001      -6.376713565360164E-010
 -0.925000000000000      -0.629000000000001      -7.305164855939753E-010
 -0.925000000000000      -0.610500000000001      -8.415428103502650E-010
 -0.925000000000000      -0.592000000000001      -9.709330437110598E-010
 -0.925000000000000      -0.573500000000001      -1.126945044480171E-009
 -0.925000000000000      -0.555000000000001      -1.310931309425567E-009
 -0.925000000000000      -0.536500000000001      -1.534975141884201E-009
 -0.925000000000000      -0.518000000000001      -1.803055173016286E-009
 -0.925000000000000      -0.499500000000001      -2.133544704946095E-009
 -0.925000000000000      -0.481000000000001      -2.536285945770245E-009
 -0.925000000000000      -0.462500000000001      -3.040837628811161E-009
 -0.925000000000000      -0.444000000000001      -3.670506613697746E-009
 -0.925000000000000      -0.425500000000001      -4.477002392036607E-009
 -0.925000000000000      -0.407000000000001      -5.516399793216453E-009
 -0.925000000000000      -0.388500000000001      -6.890678221135726E-009
 -0.925000000000000      -0.370000000000001      -8.742275516296416E-009
 -0.925000000000000      -0.351500000000001      -1.130228554007822E-008
 -0.925000000000000      -0.333000000000001      -1.493876996861222E-008
 -0.925000000000000      -0.314500000000001      -2.008105455788527E-008
 -0.925000000000000      -0.296000000000001      -2.639740388136111E-008
 -0.925000000000000      -0.277500000000001      -2.495551205522123E-008
 -0.925000000000000      -0.259000000000001       1.217373182500029E-008
 -0.925000000000000      -0.240500000000001       4.002042521882181E-008
 -0.925000000000000      -0.222000000000001       3.920606423887810E-008
 -0.925000000000000      -0.203500000000001       3.394892837099711E-008
 -0.925000000000000      -0.185000000000001       2.982629548434422E-008
 -0.925000000000000      -0.166500000000001       2.650822114502139E-008
 -0.925000000000000      -0.148000000000001       2.419113779933117E-008
 -0.925000000000000      -0.129500000000001       2.199076752962076E-008
 -0.925000000000000      -0.111000000000001       2.033869550352628E-008
 -0.925000000000000      -9.250000000000064E-002  1.831654441535893E-008
 -0.925000000000000      -7.400000000000063E-002  1.660422884667210E-008
 -0.925000000000000      -5.550000000000063E-002  1.405821421353012E-008
 -0.925000000000000      -3.700000000000063E-002  1.162135856322721E-008
 -0.925000000000000      -1.850000000000063E-002  7.711497131970931E-009
 -0.925000000000000      -6.314393452555578E-016  3.612797228830624E-009
 -0.925000000000000       1.849999999999937E-002  9.044608397276898E-009
 -0.925000000000000       3.699999999999937E-002  1.517231304642434E-008
 -0.925000000000000       5.549999999999937E-002  2.100479548010471E-008
 -0.925000000000000       7.399999999999937E-002  2.794273124567097E-008
 -0.925000000000000       9.249999999999937E-002  3.515439985695759E-008
 -0.925000000000000       0.110999999999999       4.417517701787027E-008
 -0.925000000000000       0.129499999999999       5.446047844096278E-008
 -0.925000000000000       0.147999999999999       6.804953706846881E-008
 -0.925000000000000       0.166499999999999       8.514167966829595E-008
 -0.925000000000000       0.184999999999999       1.092469464956259E-007
 -0.925000000000000       0.203499999999999       1.424166963507360E-007
 -0.925000000000000       0.221999999999999       1.886672091873319E-007
 -0.925000000000000       0.240499999999999       2.226918466600739E-007
 -0.925000000000000       0.258999999999999       8.361467589272240E-008
 -0.925000000000000       0.277499999999999      -1.744810743977760E-007
 -0.925000000000000       0.295999999999999      -2.169414767863524E-007
 -0.925000000000000       0.314499999999999      -1.918417016294112E-007
 -0.925000000000000       0.332999999999999      -1.660457713844593E-007
 -0.925000000000000       0.351499999999999      -1.463673267513782E-007
 -0.925000000000000       0.369999999999999      -1.324561338505409E-007
 -0.925000000000000       0.388499999999999      -1.224425506157808E-007
 -0.925000000000000       0.406999999999999      -1.156187000982741E-007
 -0.925000000000000       0.425499999999999      -1.110329121612473E-007
 -0.925000000000000       0.443999999999999      -1.085133392168845E-007
 -0.925000000000000       0.462499999999999      -1.076295481079459E-007
 -0.925000000000000       0.480999999999999      -1.085133392168845E-007
 -0.925000000000000       0.499499999999999      -1.110329121612472E-007
 -0.925000000000000       0.517999999999999      -1.156187000982739E-007
 -0.925000000000000       0.536499999999999      -1.224425506157803E-007
 -0.925000000000000       0.554999999999999      -1.324561338505402E-007
 -0.925000000000000       0.573499999999999      -1.463673267513768E-007
 -0.925000000000000       0.591999999999999      -1.660457713844573E-007
 -0.925000000000000       0.610499999999999      -1.918417016294087E-007
 -0.925000000000000       0.628999999999999      -2.169414767863508E-007
 -0.925000000000000       0.647499999999999      -1.744810743977867E-007
 -0.925000000000000       0.665999999999999       8.361467589269764E-008
 -0.925000000000000       0.684499999999999       2.226918466600726E-007
 -0.925000000000000       0.702999999999999       1.886672091873358E-007
 -0.925000000000000       0.721499999999999       1.424166963507389E-007
 -0.925000000000000       0.739999999999999       1.092469464956279E-007
 -0.925000000000000       0.758499999999999       8.514167966829721E-008
 -0.925000000000000       0.776999999999999       6.804953706846961E-008
 -0.925000000000000       0.795499999999999       5.446047844096326E-008
 -0.925000000000000       0.813999999999999       4.417517701787055E-008
 -0.925000000000000       0.832499999999999       3.515439985695774E-008
 -0.925000000000000       0.850999999999999       2.794273124567102E-008
 -0.925000000000000       0.869499999999999       2.100479548010464E-008
 -0.925000000000000       0.887999999999999       1.517231304642419E-008
 -0.925000000000000       0.906499999999999       9.044608397276874E-009
 -0.925000000000000       0.924999999999999       3.612797228830709E-009
 -0.888000000000000      -0.925000000000000      -1.366284414075596E-010
 -0.888000000000000      -0.906500000000000      -1.514554825885140E-010
 -0.888000000000000      -0.888000000000000      -1.678715585166733E-010
 -0.888000000000000      -0.869500000000000      -1.867669141753174E-010
 -0.888000000000000      -0.851000000000000      -2.077756527881272E-010
 -0.888000000000000      -0.832500000000000      -2.320637715170312E-010
 -0.888000000000000      -0.814000000000000      -2.591939133899776E-010
 -0.888000000000000      -0.795500000000000      -2.907054359991271E-010
 -0.888000000000000      -0.777000000000000      -3.260854042965641E-010
 -0.888000000000000      -0.758500000000000      -3.673837700039050E-010
 -0.888000000000000      -0.740000000000000      -4.140185705201067E-010
 -0.888000000000000      -0.721500000000000      -4.687460835720848E-010
 -0.888000000000000      -0.703000000000000      -5.309456540028089E-010
 -0.888000000000000      -0.684500000000000      -6.043640295947556E-010
 -0.888000000000000      -0.666000000000000      -6.884223308909101E-010
 -0.888000000000000      -0.647500000000001      -7.882796678741693E-010
 -0.888000000000000      -0.629000000000001      -9.035829327128297E-010
 -0.888000000000000      -0.610500000000001      -1.041548837634559E-009
 -0.888000000000000      -0.592000000000001      -1.202448012416946E-009
 -0.888000000000000      -0.573500000000001      -1.396581641103813E-009
 -0.888000000000000      -0.555000000000001      -1.625692034292117E-009
 -0.888000000000000      -0.536500000000001      -1.904889699074367E-009
 -0.888000000000000      -0.518000000000001      -2.239214737295571E-009
 -0.888000000000000      -0.499500000000001      -2.651702965951379E-009
 -0.888000000000000      -0.481000000000001      -3.154754671938524E-009
 -0.888000000000000      -0.462500000000001      -3.785524790771094E-009
 -0.888000000000000      -0.444000000000001      -4.573321099493714E-009
 -0.888000000000000      -0.425500000000001      -5.583291834596760E-009
 -0.888000000000000      -0.407000000000001      -6.885924678859094E-009
 -0.888000000000000      -0.388500000000001      -8.609926607920218E-009
 -0.888000000000000      -0.370000000000001      -1.093443224260467E-008
 -0.888000000000000      -0.351500000000001      -1.415141660472406E-008
 -0.888000000000000      -0.333000000000001      -1.872420023868949E-008
 -0.888000000000000      -0.314500000000001      -2.519643739342348E-008
 -0.888000000000000      -0.296000000000001      -3.315091047770025E-008
 -0.888000000000000      -0.277500000000001      -3.133806906065347E-008
 -0.888000000000000      -0.259000000000001       1.546718386380113E-008
 -0.888000000000000      -0.240500000000001       5.061374436033968E-008
 -0.888000000000000      -0.222000000000001       4.962933230441113E-008
 -0.888000000000000      -0.203500000000001       4.303993129303609E-008
 -0.888000000000000      -0.185000000000001       3.787728624524228E-008
 -0.888000000000000      -0.166500000000001       3.373039604908384E-008
 -0.888000000000000      -0.148000000000001       3.084627797750065E-008
 -0.888000000000000      -0.129500000000001       2.810937227742075E-008
 -0.888000000000000      -0.111000000000001       2.606548441463560E-008
 -0.888000000000000      -9.250000000000064E-002  2.354964918053996E-008
 -0.888000000000000      -7.400000000000063E-002  2.142508131358988E-008
 -0.888000000000000      -5.550000000000063E-002  1.823209774441858E-008
 -0.888000000000000      -3.700000000000063E-002  1.517231304642424E-008
 -0.888000000000000      -1.850000000000063E-002  1.021290092645047E-008
 -0.888000000000000      -6.314393452555578E-016  4.996516315440040E-009
 -0.888000000000000       1.849999999999937E-002  1.204686441977831E-008
 -0.888000000000000       3.699999999999937E-002  2.003725247337349E-008
 -0.888000000000000       5.549999999999937E-002  2.770656912576066E-008
 -0.888000000000000       7.399999999999937E-002  3.686853319008584E-008
 -0.888000000000000       9.249999999999937E-002  4.647057591600724E-008
 -0.888000000000000       0.110999999999999       5.852674022159808E-008
 -0.888000000000000       0.129499999999999       7.237217172770839E-008
 -0.888000000000000       0.147999999999999       9.072779247103859E-008
 -0.888000000000000       0.166499999999999       1.139536289449970E-007
 -0.888000000000000       0.184999999999999       1.468272034445875E-007
 -0.888000000000000       0.203499999999999       1.923234269198452E-007
 -0.888000000000000       0.221999999999999       2.561821950532344E-007
 -0.888000000000000       0.240499999999999       3.045967590943703E-007
 -0.888000000000000       0.258999999999999       1.171993595810555E-007
 -0.888000000000000       0.277499999999999      -2.378521699660832E-007
 -0.888000000000000       0.295999999999999      -2.991990241636433E-007
 -0.888000000000000       0.314499999999999      -2.667602282068009E-007
 -0.888000000000000       0.332999999999999      -2.327707439729019E-007
 -0.888000000000000       0.351499999999999      -2.069250337782313E-007
 -0.888000000000000       0.369999999999999      -1.889997417787384E-007
 -0.888000000000000       0.388499999999999      -1.764722762883600E-007
 -0.888000000000000       0.406999999999999      -1.685374934037391E-007
 -0.888000000000000       0.425499999999999      -1.638989791992446E-007
 -0.888000000000000       0.443999999999999      -1.625314556369960E-007
 -0.888000000000000       0.462499999999999      -1.638989791992444E-007
 -0.888000000000000       0.480999999999999      -1.685374934037387E-007
 -0.888000000000000       0.499499999999999      -1.764722762883594E-007
 -0.888000000000000       0.517999999999999      -1.889997417787376E-007
 -0.888000000000000       0.536499999999999      -2.069250337782301E-007
 -0.888000000000000       0.554999999999999      -2.327707439728999E-007
 -0.888000000000000       0.573499999999999      -2.667602282067980E-007
 -0.888000000000000       0.591999999999999      -2.991990241636416E-007
 -0.888000000000000       0.610499999999999      -2.378521699660962E-007
 -0.888000000000000       0.628999999999999       1.171993595810264E-007
 -0.888000000000000       0.647499999999999       3.045967590943685E-007
 -0.888000000000000       0.665999999999999       2.561821950532387E-007
 -0.888000000000000       0.684499999999999       1.923234269198487E-007
 -0.888000000000000       0.702999999999999       1.468272034445898E-007
 -0.888000000000000       0.721499999999999       1.139536289449986E-007
 -0.888000000000000       0.739999999999999       9.072779247103978E-008
 -0.888000000000000       0.758499999999999       7.237217172770904E-008
 -0.888000000000000       0.776999999999999       5.852674022159847E-008
 -0.888000000000000       0.795499999999999       4.647057591600741E-008
 -0.888000000000000       0.813999999999999       3.686853319008582E-008
 -0.888000000000000       0.832499999999999       2.770656912576058E-008
 -0.888000000000000       0.850999999999999       2.003725247337335E-008
 -0.888000000000000       0.869499999999999       1.204686441977828E-008
 -0.888000000000000       0.887999999999999       4.996516315440152E-009
 -0.888000000000000       0.906499999999999       1.021290092645066E-008
 -0.888000000000000       0.924999999999999       1.517231304642449E-008
 -0.906500000000000      -0.925000000000000      -1.233145093750881E-010
 -0.906500000000000      -0.906500000000000      -1.366712162455961E-010
 -0.906500000000000      -0.888000000000000      -1.514554825885140E-010
 -0.906500000000000      -0.869500000000000      -1.684698988679970E-010
 -0.906500000000000      -0.851000000000000      -1.873821383985311E-010
 -0.906500000000000      -0.832500000000000      -2.092427346051062E-010
 -0.906500000000000      -0.814000000000000      -2.336543459977473E-010
 -0.906500000000000      -0.795500000000000      -2.620029506471153E-010
 -0.906500000000000      -0.777000000000000      -2.938222817540006E-010
 -0.906500000000000      -0.758500000000000      -3.309566693801141E-010
 -0.906500000000000      -0.740000000000000      -3.728765161227582E-010
 -0.906500000000000      -0.721500000000000      -4.220596246022149E-010
 -0.906500000000000      -0.703000000000000      -4.779398944083059E-010
 -0.906500000000000      -0.684500000000000      -5.438825499738923E-010
 -0.906500000000000      -0.666000000000000      -6.193566049239658E-010
 -0.906500000000000      -0.647500000000001      -7.089913437241107E-010
 -0.906500000000000      -0.629000000000001      -8.124550216954241E-010
 -0.906500000000000      -0.610500000000001      -9.362163645406903E-010
 -0.906500000000000      -0.592000000000001      -1.080498172760888E-009
 -0.906500000000000      -0.573500000000001      -1.254523323649140E-009
 -0.906500000000000      -0.555000000000001      -1.459826376314463E-009
 -0.906500000000000      -0.536500000000001      -1.709919380579901E-009
 -0.906500000000000      -0.518000000000001      -2.009279152148843E-009
 -0.906500000000000      -0.499500000000001      -2.378478052394948E-009
 -0.906500000000000      -0.481000000000001      -2.828561117094100E-009
 -0.906500000000000      -0.462500000000001      -3.392667355731829E-009
 -0.906500000000000      -0.444000000000001      -4.096927601250477E-009
 -0.906500000000000      -0.425500000000001      -4.999381363828435E-009
 -0.906500000000000      -0.407000000000001      -6.162888260319948E-009
 -0.906500000000000      -0.388500000000001      -7.702010777696916E-009
 -0.906500000000000      -0.370000000000001      -9.776462968777032E-009
 -0.906500000000000      -0.351500000000001      -1.264599184476242E-008
 -0.906500000000000      -0.333000000000001      -1.672350388985956E-008
 -0.906500000000000      -0.314500000000001      -2.249212029278521E-008
 -0.906500000000000      -0.296000000000001      -2.957989097539718E-008
 -0.906500000000000      -0.277500000000001      -2.796384756075452E-008
 -0.906500000000000      -0.259000000000001       1.371887680503458E-008
 -0.906500000000000      -0.240500000000001       4.500053541945885E-008
 -0.906500000000000      -0.222000000000001       4.410536409817017E-008
 -0.906500000000000      -0.203500000000001       3.822038841662931E-008
 -0.906500000000000      -0.185000000000001       3.360739075021546E-008
 -0.906500000000000      -0.166500000000001       2.989833461734862E-008
 -0.906500000000000      -0.148000000000001       2.731337564207566E-008
 -0.906500000000000      -0.129500000000001       2.485956140414542E-008
 -0.906500000000000      -0.111000000000001       2.302206300210600E-008
 -0.906500000000000      -9.250000000000064E-002  2.076683042691665E-008
 -0.906500000000000      -7.400000000000063E-002  1.885973769795809E-008
 -0.906500000000000      -5.550000000000063E-002  1.600921909170784E-008
 -0.906500000000000      -3.700000000000063E-002  1.327938872744156E-008
 -0.906500000000000      -1.850000000000063E-002  8.877473815630514E-009
 -0.906500000000000      -6.314393452555578E-016  4.255507953928457E-009
 -0.906500000000000       1.849999999999937E-002  1.044166431933323E-008
 -0.906500000000000       3.699999999999937E-002  1.743614564704666E-008
 -0.906500000000000       5.549999999999937E-002  2.412148830393200E-008
 -0.906500000000000       7.399999999999937E-002  3.209052259334402E-008
 -0.906500000000000       9.249999999999937E-002  4.040794806557133E-008
 -0.906500000000000       0.110999999999999       5.083090912922838E-008
 -0.906500000000000       0.129499999999999       6.275741062996620E-008
 -0.906500000000000       0.147999999999999       7.854088457460013E-008
 -0.906500000000000       0.166499999999999       9.845150853016995E-008
 -0.906500000000000       0.184999999999999       1.265800089781315E-007
 -0.906500000000000       0.203499999999999       1.653939929314344E-007
 -0.906500000000000       0.221999999999999       2.196862110699713E-007
 -0.906500000000000       0.240499999999999       2.602144086867102E-007
 -0.906500000000000       0.258999999999999       9.884958131045721E-008
 -0.906500000000000       0.277499999999999      -2.035802542405856E-007
 -0.906500000000000       0.295999999999999      -2.545269003492000E-007
 -0.906500000000000       0.314499999999999      -2.259593091092582E-007
 -0.906500000000000       0.332999999999999      -1.963318006679911E-007
 -0.906500000000000       0.351499999999999      -1.737574136603818E-007
 -0.906500000000000       0.369999999999999      -1.579312255221945E-007
 -0.906500000000000       0.388499999999999      -1.466792948328887E-007
 -0.906500000000000       0.406999999999999      -1.392395360328343E-007
 -0.906500000000000       0.425499999999999      -1.344964799883919E-007
 -0.906500000000000       0.443999999999999      -1.323297848028745E-007
 -0.906500000000000       0.462499999999999      -1.322469414183294E-007
 -0.906500000000000       0.480999999999999      -1.345321624991211E-007
 -0.906500000000000       0.499499999999999      -1.390900220084392E-007
 -0.906500000000000       0.517999999999999      -1.466735981468943E-007
 -0.906500000000000       0.536499999999999      -1.576717543811861E-007
 -0.906500000000000       0.554999999999999      -1.737028723144627E-007
 -0.906500000000000       0.573499999999999      -1.958655577255762E-007
 -0.906500000000000       0.591999999999999      -2.258266556659192E-007
 -0.906500000000000       0.610499999999999      -2.536813208860895E-007
 -0.906500000000000       0.628999999999999      -2.033996127677433E-007
 -0.906500000000000       0.647499999999999       9.839891803808796E-008
 -0.906500000000000       0.665999999999999       2.598892689170532E-007
 -0.906500000000000       0.684499999999999       2.183239868389179E-007
 -0.906500000000000       0.702999999999999       1.651091175348573E-007
 -0.906500000000000       0.721499999999999       1.255105409220265E-007
 -0.906500000000000       0.739999999999999       9.821654436346623E-008
 -0.906500000000000       0.758499999999999       7.762178553728138E-008
 -0.906500000000000       0.776999999999999       6.254401541217292E-008
 -0.906500000000000       0.795499999999999       4.997354948465678E-008
 -0.906500000000000       0.813999999999999       4.020011324238698E-008
 -0.906500000000000       0.832499999999999       3.124110268472883E-008
 -0.906500000000000       0.850999999999999       2.390820741791080E-008
 -0.906500000000000       0.869499999999999       1.655039280302377E-008
 -0.906500000000000       0.887999999999999       1.021290092645050E-008
 -0.906500000000000       0.906499999999999       9.561331090630669E-009
 -0.906500000000000       0.924999999999999       9.044608397277014E-009

Thanks :)

PS: ANY suggestion/comment/critics not strictly related to the question, but that would improve my knowledge, is well accepted!

EDIT 1: Here is an example of how I'd like the plot to look like instead: Surf-like looking picture

mEm
  • 353
  • 3
  • 12
  • Mmh, I don't know why SO deletes my fisrt line, where I was just saying "Hi".... – mEm Jan 11 '23 at 14:14
  • I don't understand your description well enough to offer a specific answer, but you may want to investigate gnuplot's `set dgrid3d` option. It creates a grid description from unordered (scattered) points and provides several different options for calculating or weighting the value at each grid point. Perhaps you could try that first and then revise your question to describe how the result differed from what you want. – Ethan Jan 11 '23 at 18:23
  • @Ethan thanks for your comment. I tried `set dgrid3d`, but it didn't work as supposed.. I added an edit showing how I'd like the final result to look like. Thanks :) – mEm Jan 11 '23 at 18:46

1 Answers1

0

You don't show nearly enough data to get a feel for what the full data set looks like. In the hope that it helps, here is an example of using set dgrid3d on a small number of points to produce a plot sort of like the one you show:

$DATA << EOD
-5.0 -5.0 0
-5.0  5.0 0
 5.0  5.0 0
 5.0 -5.0 0
 0.0  0.0 0
-3.0 -2.0 8.e10
-1.0  2.0 6.e10
-2.0 -1.0 9.e10
 2.0  2.0 5.e10
 0.0 -3.0 8.e10
 3.0  0.0 7.e10
EOD

set grid x y z
set grid vertical
set xyplane at 0

set dgrid3d 100,100 gauss kdensity 0.6, 0.6

splot $DATA with pm3d

enter image description here

Examples using amended data

Probably the best answer is to change your data format slightly so that each X value has its own block in the file. I.e. put a blank line between the section with X=-0.925 and the section with X=-0.888 and so on. That make the plot command very simple. However it seems there are some glitches in your data, maybe due to inconsistent sampling?

set hidden3d offset 0   # remove hidden lines
splot "DATA" with lines title "blank line between x slices"

enter image description here

A different way is to use dgrid3d as shown before. You must tailor the dgrid3d parameters and weighting scheme to your data. I cannot do that for you, you have to think about how you want each data point to contribute to the surface: How big is the neighborhood it affects? Is it a requirement that the surface pass exactly through each point? How smooth should the surface be? Etc...

Anyhow, here is a simple example using your amended data. The sample data pretty much consists of 100 samples for each x and 3 for each y so that's what we set as a grid. We ask for a spline fit through the points.

set dgrid3d 100,3 spline
set hidden3d
plot "DATA" with lines

enter image description here

Ethan
  • 13,715
  • 2
  • 12
  • 21
  • Thanks for the answer Ethan. Tried it out, it doesn't give the same behavoiur like you show in the figure. It completely changes the shape of the surface... I have **updated** the data, so that it is clearer how data is layed down. Basically, for each X, say `X = [a, b, c, d, e,]`, I list all the values Y `Y = [m, n, o, p, q]`, in the order they were computed. This is why we see on the left a series of the same number, while the patter on the right is tha same for each changing value on the left. Hope this clarifies it a bit more. – mEm Jan 12 '23 at 09:40
  • However, I'd love to come to a solution like this, since after a given resolution, points just create something uncomprehensible.. – mEm Jan 12 '23 at 09:40