SAS强制为图例SGPANEL上未显示的线显示图例

时间:2018-10-23 10:17:37

标签: sas

因此,我希望在每页上显示所有8种治疗方法的完整图例,我有48位受试者,并且他们都接受了8种治疗方法中的1种(每项治疗方法有6种受试者),因此出现在第1页上的前4种都已采用处理1,因此只有处理1出现在图例中,代码为:

    /* report section*/
    ods rtf file="&place.\&outnum. &outnam1..rtf" style=tfl bodytitle nogtitle nogfootnote ; 
       ods listing close; 
       ods graphics on / height=7.8cm width=25cm border=off ;
       ods listing; 
    %macro paging(p=);
    proc sgpanel data=outputa.f_conc_&type (where=(page=&p)); 
       footnote1 j=l f=courier h=9pt "Source Listing: &slist; Produced: &mdate. &mtime. - Page &p of 10";
       footnote2 j=l f=courier h=9pt "Lower Limit of Quantitation - 1.00 ng/mL.";
       title1 f=courier h=9pt justify=c "&study";
       title2 f=courier h=9pt justify=c "&outnum";
       title3 f=courier h=9pt justify=c "&outnam1";
       title4 f=courier h=9pt justify=c "&outnam2";

          panelby subject / rows=2 columns=2 novarname;
         series x=atptn y=_1    / legendlabel="Trt 1"   name='_1'  lineattrs=(color=blue thickness=1 pattern=1);
         series x=atptn y=_2    / legendlabel="Trt 2"  name='_2'  lineattrs=(color=red thickness=1 pattern=1);
         series x=atptn y=_3     / legendlabel="Trt 3"  name='_3'  lineattrs=(color=green thickness=1 pattern=1);
         series x=atptn y=_4     / legendlabel="Trt 4"  name='_4'  lineattrs=(color=black thickness=1 pattern=1);
         series x=atptn y=_5    / legendlabel="Trt 5"  name='_5'  lineattrs=(color=orange thickness=1 pattern=1);
         series x=atptn y=_6    / legendlabel="Trt 6" name='_6'  lineattrs=(color=purple thickness=1 pattern=1);
         series x=atptn y=_7     / legendlabel="Trt 7" name='_7'  lineattrs=(color=magenta thickness=1 pattern=1);
         series x=atptn y=_8     / legendlabel="Trt 8" name='_8'  lineattrs=(color=brown thickness=1 pattern=1);
         keylegend '_1' '_2' '_3' '_4' '_5' '_6' '_7' '_8' / across=4 down=2;
       colaxis label="Time Post Dose (h)" labelattrs=(family='Courier') values=(0,1,2,3,4,6,8,10,12,16,24,36,48) min=0 max=48;
       rowaxis label="KVD900 Concentration (ng/mL)" &yaxis;
    run;

    %mend paging;
    %paging(p=1);
    %paging(p=2);
    %paging(p=3);
    %paging(p=4);
    %paging(p=5);
    %paging(p=6);
    %paging(p=7);
    %paging(p=8);
    %paging(p=9);
    %paging(p=10);
    ods rtf close; 

在此先感谢您提供的任何帮助,我知道可以通过GTL实现,但是如果有通过SGPANEL的更简便方法,我很想知道我正在使用SAS 9.3,如果有任何问题,请问:)

0 个答案:

没有答案