Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Truncating a surface plot in Matlab

  1. Sep 29, 2011 #1
    Hi,
    My thesis involves several surface plots. Most of the interesting features of these plots (and also the region I am interested in) are between z=0 and z=0.2, but there are a few points that have values as high as z=4. I want to view only the region of interest, so I use

    Code (Text):
    zlim([0 0.2])
    This works fine in the sense that it zooms in on the region of interest, but it does not truncate parts of the plot above z=0.2. This means that the surface extends above the axes, all the way up to the top of the figure when viewed from an oblique angle. Cosmetically, I feel this is unacceptable for a thesis, and I would like the plot to be truncated at the axis limits without affecting the location of the points.

    I am okay with it either 'cutting' the top off, or flattening it at the top, but would probably prefer the former. Unfortunately, changing the actual values in this region (by setting any point with a value greater that z=0.2 to 0.2) changes the actual shape of the surface between these points and the neighbouring points.

    There must be simple solution for this, but I can't find one. Hopefully someone has some ideas. Thanks in advance.
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Truncating a surface plot in Matlab
  1. Plotting with MATLAB (Replies: 1)

Loading...