Customizing the Kaplan-Meier Survival Plot

Displaying Other Style Elements

You can use the approach from the previous example to display other style elements:

proc template;
   source styles.htmlblue / expand file='style.tmp';
run;

data _null_;
   infile 'style.tmp' pad;
   input line $char80.;
   file print;
   if index(lowcase(line), ' graphdata1 ') then y + 1;
   if y then put line $char80.;
   if y and index(line, ';') then stop;
run;

This example displays the GraphData1 style element. The results are displayed in FigureĀ 54.

Figure 54: GraphData1 Style Element

   class GraphData1 /                                                           
      fillpattern = "L1"                                                        
      markersymbol = "circle"                                                   
      linestyle = 1                                                             
      contrastcolor = GraphColors('gcdata1')                                    
      color = GraphColors('gdata1');                                            


The following steps display all the GraphFonts style elements from all the styles:

proc template;
   source styles / file='style.tmp';
run;

data _null_;
   infile 'style.tmp' pad;
   length style $ 80;
   retain style;
   input line $char80.;
   file print;
   if index(lowcase(line), 'define style') then style = line;
   if index(lowcase(line), ' graphfonts ') then do;
      y + 1;
      put style $char80.;
   end;
   if y then put line $char80.;
   if index(line, ';') then y = 0;;
run;

The results of this step are not displayed. You can use this approach to help you better understand the options that are available for modifying styles. The SOURCE statement specifies a single-level value of STYLES rather than a specific style name such as STYLES.HTMLBLUE, so all templates that begin with STYLES as the first level (all style templates) are written to the file. The DATA step displays all definitions of GraphFonts and the names of all styles that define the GraphFonts style element.

You can insert the name of another style element (in lowercase with a leading and trailing blank) in the preceding programs in place of 'graphdata1' or 'graphfonts'. After you display a style element, you can modify the definition and create a new style that uses the modified definition, as in the example in the section Displaying a Style and Extracting Font Information. Some of the style elements that you might want to display and modify are listed in Table 3.

Table 3: Style Elements

AfterCaption GraphAnnoText GraphHeaderBackground List3
Batch GraphAxisLines GraphHistogram ListItem
Body GraphBackground GraphInitial Note
BodyDate GraphBand GraphLabel2Text NoteBanner
ByContentFolder GraphBar GraphLabelText NoteContentFixed
Byline GraphBlock GraphLegendBackground Output
BylineContainer GraphBlockHeader GraphMissing PageNo
Caption GraphBorderLines GraphOther Pages
Color_list GraphBox GraphOutlier PagesProcLabel
Colors GraphBoxMean GraphOutlines PagesTitle
Container GraphBoxMedian GraphOverflow Paragraph
ContentFolder GraphBoxWhisker GraphPhaseBox Parskip
ContentProcLabel GraphClipping GraphPrediction PrePage
ContentTitle GraphColors GraphPredictionLimits ProcTitle
Contents GraphConfidence GraphReference ProcTitleFixed
Continued GraphConfidence2 GraphRunTest RowFooter
Data GraphConnectLine GraphSelection RowFooterEmphasis
DataEmphasis GraphContour GraphStars RowFooterEmphasisFixed
DataEmphasisFixed GraphControlLimits GraphTitle1Text RowFooterFixed
DataFixed GraphData1 GraphTitleText RowFooterStrong
DataStrong GraphData2 GraphUnderflow RowFooterStrongFixed
DataStrongFixed GraphData3 GraphUnicodeText RowHeader
Date GraphData4 GraphValueText RowHeaderEmphasis
Document GraphData5 GraphWalls RowHeaderEmphasisFixed
DropShadowStyle GraphData6 GraphZoneA RowHeaderFixed
ErrorBanner GraphData7 GraphZoneB RowHeaderStrong
ErrorContentFixed GraphData8 GraphZoneC RowHeaderStrongFixed
ExtendedPage GraphData9 Header SysTitleAndFooterContainer
FatalBanner GraphData10 HeaderEmphasis SystemFooter
FatalContentFixed GraphData11 HeaderEmphasisFixed SystemTitle
Fonts GraphData12 HeaderFixed Table
Footer GraphDataDefault HeaderStrong ThreeColorAltRamp
FooterEmphasis GraphDataText HeaderStrongFixed ThreeColorRamp
FooterEmphasisFixed GraphEllipse HeadersAndFooters TitleAndNoteContainer
FooterFixed GraphError Index TitlesAndFooters
FooterStrong GraphFinal IndexItem TwoColorAltRamp
FooterStrongFixed GraphFit IndexProcName TwoColorRamp
Frame GraphFit2 IndexTitle UserText
Graph GraphFloor LayoutContainer WarnBanner
GraphAltBlock GraphFonts LineContent WarnContentFixed
GraphAnnoLine GraphFootnoteText List
GraphAnnoShape GraphGridLines List2


Last updated: December 09, 2022