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;
I think I was able to change the data label colors using text, but how do I rotate the data values?
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.