|
From: Geoff K. <ge...@ka...> - 2026-09-22 23:07:38
|
I am attempting to plot a surface from data in a file. The plot produced shows the correct X,Y, Z axes and key. But no surface and the base plane is not where I expect it to be. For simplicity I am testing with the data inline using: splot [X_min:X_max][Y_min:Y_max] '-' matrix 0.0046 -0.067 -0.1375 -0.2081 -0.2587 -0.3094 -0.3702 -0.4311 -0.495 0.097 0.026 -0.043 -0.1129 -0.1617 -0.2087 -0.2577 -0.3123 -0.3891 0.1774 0.0877 0.0226 -0.0425 -0.1011 -0.1598 -0.2069 -0.254 -0.3127 0.2578 0.1498 0.0882 0.0278 -0.0405 -0.1085 -0.1561 -0.1989 -0.2363 0.3034 0.2022 0.1448 0.0875 0.0233 -0.0408 -0.0947 -0.1486 -0.1892 0.3491 0.2587 0.2015 0.1438 0.0872 0.0285 -0.0333 -0.0951 -0.1421 0.4093 0.3214 0.256 0.1905 0.1377 0.085 0.0251 -0.0349 -0.0886 0.4695 0.3912 0.3104 0.2381 0.1883 0.1378 0.0834 0.0263 -0.0351 0.47660 0.4624 0.3798 0.2972 0.2372 0.1772 0.1293 0.0814 0.0225 The preamble and splot call is contained in a gp script file like so: [plot-xy-surface.gp] #!/usr/bin/gnuplot -persist reset session set terminal wxt 1 persist enhanced X_min=-18.5; X_max=-13.5; Y_min=-18.5; Y_max=-13.5; Z_min=-0.6; Z_max=0.6 unset xtics; set xrange [X_min:X_max]; set xtics X_min,0.5,X_max; set xlabel "X" unset ytics; set yrange [Y_min:Y_max]; set ytics Y_min,0.5,Y_max; set ylabel "Y" set zrange [Z_min:Z_max]; set ztics Z_min,0.1,Z_max; set zlabel "Z" unset key; set key outside set xyplane 0.0 set grid; set cntrparam levels 13; set isosamples 100 splot .... The terminal session is: gnuplot> call "plot-xy-surface.gp" gnuplot> show surface surface is drawn I have tried many variations, and have now drawn a blank! As mentioned above there is no surface, and the base plane is set at Z_min rather than 0.0 as requested! Is there any option that I should be turning on or indeed off? For reference: GNUPLOT: gnuplot 5.4 patchlevel 4 OS: Debian 12 bookworm DESKTOP Mate 1.26.0 I have no problem using splot with functions. Any input much appreciated. -- Geoff |