Data visualization with SAS programming

Symbols and Lines in Gpanel-Graphic

Reply
Contributor
Posts: 41

Symbols and Lines in Gpanel-Graphic

Hallo,

i created a Panelgraph--Macro and have some problems with my legend.
If i do the graphs scatter and Reg alone everything works fine: with the scatter-Graph i get a symbol-legend for my wildtype-subgroups. The Reg-Graph gives me the legend for the Regression-Lines for my wildtype-subgroups. If i do both like below in my syntax i get a legend with symbols and lines not just for my two wildtype-subgroups, but also for a third group (i think missing values?), also if i dont have any missing values.

Do you have any idea what i can do for having symbols and lines in my legend and that just for my wildtype-Subgroups?


%Macro Panelgraf(Vari=, name=);

proc sgpanel data=final;
panelby genotype sex /layout=lattice novarname;

Scatter x=age y=&Vari /Group=wildtype name='scatter' ;
Reg x=age y=&Vari / Group=wildtype name='Reg' Degree=1 nomarkers;
keylegend 'scatter' 'Reg';

run;
ODS GRAPHICS OFF;
%Mend Panelgraf;

thank you in advance (i use SAS 9.2. Phase 1).

marie
SAS Super FREQ
Posts: 890

Re: Symbols and Lines in Gpanel-Graphic

Hey Marie,

The issue you found was fixed in the phase 2 release of SAS 9.2. However, because you are doing a DEGREE=1 regression, you can work around this issue by specifying MAXPOINTS=2 on your REG statement. Let me know if this works for you.

Thanks!
Dan
Contributor
Posts: 41

Re: Symbols and Lines in Gpanel-Graphic

Hi Dan,

thank you very much. It is working Smiley Happy
Ask a Question
Discussion stats
  • 2 replies
  • 134 views
  • 0 likes
  • 2 in conversation