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-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 1862 views
  • 2 likes
  • 2 in conversation