[prev in list] [next in list] [prev in thread] [next in thread]
List: gnuplot-info-beta
Subject: Re: Decoupling contours and zrange
From: "Ethan Merritt (UW)" <merritt () uw ! edu>
Date: 2019-09-18 21:51:11
Message-ID: 1688824.cdrrr1juha () stonelion
[Download RAW message or body]
On Wednesday, 18 September 2019 12:06:09 Dima Kogan wrote:
> Thanks for the comments. Notes inline
>
> Ethan Merritt (UW) <merritt@uw.edu> writes:
>
> > On Wednesday, 18 September 2019 10:37:15 Dima Kogan wrote:
> >
> > Are you saying that you have two sets of data, each with its own range
> > on z? That is a separate problem I will come back to at the end [*].
> > For now I assume the two data sets are on the same scale.
>
> Yes, they're different: the z used for the contours is unrelated in what
> I want plotted on the z.
>
> What I'm REALLY trying to do is to visualize a 4D function that maps
> (x,y,a) -> b. There's no clear "right" way to do this in any plotting
> tool. I'd like to do this with several stacked contours, at some preset
> values of a: a0,a1,a2, .... So in each a = a* slice I'd have a 3D
> function (x,y) -> b. And for each such slice I want to generate a
> contour on the xy plane, rendering the contour at z = a*. Multiplot is
> needed for the multiple contours, but that's a whole other issue. As you
> can see, the contours are generated by looking at the value of b, while
> the plot shows values of a on the z axis. Any other suggestions for
> visualizing such 4D functions welcome.
That sounds very close to the new voxel-based options in 5.3.
One such visualization is the animation in "voxel.dem"
The on-line collection has a static image of the end point, but
if you run the demo locally you'll see that it steps through the
volumne one plane at a time.
http://gnuplot.sourceforge.net/demo_5.3/voxel.html
Your description sounds like the same thing with contours rather
than a heatmap.
I would do it by precalculating the contour slices one by one and
then either stepping through them or superimposing them.
Something like this:
set contour
set cntrparam levels increment -1, .1, 1
unset surface
f1(x,y) = sin(x)*cos(y)
f2(x,y) = sin(x+.1)*cos(y-.1)
f3(x,y) = sin(x+.2)*cos(y-.2)
set table $slice1
splot [-5:5][-5:5] '++' using 1:2:(f1($1,$2)) with lines
set table $slice2
splot [-5:5][-5:5] '++' using 1:2:(f2($1,$2)) with lines
set table $slice3
splot [-5:5][-5:5] '++' using 1:2:(f3($1,$2)) with lines
unset table
unset contour
set surface
splot $slice1 using 1:2:(0.0):3 with lines lc palette, \
$slice2 using 1:2:(0.1):3 with lines lc palette, \
$slice3 using 1:2:(0.2):3 with lines lc palette
There's something odd about one of those contours but you get the idea.
> > The contour plot is generated by contouring the data. If you restrict
> > the data to the subset in a particular range then you get contours of
> > only that subset.
>
> Yes. But the expectation was that zrange restricts the visualization,
> not the data. So the full set of data would be used in the contouring,
> and the zrange would only control how stuff is drawn.
[shrug] I guess it depends on how you think about it.
Consider the 9th plot (3rd from the end) in this demo:
http://gnuplot.sourceforge.net/demo_5.2/sampling.html
Limiting the axis range of each plot controls which data is plotted
where, but the overall axis ranges on x y z for the plot as a whole
encompass all the pieces.
Ethan
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@lists.sourceforge.net
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic