BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
luvscandy27
Quartz | Level 8

The code below: 

proc sgpanel data=clinis_symp;
panelBy group/novarname;
vbarparm category=symp response=pct / groupdisplay=cluster group=symp datalabel=data_label
datalabelattrs=(size=2pt color=black);
keylegend / position=bottom title="Clinical Symptoms" noborder;

run;

 Created the following graph:

luvscandy27_0-1659007989705.png

Now, I'm having trouble figuring out how to remove items from the graph. I 

would like to remove symp and the symptom names from under the bars so 

that I only have the legend, remove the pct and, if possible make it so my data labels do not 

cross over the other bars. Any assistance would be great. 

1 ACCEPTED SOLUTION

Accepted Solutions
Adriaan_Gouws
Obsidian | Level 7

Good day

 

Kindly try incorporate the below into your PROC SGPANEL script. I created some dummy data for the purpose of demonstration.

/*Dummy data*/
data Q01_1;
infile datalines;
input group $ symp $ pct;
datalines;
A PainA 504505
B PainB 454505
C PainC 554505
D PainC 604505
E PainD 404505
F PainA 434505
;
run;

/*Chart*/
ods graphics on / width=10in height=8in;

proc sgpanel data=Q01_1;
panelBy group/novarname;
vbarparm category=symp response=pct /
groupdisplay=cluster group=symp
datalabel datalabelattrs=(size=8) datalabelfitpolicy=rotate;
colaxis display=none;
rowaxis display=(nolabel);
keylegend / position=bottom title="Clinical Symptoms" noborder;
run;

View solution in original post

1 REPLY 1
Adriaan_Gouws
Obsidian | Level 7

Good day

 

Kindly try incorporate the below into your PROC SGPANEL script. I created some dummy data for the purpose of demonstration.

/*Dummy data*/
data Q01_1;
infile datalines;
input group $ symp $ pct;
datalines;
A PainA 504505
B PainB 454505
C PainC 554505
D PainC 604505
E PainD 404505
F PainA 434505
;
run;

/*Chart*/
ods graphics on / width=10in height=8in;

proc sgpanel data=Q01_1;
panelBy group/novarname;
vbarparm category=symp response=pct /
groupdisplay=cluster group=symp
datalabel datalabelattrs=(size=8) datalabelfitpolicy=rotate;
colaxis display=none;
rowaxis display=(nolabel);
keylegend / position=bottom title="Clinical Symptoms" noborder;
run;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1345 views
  • 2 likes
  • 2 in conversation