# td

How to download and try this example

    Usage: pl -gif td.htm
    Source: Steffen R et.al., Epidemiology, Etiology and Impact
    of Traveler's Diarrhea in Jamaica, JAMA 3/3/99 p. 815.

    // set page-wide attributes appropriate for slides (proc page)
    #proc page
      color: white
      backgroundcolor: darkblue
      linewidth: 2
      pagesize: 6.6 4.4
      #if @DEVICE in gif,png
        scale: 0.7
      #endif

    // specify data (proc getdata)
    #proc getdata
    data:
    //    Mild    Moderate Classic  HA      HB
    	23	18	10	10	35
    	21	17	9	16	22
    	28	24	13	24	39
    	30	25	15	24	38
    	28	24	14	16	29

    // set up plotting area (proc areadef)
    #proc areadef
      title: TD (Travelers Diarrhea)\nAttack Rates in Tourists
      titledetails: align=C size=14 adjust=0,0.3
      //rectangle: 1 1 5 2
      areaname: slide
      xrange: 0 6
      yrange: 0 40

    // do filled pink curve (proc lineplot)
    #proc lineplot
      yfield: 1
      fill: pink
      legendlabel: Mild TD

    // do filled blue curve (proc lineplot)
    #proc lineplot
      yfield: 2
      fill: powderblue
      legendlabel: Moderate TD

    // do filled green curve (proc lineplot)
    #proc lineplot
      yfield: 3
      fill: green
      legendlabel: Classic TD

    // do curve w/ diamond points (proc lineplot)
    #proc lineplot
      yfield: 4
      pointsymbol: shape=diamond style=filled fillcolor=orange
      linedetails: width=0.5 color=yellow
      legendlabel: Hotel A

    // do curve w/ square points (proc lineplot)
    #proc lineplot
      yfield: 5
      pointsymbol: shape=square style=filled fillcolor=orange
      linedetails: width=0.5 color=yellow
      legendlabel: Hotel B

    // do axes (proc xaxis, proc yaxis) last so they are not obliterated
    #proc xaxis
      stubrange: 0 6
      stubs: text
    	March\n1996
    	April\n1996
    	May\n1996
    	June\n1996
    	July\n1996

    #proc yaxis
      stubs: inc 10

    // render legend using labels specified above (proc legend)
    #proc legend
      location: max-1 max