I'm using proc sgpanel to create scatterplots with regression lines for 2 variables in an overlay. I've jittered the data to see it all but the resulting plot has, in addition to the filled red squares and black circles that I've specified mystery data (small, unfilled circles). What are these, why are they there, and most importantly, how do I make them go away? Code included;
*Assign libraries and formats;
libname in 'U:\';
proc format ;
value tmm
1='predose'
2='24hr'
8='C3W8'
;
=run;
options orientation=landscape nodate nonumber;
ods pdf file="U:\test_plot.pdf" style=styles.arial;
ods graphics / reset=all border=off HEIGHT = 193.8867mm WIDTH = 266.7mm border=off;
title '';
proc sgpanel data=in.check noautolegend;
panelby respond /rows=1 columns=1;
scatter x=time2 y=ki67t_pct / jitter jitterwidth=1 markerattrs=(symbol=circlefilled size=12 color=black );
reg x=time2 y=ki67t_pct;
scatter x=time2 y=ki67b_pct / jitter markerattrs=(symbol=squarefilled size=12 color=red );
reg x=time2 y=ki67b_pct;
where respond='N';
rowaxis label ='% KI67+ on CD8+ T Cells' labelattrs=(size=14 weight=bold) VALUEATTRS= (Weight=Bold) values=(0 to 100 by 20) offsetmin=0.10;
colaxis label=' ' labelattrs=(size=14 weight=bold) VALUEATTRS= (size=10 Weight=Bold) label=" " values=(1, 2, 8) offsetmin=0.15;
format time2 tmm.;
run;
ods pdf close;
ods graphics off;
data, and pdf of the plot attached.
Any help vastly appreciated.
Try adding option NOMARKERS to your reg statements.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.