MATLAB: Problem with filling roseplot – truncated colours

colorpatchroseroseplot

Hi, I am trying to fill my roseplot, but it keeps giving me strange truncations / ends… What is going wrong?
rdir =[270 190 100 250 270 330 250 30 300 310 180 250 350 310 250 260 250 350 290 220 340 250] /180 *pi();
% version 1
h = rose(rdir); x = get(h, 'XData'); y = get(h, 'YData'); p = patch(x, y, 'r') ;
view(90,270);

Best Answer

It works for me (MATLAB 2012b):
rdir = [270,190,100,250,270,330,250,30,300,310,180,250,350,310,250,260,250,350,290,220,340,250] /180 *pi();
h = rose(rdir);
x = get(h, 'XData');
y = get(h, 'YData');
p = patch(x, y, 'r') ;
view(90,270);
Otherwise you could use the function given here: