BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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;
1 REPLY 1
Cynthia_sas
SAS Super FREQ
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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 627 views
  • 0 likes
  • 2 in conversation