3D Polar Plot
Updated 8 Mar 2006
Polar3D plots 3 dimensional data given angular and radial ranges. A choice of plot types and interpolation methods is supported by this function. Useful particularly in producing 3D plots sampled on a uniform spacing over a disc.
Version 1.2 introduces the new ?meshl? plot option that allows the user to plot the data without interpolation or modification to the input Zin, and adds a polar axis with suitable tick marks and labels. The output of this option returns the input unchanged as well as the corresponding x and y coordinates, both being the same size as Zin. The ?contourf? plot option has been replaced by the ?meshl? option in this version.
Polar3D(Zin,theta_min,theta_max,Rho_min,Rho_max,meshscale) produces a mesh plot of the data Zin, between theta_min and theta_max, radii Rho_min and Rho_max, with the size of the mesh squares being determined by meshscale; meshscale takes on any real positive value.
Polar3D(Zin,...,plotspec) plots the data as 'surf', 'surfc', 'contour' etc, as set by plotspec.
Polar3D(Zin,..., interpspec) plots the data as mesh plot with 2D 'linear', 'cubic', etc, interpolation over the input data. No interpolation is carried out if the ?meshl? option is used.
[x,y,z] = Polar3D(Zin,...,'off') disengages the plot function and returns the (x,y,z) plot data.
P = peaks(49);
Version 1.1. (June 2005). meshscale updated so that Polar3D could take on both integer and non-integer values greater than 0.
Version 1.2. (Mar 2006) introduced the ?meshl? plot option.
J De Freitas (2023). 3D Polar Plot (https://www.mathworks.com/matlabcentral/fileexchange/7656-3d-polar-plot), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
- MATLAB > Graphics > 2-D and 3-D Plots > Polar Plots >
Inspired: Fiber modes, 3D Polar Plot, Zernike calculator
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.