To create Polar Shaded plot
10 views (last 30 days)
Show older comments
X,Y,Z DATA ..all n*1 array
X is angle, with NEWS convention, Y is radius, Z is data.
I need shaded plot of data, onto a polar plot of radius information in Y angle information in X and data information in Z
Basically a rose plot sans the discreet histogram.
Sorry cant figure out any solution.
Accepted Answer
Mike Garrity
on 22 Mar 2016
Edited: Mike Garrity
on 22 Mar 2016
If you don't see a polar plot which does what you want, you can use the pol2cart function to get to any of the Cartesian techniques, such as the ones I described in this blog post.
% Made up data
npts = 200;
theta = 2*pi*rand(npts,1);
r = rand(npts,1);
v = cos(theta) .* sin(pi*r);
% Convert to cartesian
[x,y] = pol2cart(theta,r);
% Interpolate onto grid
[xg,yg] = meshgrid(linspace(-1,1,125));
F = scatteredInterpolant(x,y,v);
% Mask out extrapolation
b = boundary(x,y);
inmask = inpolygon(xg(:),yg(:), x(b),y(b));
vg = F(xg,yg);
vg(~inmask) = nan;
% Call pcolor
polar(nan,nan)
hold on
h = pcolor(xg,yg,vg);
h.EdgeColor = 'none';
colorbar

More Answers (0)
See Also
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!