To create Polar Shaded plot

10 views (last 30 days)
Utsav on 21 Mar 2016
Commented: Utsav on 22 Mar 2016
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.
Utsav on 22 Mar 2016
Sorry I could not find the exact match. However I want to reproduce something like this exactly.

Sign in to comment.

Accepted Answer

Mike Garrity
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
hold on
h = pcolor(xg,yg,vg);
h.EdgeColor = 'none';
Utsav on 22 Mar 2016
Thanks Sir. It was helpful a lot.

Sign in to comment.

More Answers (0)


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!

Translated by