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
Diamond | Level 26
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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