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

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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