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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.