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

One of my response values is 90 and other one is 0.02 , in order to show that, I would like to use different colors for groups based on the legend color

 

title " ";
ods listing style=listing;
ods graphics / width=5in height=2.81in;
ods graphics / reset=ALL outputfmt=PNG imagename="ByDilution";
ods pdf file="&graph_loc.Target_Bargraph_Exp5.pdf";
proc sgplot data=main_subset PCTLEVEL=GRAPH;
format replicate $method.;
styleattrs datacolors=(Blue red) datacontrastcolors=(Blue red);
vbar Sample_name / response = Mapped_percent group=replicate groupdisplay = cluster nooutline Clusterwidth=1 datalabel
stat=mean dataskin=pressed;
xaxistable Sample_name / colorgroup=replicate ;
xaxis display=(nolabel noticks) discreteorder=data FITPOLICY=ROTATE;
yaxis label="% Reads";
keylegend /title='' noborder autooutline;
run;

ods pdf close;

Stalk_0-1699307699290.png

 

1 ACCEPTED SOLUTION
3 REPLIES 3
Stalk
Pyrite | Level 9

I think I was able to change the data label colors using text, but how do I rotate the data values?

Stalk_0-1699324658295.png

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 3 replies
  • 1176 views
  • 0 likes
  • 2 in conversation