0

I used the answer on Plot vector (or arc) onto a rose plot. MATLAB to plot my rose diagram but my plot looks like this:

Rose plot

My code:

circ_plot(BB,'hist',[],20,true,true,'linewidth',2,'color','r')

hold on
plot([0 cos(mean)*a], [0 sin(mean)*a], 'r')  
%// Plot error as many shaded triangles that compose a circular wedge
t = linspace(-Var/2+mean,Var/2+mean,100); %// increase "100" if needed

for k = 1:numel(t)-1
    h = patch([0 cos(t(k))*a cos(t(k+1))*a 0], ...
    [0 sin(t(k))*a sin(t(k+1))*a 0], [.5 0 0], 'edgecolor', 'none');
    %// change color [.5 0 0] to something else if desired. Note also alpha

   set(h,'Facealpha',.3) %// make transparent
end  
%// Place rose on top by rearranging order of axis children
ch = get(gca,'children');
set(gca,'children',[ch(2:end); ch(1)]);

Any ideas how I get my error shaded area do follow the circumference of the circle rather than being a triangle?

Thanks

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
Carrie
  • 1
  • 1
    Would you please provide the necessary data (or some subset thereof) so that your code become runnable? See [mcve]. It seems to me that the **radius** of the red region is simply too large. – Dev-iL Jul 20 '16 at 16:48
  • As per the answer, I'm voting to close this as not reproducible. – Trenton McKinney Nov 02 '22 at 18:37

1 Answers1

0

I don't know why, but today its works fine. I didn't change anything. Thanks for your reply and offer of help. unfortunately due to the sensitive nature of my data I am unable to post. thanks again.

Carrie
  • 1