How to change the color and remove values from wind rose?

3 visualizaciones (últimos 30 días)
Karolina
Karolina el 23 de Sept. de 2015
Respondida: Joseph Cheng el 23 de Sept. de 2015
I would like to change the color of my wind rose, but the code which I used does not work properly. After applying the code, which is below, I received the result which is attached below. I would also like to remove the values 100000-400000 from the image and the values for angles. Any suggestions? Thank you in advance.
h=rose(A*pi/180,16); % A is my data
view(90, -90);
set(h, 'LineWidth',1,'Color','k');
x=get(h,'Xdata');
y=get(h,'Ydata');
g=patch(x,y,'k');

Respuesta aceptada

Joseph Cheng
Joseph Cheng el 23 de Sept. de 2015
I think i understand what you're trying to accomplish so you can try something like the example below:
%generate some dummy data
A = -abs(pi*randn(10000,1));
%display the rose
h=rose(A,16)
view(90,-90)
set(h, 'LineWidth',1,'Color','k');
%get lines for patching
x=get(h,'Xdata');
y=get(h,'Ydata');
%if you examine the x and y you see that the points are in order but go to (0,0)
%if deletion of 0 data from x,y points it should only have the perimeter
todel = x==0;
x(todel)=[];
y(todel)=[];
g=patch(x,y,'k');
%adjust the transparency of the patch so the internal lines show up
set(g,'facealpha',.5)
%now to delete angles and values
txt = findall(gcf,'type','text');
% delete the text objects
delete(txt);

Más respuestas (0)

Categorías

Más información sobre Red en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by