|
From: Bjorn B. <bjo...@gm...> - 2026-03-30 14:59:48
|
Hi all,
I have a question about the feature of `splot` that “If all blocks
contain the same number of points, gnuplot will draw cross-isolines
between points in the blocks, connecting corresponding points.” In
particular, I wonder if that feature can be turned off.
In my case, I have equally sized block that I want to plot and
individual lines, and not have them connected with a surface. This
example illustrates the problem:
```
set angles degrees
set view 70,140
set isotropic
set mapping spherical
set hidden3d offset 0
# Set up the Earth grid
set parametric
set samples 32
set isosamples 37
set urange [-90:90]
set vrange [0:360]
set style data lines
set zlabel "Earth radii" rotate
$DATA << EOD
# Orbit 1
0 0 2
0 30 2
0 60 2
0 90 2
0 120 2
0 180 2
0 210 2
0 240 2
0 270 2
0 300 2
0 330 2
0 360 2
# Orbit 2
30 0 2
30 30 2
30 60 2
30 90 2
30 120 2
30 180 2
30 210 2
30 240 2
30 270 2
30 300 2
30 330 2
30 360 2
# Orbit 3
60 0 2
60 30 2
60 60 2
60 90 2
60 120 2
60 180 2
60 210 2
60 240 2
60 270 2
60 300 2
60 330 2
60 360 2
EOD
# The for loop is necessary to prevent iso grid lines being drawn by
# gnuplot due to regular data block sizes.
splot \
cos(u*2)*cos(v),cos(u*2)*sin(v),sin(u*2) lc "dark-grey" notitle ,\
$DATA
```
The workaround I have is to plot the lines in a for loop and use
`every`. It is OK here in the example but quite a bit messier in my
“production” code:
```
splot \
cos(u*2)*cos(v),cos(u*2)*sin(v),sin(u*2) lc "dark-grey" notitle ,\
for [j = 0:2] $DATA every :::j::j
```
There was a similar question in 2015 which seems to have not been
answered: https://sourceforge.net/p/gnuplot/mailman/gnuplot-info/thread/5523D38B.2010001%40lpccaen.in2p3.fr/#msg33740382
Many thanks,
Bjorn
|