user51145
user51145

Reputation: 11

SAS sgplot: not the correct markers for the different groups

In SAS, when I use the following code, my rtf file shows everything like I want it to be. But in 'Results - Sas Report' every marker is a circle (although they are all different colors). How can I change this, so it looks exactly the same as in the rtf file?

    %modstyle(parent= statistical, name= mystyle, type= CLM,
    colors= red green blue purple,
    markers= star plus circle square);

    ods rtf file=".../scatterplot.rtf" style=mystyle;
    proc sgplot data=datafile;
       scatter y=y x=x /group=groups;
    run;
    ods rtf close;

Upvotes: 1

Views: 595

Answers (1)

Joe
Joe

Reputation: 63424

Your problem is that you're not adding the style commands to the current HTML destination (which is what Results outputs to, assuming you're in 9.3+).

You can easily override this. Note the one extra line I added (the ods html line). I don't specify a location for the file - that way it just overrides the current option without changing the destination.

%modstyle(parent= statistical, name= mystyle, type= CLM,
colors= red green blue purple,
markers= star plus circle square);

ods rtf file="c:\temp\scatterplot.rtf" style=mystyle;
ods html style=mystyle;
proc sgplot data=sashelp.class;
   scatter x=height y=weight /group=age;
run;
ods rtf close;

Upvotes: 1

Related Questions