problem with filling roseplot - truncated colours

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);

 Respuesta aceptada

Stephen23
Stephen23 el 12 de Sept. de 2016
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:

2 comentarios

Arjan Reesink
Arjan Reesink el 12 de Sept. de 2016
Editada: Arjan Reesink el 12 de Sept. de 2016
I have 2016a - the basic function no longer works for me... The rose2.m file seems to do the trick though! Thanks!
Stephen23
Stephen23 el 12 de Sept. de 2016
@Arjan Reesink: it seems that there has been a change in the code, and the nodes are returned in a different order. You might be able to sort them into the required order.
You should definitely make a bug report about this new behavior:

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.

Preguntada:

el 12 de Sept. de 2016

Comentada:

el 12 de Sept. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by