How to change the color and remove values from wind rose?
3 次查看(过去 30 天)
显示 更早的评论
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');
0 个评论
采纳的回答
Joseph Cheng
2015-9-23
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);
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Red 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!