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

Hi everyone, 

Should be a pretty easy thing to do, but my outlineattrs just isn't working (won't become functional/turn blue). Would appreciate if anyone had any suggestions. See code below. 

 

Proc SGPLOT data=Mitacs.New2;
   histogram age / fillattrs=(color=CX008998) outlineattrs=(color=CXBEBEBE size=1pt);
   xaxis max=100 display=(nolabel);
   yaxis display=(nolabel);
Run;

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

I don't see that option listed in the documentation.

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n17xrpcduau1f8n1c1nhe477pv18.htm#p...

 

Unfortunately not seeing a way to change the colour. Depending on how important that is, you may want to pipe your code to the GTL code using the TMPLOUT option on PROC SGPLOT and then modify it there.

 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p073bl97jzadkmn15lhq58yiy2uh.htm#n...

View solution in original post

4 REPLIES 4
Reeza
Super User

I don't see that option listed in the documentation.

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n17xrpcduau1f8n1c1nhe477pv18.htm#p...

 

Unfortunately not seeing a way to change the colour. Depending on how important that is, you may want to pipe your code to the GTL code using the TMPLOUT option on PROC SGPLOT and then modify it there.

 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p073bl97jzadkmn15lhq58yiy2uh.htm#n...

agille05
Fluorite | Level 6

Thank you! That would explain it. May just have to leave it. 

 

Thank you for taking the time to answer this 🙂

Reeza
Super User
Proc SGPLOT data=sashelp.class tmplout='/home/fkhurshed/Demo1/graph_histogram.sas';
   histogram age / fillattrs=(color=CX008998);
   xaxis max=100 display=(nolabel);
   yaxis display=(nolabel);
Run;

*code from graph_histogram code, modifying template name;
proc template;
define statgraph myHistogram;
begingraph / collation=binary;
layout overlay / xaxisopts=( display=( ticks tickvalues line ) type=linear linearopts=( viewmax=100 ) ) y2axisopts=(labelFitPolicy=Split) yaxisopts=( display=( ticks tickvalues line ) labelFitPolicy=Split type=auto ) y2axisopts=(labelFitPolicy=Split);
   Histogram 'Age'n / primary=true binaxis=false FillAttrs=(Color=CX008998) outlineattrs =(color=red) LegendLabel="Age";
endlayout;
endgraph;
end;
run;

proc sgrender data=sashelp.class template=myHistogram;
run;
ballardw
Super User

What does your LOG show when you run that?

I don't find OUTLINEATTRS in the options for the HISTOGRAM statement for SGPLOT: 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/grstatproc/n17xrpcduau1f8n1c1nhe477pv18.htm

 

I think you are trying to use a Graphics Template Language option that belongs in Proc Template code with Sgplot.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 815 views
  • 1 like
  • 3 in conversation