Help using Base SAS procedures

Question regarding Pie Charts

Reply
N/A
Posts: 0

Question regarding Pie Charts

Hi Guys,

I'm trying to create a 2d pie graph using SAS on seperating male employees into each birthmonth (eg % all male born in july etc). However, when I try to do this I just end up getting a pie graph with only 10sections (when there are 12months in the year and Ive checked viewtables to confirm that there are male employees born in each month) and the section titles are meaningless such as '2.4' instead of showing each month (not sure how I can exactly do this). Wondering if you guys can kindly help me out.

My commands look something like this:

proc gchart data=employees;
pie birth_month;
where Gender='F';
run;
SAS Super FREQ
Posts: 8,869

Re: Question regarding Pie Charts

Posted in reply to deleted_user
Hi:
For a numeric variable (such as month -- if your month is a numeric variable), PROC GCHART determines the midpoints as though month were a continuous variable -- which may not be what you want. In the documentation of the PIE statement:
http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#gchart-pie.htm

...you will find several options, such as the DISCRETE option and/or the MIDPOINTS and/or the LEVELS option, which may help you.

There is a separate forum for posting SAS/GRAPH and ODS Graphics questions, which is monitored by the SAS/GRAPH folks. In the future, you might want to post SAS/GRAPH questions there.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 101 views
  • 0 likes
  • 2 in conversation