Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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: 612
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$1@newscl01ah.mathworks.com>...
> 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 (http://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/294827) 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 http://www.mathworks.co.uk/help/curvefit/exploring-and-customizing-plots.html (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
2/12/13
Read Re: Surface Clipping
matt dash
7/29/13
Read Re: Surface Clipping
Evan

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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.