In the sgplot code below, the Asterisk symbol does not take the color defined by the code, displays lightgreen instead of blue.
ods graphics / attrpriority=none;
proc sgplot data=unk;
title 'Scatter Plot';
styleattrs datacolors=(blue lightyellow lightsalmon)
datasymbols=(Asterisk Circlefilled Diamondfilled);
scatter x=S y=M / group=A
filledoutlinedmarkers
markeroutlineattrs=(color=black thickness=1);
run;
Still the same error (attributes do not display the color defined in the code) with attribute map dataset, dataset and code below:
data mattrs;
retain linecolor "black";
infile datalines truncover;
input ID Value markersymbol fillcolor;
datalines;
U N circlefilled lightyellow
U R diamondfilled lightsalmon
U S asterisk blue
;
run;
data unk;
infile datalines truncover;
input S $ Value $ M ID $;
datalines;
ZB N 3 U
ZB R 5 U
ZB S 10 U
YQ N 11 U
YQ R 6 U
YQ S 7 U
XI N 1 U
XI R 5 U
XI S 2 U
TO N 9 U
TO R 3 U
TO S 10 U
;
run;
proc sgplot data=unk dattrmap=mattrs;
scatter x=S y=M / group=Value attrid=U;
yaxis min=0 max=100 type=log logstyle=logexpand logbase=10 grid;
run;
This works for me.
data mattrs;
retain linecolor "black";
infile datalines truncover;
input ID $ Value $ markersymbol : $20. markercolor : $20.;
datalines;
U N circlefilled red
U R diamondfilled lightsalmon
U S asterisk blue
;
run;
data unk;
infile datalines truncover;
input S $ Value $ M ID $;
datalines;
ZB N 3 U
ZB R 5 U
ZB S 10 U
YQ N 11 U
YQ R 6 U
YQ S 7 U
XI N 1 U
XI R 5 U
XI S 2 U
TO N 9 U
TO R 3 U
TO S 10 U
;
run;
proc sgplot data=unk dattrmap=mattrs;
scatter x=S y=M / group=Value attrid=U;
yaxis min=0 max=100 type=log logstyle=logexpand logbase=10 grid;
run;