Hello, can sas draw this picture and I think it is a donut plot with different radius and how to adjust radius with comprising parts?
Welcome to the SAS forums.
Please embed your content directly into the forum rather than use attachments, especially zip files.
And please show any sample data and what you've tried to date.
@Charles_Liu wrote:
Hello, can sas draw this picture and I think it is a donut plot with different radius and how to adjust radius with comprising parts?
Data anly;
input country $12. numpt ;
cards;
韩国 4812
意大利 2036
伊朗 1501
日本 980
法国 191
德国 180
西班牙 128
新加波 106
美国 100
科威特 56
巴林 47
泰国 42
英国 40
瑞士 40
澳大利亚 32
马来西亚 29
挪威 25
加拿大 24
阿联酋 21
伊拉克 19
荷兰 18
奥地利 18
越南 16
瑞典 14
以色列 12
黎巴嫩 10
克罗地亚 8
比利时 8
芬兰 7
希腊 7
冰岛 6
阿曼 6
墨西哥 5
俄罗斯 5
丹麦 5
巴基斯坦 4
白俄罗斯 3
捷克 3
巴西 2
埃及 2
葡萄牙 2
约旦 1
突尼斯 1
;
Run;
How to generate this picture in sas? Donut with different radius?
For historical reference, that looks like a variation on the Nightingale coxcomb chart, sometimes called the polar rose chart, polar area chart, or "windrose" graph. It was introduced by Florence Nightengale.
To visualize these data, I recommend a horizontal bar chart, like the following,
Data anly;
input country $14. numpt ;
cards;
South Korea 4812
Italy 2036
Iran 1501
Japan 980
France 191
Germany 180
Spain 128
Singapore 106
United States 100
;
proc sgplot data=anly;
hbar country / response=numpt categoryorder=respdesc datalabel
colorresponse=numpt
colormodel=(CX888888 CX3288BD CX66C2A5 CXABDDA4 CXE6F598 CXFFFFBF CXFEE08B CXFDAE61 CXF46D43 CXD53E4F);
/* or use words like (lightgrey blue green yellow orange red); */
xaxis grid;
run;
If you decide to combine the smaller countries into an "Other" category, you can use PROC FREQ, as described in this blog post: "An easy way to make a "Top 10" table and bar chart in SAS."
Thanks a lot and I solve the problerms with proc ganno base on pie chart~
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.