BookmarkSubscribeRSS Feed
CharlieHe
Fluorite | Level 6
I know we can change marker size in the template using markerattrs=(size=10px).
I tried to do that in style (markersize = 10px) but it seems do not work. Is there a way to set maker size in style?

Thanks,
Yeming

Here is the program:

proc template;
define style Styles.MyJournal;
parent = styles.Journal;
style GraphData1 from GraphData1 /
markersize = 10px
markersymbol = "CircleFilled";
style GraphData2 from GraphData2 /
markersize = 10px
markersymbol = "plus";
style GraphData3 from GraphData3 /
markersize = 10px
markersymbol = "X";
style GraphData4 from GraphData4 /
markersymbol = "triangle";
style GraphData5 from GraphData5 /
markersymbol = "tilde";
style GraphData6 from GraphData6 /
markersymbol = "ibeam";
style GraphData7 from GraphData7 /
markersymbol = "square";
style GraphData8 from GraphData8 /
markersymbol = "asterisk";
style GraphData9 from GraphData9 /
markersymbol = "diamond";
style GraphData10 from GraphData10 /
markersymbol = "union";
style GraphData11 from GraphData11 /
markersymbol = "hash";
style GraphData12 from GraphData12 /
markersymbol = "tack";
run;

proc format;
value vf 5 = 'GraphValueText';
run;

data x;
array y[20] y0 - y19;
do x = 1 to 20; y = x - 0.5; end;
do x = 0 to 10 by 5; output; end;
label y0 = 'GraphLabelText' x = 'GraphLabelText';
format x y0 vf.;
run;

%macro l(i, l);
reg y=y&i x=x / lineattrs=&l markerattrs=&l curvelabel=" &l"
curvelabelpos=max;
%mend;

ods listing style=myjournal;
proc sgplot noautolegend;
title 'GraphTitleText';
%macro d; %do i = 1 %to 12;
reg y=y%eval(19-&i) x=x / lineattrs=GraphData&i markerattrs=GraphData&i
curvelabel=" GraphData&i" curvelabelpos=max;
%end; %mend; %d
%l(19, GraphDataDefault)
%l( 6, GraphFit)
%l( 5, GraphFit2)
%l( 4, GraphPredictionLimits)
%l( 3, GraphConfidence)
%l( 2, GraphGridLines)
%l( 1, GraphOutlier)
%l( 0, GraphReference)
xaxis values=(0 5 10);
run;
2 REPLIES 2
Jay54
Meteorite | Level 14
MarkerSize changes from GraphData1-N are not supported.

A work around for some cases (where number of groups is known) is to transpose your data into columns, and use a separate scatter statement for each column with MARKERATTRS=(SIZE=15) in the syntax.

If it is important that groups support marker size, please call it in to SAS Tech Support.
CharlieHe
Fluorite | Level 6
Hi Sanjay,

Thanks.
Yeming

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 3654 views
  • 3 likes
  • 2 in conversation