Eular
Eular

Reputation: 1807

gnuplot surface plot set cutoff with pm3d

I'm getting this plot using pm3d parula color pallet and my z range is et at [:.4]

enter image description here as you can see the cut at the z=.4 is not uniform surface cut, its like spiky. How do I make this uniform? Also another question, is there a option in gnuplot to skip row and column similar to python matplotlib's rstride and cstride

Upvotes: 0

Views: 544

Answers (1)

Ethan
Ethan

Reputation: 15093

  set pm3d noborder
  set zrange [*:0.4]
  splot 'filename' using 1:2:( $3<0.4 ? $3 : 0.4 ) with pm3d

This should produce truncated cones. The clipped region is rendered as a solid (flat) surface with the color of palette value 0.4.
If you require that the truncated region appears as a void rather than as flat surface, the following command sequence may work. This is a little-used pm3d option and I am not certain of the requirements on the structure of the data.

set pm3d noborder
set pm3d clip1in
set zrange  [*:0.4]
set cbrange [*:1.0]
splot 'filename' using 1:2:( $3<0.4 ? $3 : 0.41 ) with pm3d

enter image description here

Upvotes: 0

Related Questions