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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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