BookmarkSubscribeRSS Feed
Santoshrk
Obsidian | Level 7

Hello, 

I would like to adjust the segment label position to the top in the attached bar chart. The program is copied below.Segment labels needs to be top aligned (Near to the highlighted portion in Yellow)Segment labels needs to be top aligned (Near to the highlighted portion in Yellow)  

proc template;
define statgraph vbarplot;
dynamic _ticklist_;
begingraph / collation=binary;
entrytitle '';
layout overlay / xaxisopts=(type=Discrete discreteOpts=(tickValueList=_ticklist_
tickValueListPolicy=Union tickvaluefitpolicy=rotate) label = "X axis Label")
yaxisopts=(labelFitPolicy=Split label = "Number of Subjects" linearopts=(integer=true) )
cycleattrs=true ;
barchart X=category Y=count / primary=true Group=trtn NAME="VBAR" groupdisplay=cluster
barwidth =1 clusterwidth = 0.65
SEGMENTLABEL = TRUE ;
discretelegend "VBAR"/ location=outside halign=center valign=bottom title=" ";
endlayout;
endgraph;
end;
run;

proc sgrender data=dummy template=vbarplot;
run;

1 REPLY 1
Ksharp
Super User
proc summary data=sashelp.class nway;
class age sex;
var height;
output out=class sum=;
run;
data class;
set class;
y=height-2;
run;


proc sgplot data=class;
vbarparm category=age response=height/group=sex groupdisplay=cluster ;
scatter x=age y=y/markerchar=height group=sex groupdisplay=cluster 
 markercharattrs=(color=black);
run;

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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