The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Surface Clipping
Replies: 2   Last Post: Jul 29, 2013 11:32 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
matt dash

Posts: 641
Registered: 4/18/08
Re: Surface Clipping
Posted: Feb 12, 2013 11:21 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Dmytro" wrote in message <kfdpbn$kej$>...
> Hello,
> Does anybody know, how to really clip/truncate surface plot to axes limits? I.e. make it not displaying any data out of the limits? One of the possible ways is of course replace data out of limits with NaNs, but this makes saw-tooth pattern near the edges, which does not look ok.
> This question have already been asked long ago ( by other user, but no answer have been given.
> In MatLab documentation in Surface Properties there is a property Clipping, and it says 'Clipping to axes rectangle. When Clipping is on, MATLAB does not display any portion of the surface that is outside the axes rectangle.'. But it does not work (MatLab 7.12.0 (R2011a))!
> At the same time, I also noticed that in the 3rd Figure of (right top corner of it) surface plots are indeed very well clipped to axes! How??? No explanation is given.
> So can anybody clarify this issue?
> Thanks in advance,
> Dima

Unfortunately, the clipping property does exactly what it says it does... it clips to the "axes rectangle", which is the rectangle on your screen that encloses the entire 3d axes. (i.e. the portion of the figure denoted by the axes 'position' property). It does NOT clip to the 3d axes themselves. That would make too much sense. I think your only option is to make an opaque plane using the patch function and place it in your axes where you want the clipping to occur. You could probably write a little function to do this automatically whenever you need it...

Date Subject Author
Read Re: Surface Clipping
matt dash
Read Re: Surface Clipping

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.