BookmarkSubscribeRSS Feed
dsam
Fluorite | Level 6
My code is below: what should I change if I want all 8 subjids in one page in a matrix ?
proc template;
  define style styles.mystyle;
  parent=styles.default;
 
              class titlesandfooters/
              color=black
              backgroundcolor=white;
 
 
           class body, data /
fontfamily="Courier new"
fontsize=8pt
backgroundcolor=white
color=black;
 
                style GraphFonts /
                'GraphDataFont'      = ("Courier new", 8pt)
                'GraphUnicodeFont'   = ("Courier new", 8pt)
                'GraphValueFont'     = ("Courier new", 8pt)
                'GraphLabelFont'     = ("Courier new", 8pt)
                'GraphFootnoteFont'  = ("Courier new", 8pt)
                'GraphTitleFont'     = ("Courier new", 8pt)
                'GraphAnnoFont'      = ("Courier new", 8pt)
                'NodeLinkLabelFont'  = ("Courier new", 8pt)
                'GraphLabel2Font'    = ("Courier new", 8pt)
                'GraphTitle1Font'    = ("Courier new", 8pt)
                'NodeTitleFont'      = ("Courier new", 8pt)
                'NodeLabelFont'      = ("Courier new", 8pt)
                'NodeInputLabelFont' = ("Courier new", 8pt)
                'NodeDetailFont'     = ("Courier new", 8pt)
                ; 
          style fonts /                                                           
             'footFont' = ("Courier new",8pt)                                     
             'docFont' = ("Courier new",8pt)                                      
             'headingFont' = ("Courier new",8pt)                                  
             'headingEmphasisFont' = ("Courier new",11pt,bold italic)             
             'FixedFont' = ("Courier new",2)                                      
             'BatchFixedFont' = ("SAS Monospace, Courier",2)                      
             'FixedHeadingFont' = ("Courier new",2)                               
             'FixedStrongFont' = ("Courier new",2,bold)                           
             'FixedEmphasisFont' = ("Courier new",2,italic)                       
             'EmphasisFont' = ("Courier new",8pt,italic)                          
             'StrongFont' = ("Courier new",8pt,bold)                              
             'TitleFont' = ("Courier new",9pt)                                    
             'TitleFont2' = ("Courier new",11pt,bold italic);   
 
    style GraphData1 from GraphData1 /
          contrastcolor=blue linestyle=2;
    style GraphData2 from GraphData2 /
          contrastcolor=red linestyle=1;
    style GraphData3 from GraphData3 /
          contrastcolor=green linestyle=2;
    style GraphData4 from GraphData4 /
          contrastcolor=green linestyle=1;
 
  end;
run;
 

ods listing close;
OPTIONS nobyline nodate nonumber center orientation=landscape pagesize=max;
ods rtf file='G:\Statistical Programming\Lonigutamab\TED\421-01-02\Inbound\Internal\Cohort 2 - Week 24 - N8\Programs\TLG\Outputs\f14-02-eff-chg-matrix.rtf' style=styles.mystyle nogtitle nogfootnote startpage=no image_dpi=300;

title1 justify = left "" justify = right " Page &escapechar.{pageof}";
title2 justify = left "PROTOCOL: 421-01-02" justify = right "Date of Extract: &crdate_iso.";
title3 justify = center "Figure 14.2" ;
title4 justify = center "Cohort 2: Change from baseline for efficacy endpoints" ;
footnote1 justify=left "Program Path: G:\Statistical Programming\Lonigutamab\TED\421-01-02\Inbound\Internal\Cohort 2 - Week 24 - N8\Programs\TLG\f-eff-chg.sas" " &sysdate9:&systime";

proc sgpanel data=f_eff_chg1 ;
panelby usubjid/layout=lattice;
band y=chg lower=0 upper=12/transparency=0.6 name="band";
colaxis label="Change from Baseline" values=(-5 to 3 by 1);

colaxis label="ng/mL" values=(0 to 14000 by 1000);
rowaxis label='Week' values=(0,2,4,6,8,12,16,20,24) ;

series x=avisitn y=prop /lineattrs=(thickness=2px color=green pattern=1) legendlabel="Proptosis (study eye)" markers markerattrs=(symbol=circle) name="series1";
series x=avisitn y=prop2 /lineattrs=(thickness=2px color=green pattern=2) legendlabel="Proptosis (fellow eye)" markers markerattrs=(symbol=circle) name="series2";
series x=avisitn y=dip /lineattrs=(thickness=2px color=red pattern=1) legendlabel="Diplopia" markers markerattrs=(symbol=circle) name="series3";
series x=avisitn y=cas /lineattrs=(thickness=2px color=blue pattern=1) legendlabel="CAS" markers markerattrs=(symbol=circle) name="series4";
series x=avisitn y=conc / colaxis lineattrs=(thickness=2px color=black pattern=5) legendlabel="Plasma Concentration" markers markerattrs=(symbol=circle) name="series5";

text y=y1 x=x1 text=label;
text y=y2 x=x1 text=label2;
text y=y3 x=x1 text=label3;
keylegend "series1" "series2" "series3" "series4" "series5"/ title=' ' ;
by dmdose usubjid ;
run;

2 REPLIES 2
ballardw
Super User

No data included so we can't test this code to see what it generates. In general some example data is almost always needed as the desired solution might require adding variables or restructuring the data.

 

What would a "right axis Pk Conc" be? As in which variable(s).

 

Can you provide an example of what the final graph might look like?

DanH_sas
SAS Super FREQ

Add the ONEPANEL option to the PANELBY statement.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 287 views
  • 0 likes
  • 3 in conversation