フィルターのクリア

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

2 ビュー (過去 30 日間)
Karolina
Karolina 2015 年 9 月 23 日
回答済み: Joseph Cheng 2015 年 9 月 23 日
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');

採用された回答

Joseph Cheng
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 件)

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by