BookmarkSubscribeRSS Feed
dr2014
Quartz | Level 8

Hi all,

I am creating a stacked bar chart for percent scored on test which is categorized in difefrent groups as low , midddle and high. Below is the data and my code. The 'Score' variable is in percent.

(1)  I need to reduce the width of the bar and

(2) also add 'Score' of the 'Category' to each segment in the bars.

(3) Remove the word 'Category' on the legend.

(4) adjust the percent 'interval' on the y-axis and add the symbol % next to the numbes on the grid lines. Please advise as soon as possible. Thanks.

proc sgplot data=want;

title 'Distribution XXXXX;

vbar Test / response=value group=Category;

xaxis display=(nolabel);

yaxis grid label='Percent %';

run;

 

Category

Test

Score

low

CHE

11

middle

CHE

83

high

CHE

3

low

PHY

7

middle

PHY

54

high

PHY

38

low

MAT

10

middle

MAT

69

high

MAT

19

low

BIO

16

middle

BIO

33

high

BIO

51

1 REPLY 1
dr2014
Quartz | Level 8

Addtionally, when I output the chart I get a inner and outer box. Is there a way to get rid of it?

Thanks.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

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
  • 659 views
  • 0 likes
  • 1 in conversation