Dear community,
I am trying to obtain Figure 1 (see attached document). However when I am using proc template Figure 2 is produced.
Please find below the code that I am using:
data means;
set means;
label mean = "Mean +/- SEM";
elower = mean - stderr;
eupper = mean + stderr;
run;
proc template;
define statgraph mygraphs.meanover;
begingraph;
entrytitle "Mean Measurement Over Time" ;
discreteattrmap name='filling' / ignorecase=true;
value 'A' / markerattrs=(symbol=square color = black size = 12);
enddiscreteattrmap;
discreteattrvar attrvar=classmrk var=armcd attrmap='filling';
layout overlay;
scatterplot x = rep y = mean / group = classmrk name = "treat" yerrorlower = elower yerrorupper = eupper;
endlayout;
endgraph;
end;
run;
proc sgrender data=means template=mygraphs.meanover;
run;
I tried to modify the color of the square BUT I did not find the way of filling the square with a color in order to be overlaid
on top of the mean and SEM bars.
Thank you in advance
Regards
Santos
Use the FILLEDOUTLINEDMARKERS=TRUE option on the SCATTERPLOT statement. You must use this option with a filled marker. You can then control the fill and outline independently. In your case, you have a grouped scatter where you just want to "fill the hole" with the wall color. Use the following options on the SCATTERPLOT statement.
filledoutlineedmarkers=true markerfillattrs=(color=GraphWalls:color)
and change the "square" to "squarefilled" in your attrmap.
Hope this helps!
Dan
Hi Dan,
Thank you very much. It works perfectly.
Next step: Using the proposed solution, I am going to mixed filled and cleared symbols in the same graphic using GTL.
Wish me luck
Regards
Santos
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 16. 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.