MATLAB Answers


Need to draw a plane

Asked by joy
on 24 Nov 2012

Hello I have a 3d plot like this

in this fig I need to draw plane at z axis at 3.9*10^-3,,,from this plane i can specify which points lies above 0.0039 and below of it

any idea////




No products are associated with this question.

1 Answer

Answer by Walter Roberson
on 24 Nov 2012
 Accepted answer

XL = get(gca, 'XLim');
YL = get(gca, 'YLim');
zpos = 0.0039
patch([XL([1 2 2 1 1]), YL([1 1 2 2 1]), zpos * ones(1,5));


transparency = 0.2;    %mostly clear
patch(XL([1 2 2 1 1]), YL([1 1 2 2 1]), zpos * ones(1,5), [0 .2 .7], 'AlphaData', transparency);
on 24 Nov 2012

using this command,I am getting following to rectify???

??? Error using ==> patch Bad property value found. Object Name : patch Property Name : 'AlphaDataMapping'

Sorry, should be 'FaceAlpha' instead of 'AlphaData'

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!