|
From: Ethan A M. <sf...@us...> - 2016-05-27 20:40:13
|
On Wednesday, 25 May, 2016 13:58:32 Daniel J Sebald wrote:
> On 05/24/2016 11:47 AM, Ethan A Merritt wrote:
> > I still do not see the rationale for selecting "hidden3d" and then turning
> > it off for a surface. (Yeah it's a bit confusing that "lines" really means
> > "surface" in this context).
>
> Yes, and I think this is the source of the problem. Really, what I'm
> interested in is not technically excluding a mesh "surface" from
> hidden3d processing but more something that doesn't treat isoline
> surfaces as being solid--yet those isolines can be hidden by other solid
> surface elements. So, that's really what the issue is--i.e., gnuplot
> automatically casts the wire mesh to solid surface in hidden3d mode.
> That is, one can't have a wire mesh in hidden3d mode.
It turns out that you can, so long as you input the lines in such a
way that they are not automatically converted into a surface.
For example:
# This doesn't do what you want - both plot elements are treated as surfaces
set hidden3d
splot x*y, 3
# But if we write out one plot and read it back in as separate lines,
# the result is different because it is no longer treated as a surface.
set hidden3d
set table 'foo'
splot 3
unset table
splot x*y, for [i=0:*] 'foo' every 1:1:0:i::i lt 3 lw 3 notitle
Of course since it is not treated as a surface, no isosample lines
running the other way are generated. If you want those you have
to do something clever that transposes x and y at some stage.
So here goes an example that does exactly what you want:
%%%%%%%%% mesh.dem %%%%%%%%%%%%
set hidden3d
set xrange [-10:10]
set yrange [-10:10]
f(x,y) = x*y
g(x,y) = 3
set table 'foo'
splot '++' using 1:2:(f($1,$2))
set table 'baz'
splot '++' using 2:1:(f($1,$2))
unset table
unset key
splot for [i=0:*] 'foo' every 1:1:0:i::i with lines lt 1, \
for [i=0:*] 'baz' every 1:1:0:i::i with lines lt 1, \
g(x,y) lt 3 lw 3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cheers,
Ethan
|