From: Dima K. <gn...@di...> - 2019-09-18 19:26:06
|
Thanks for the comments. Notes inline Ethan Merritt (UW) <me...@uw...> 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. > 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. > [*] If the two data sets are not on the same scale then a different > approach is needed. Gnuplot does not currently have a separate z2 > axis analogous to x2 or y2. You can, however, introduce a scaling > function into the plot command: > > splot $data1 using 1:2:3 with lines nosurface title "contours", \ > $data2 using 1:2:(scale($3)) with points nocontour > > However the commands as shown would leave you with the wrong labels > along z. If you apply the scale to the contoured data instead then > the z axis labels would be correct but the contour labels would be > wrong. Either way you would have to manually correct the values in > the labels. > > Modifying gnuplot to support a z2 axis would be possible, but we'd > have to agree on the desired representation. x2 and y2 are drawn > on the opposite side of the plot from x1 and y1 respectively. > Would z2 be drawn on a separate [new] vertical line from z1? > Or would z2 consist only of a second set of z-axis tic labels, > presumably in a distinct color? Hmmm. A separate z2 axis would solve this, and maybe supporting that eventually would be nice, but for THIS particular issue it feels like a workaround. Presumably in the gnuplot guts we have some for of this logic: 1. ingest data 2. throw away all data outside the xrange, yrange, zrange 3. make contours 4. draw Can it be updated to 1. ingest data 2. make contours 3. throw away all data outside the xrange, yrange, zrange 4. draw Or maybe 1. ingest data 1.5. throw away all data outside the xrange, yrange 2. make contours 3. throw away all data outside the zrange 4. draw Here when looking at contours in step 3, we'd use the z of where the contours are drawn, not the data used to generate them. So for contours on the xyplane we'd use the z coordinate of the xyplane. It's very possible that I'm oversimplifying everything here, and that there're lots of details that make such a change impossible. But it feels a lot more like what I (as a user) thinks zrange should do: act on what I see rendered against the z axis. Thanks |