3D Polar Plot (Scripts) Publisher's description
from Ken Garrard
Polarplot3d produces surface and mesh plots for three dimensional polar data.
Polarplot3d produces surface and mesh plots for three dimensional polar data. A labeled polar axis is drawn at a fixed height or it can follow the surface contour at maximum radius. A polar grid can also be drawn on top of the surface.
This function is based on polar3d by J De Freitas, file exchange ID 7656.
Polarplot3d calls parse_pv_pairs, file exchange ID 9082.
The input parameters are a matrix of magnitudes, Zp, and a list of property,value pairs that modify the default plot behavior. Each column of Zp contains information along a single half-meridian and each row gives height values along a circular arc. By default Zp is assumed to be increasing in radius down each column and increasing in angle (counter-clockwise) along each row. The plot is drawn over a full circle of unit radius.
The 'AngularRange' and 'RadialRange' properties can be used to specify the upper and lower angular and radial limits over which the data is plotted. The relative ordering of the angular and radial range vectors is used to determine the angular and radial direction sense of the rows and columns of Zp.
With the 'AxisLocation' property, the polar axis can be placed at the minimum, maximum or mean value of Zp at the largest radius, at the top or bottom of the plot box, at a user specified location, or it can follow the surface at the perimeter of the data. The polar axis tick mark spacing can be adjusted with the 'TickSpacing' property.
Default surface coloring is according to the height values in Zp. This can be changed by supplying a matrix the same size as Zp as the value of the 'ColorData' property.
A scaling parameter can be specified to interpolate the data onto a finer or coarser mesh. The output Cartesian data is returned in three matrices.
The plot in the screenshot was produced with the following commands.
P = peaks(101); % generate interesting data
P = (P+rot90(P)-rot90(3*fliplr(P)));
P(62:end,:) = ;
figure; % draw 3d polar plot
'AngularRange',[30 270]*pi/180,'RadialRange',[80 400]);
set(gca,'DataAspectRatio',[10 10 1],'View',[-64,26],...
'Xlim',[-450 450],'Xtick',[-400 -200 0 200 400],...
'Ylim',[-450 450],'Ytick',[-400 -200 0 200 400]);
The zip file contains the polarplot3d function and a published m-file with example plots.
Version 1 Original submission
Version 2 Input argument style changed to 'property',value pairs
Version 2.1 Added 'ColorData' property
System Requirements:MATLAB 7.5 (R2007b)
Program Release Status: New Release
Program Install Support: Install and Uninstall