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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1032 views
  • 0 likes
  • 2 in conversation