This submission provides ezplane(), a simple function for plotting a plane given its equation. The equation is represented as a 1x4 vector. Namely, the plane A*x+B*y+C*z+D=0 would be plotted with the syntax ezplane([A,B,C,D]).
Note that the plane needn't necessarily be expressible as a surface z(x,y), as illustrated by Example 2 below. Note also that this function deliberately avoids the use of fimplicit3(), which at this time has problems rendering planes.
Example 1: The unit simplex
ezplane([1,1,1, -1]);
xlabel x; ylabel y; zlabel z; grid on;axis equal
axis([0 1 0 1 0 1]*1.3)
Example 2: Pass additional arguments specifying surface properties
ezplane([1,1/2,0, -1],'FaceColor','red');
xlabel x; ylabel y; zlabel z; grid on;axis equal
axis([0 1 0 1 0 1]*2.1)
Cite As
Matt J (2024). ezplane (https://www.mathworks.com/matlabcentral/fileexchange/161351-ezplane), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2023b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.