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

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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