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!
I don't see that option listed in the documentation.
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.
I don't see that option listed in the documentation.
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.
Thank you! That would explain it. May just have to leave it.
Thank you for taking the time to answer this 🙂
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;
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.
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!
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.