# km2

How to download and try this example

    Usage: pl -gif km2.htm

    //  Set up plotting region using proc areadef
    #proc areadef
      rectangle: 1 1 5 3
      yrange: .3 1
      xrange: 0 42
      xaxis.stubs: incremental 12
      xaxis.label: Months
      yaxis.stubs: incremental 0.1
      yaxis.stubformat: %3.1f

    //  Get data (from end of this file) using proc getdata
    #proc getdata
      #intrailer

    //  do the blue range using proc rangesweep
    #proc rangesweep
      xfield: 1
      lofield: 3
      hifield: 4
      color: powderblue
      legendlabel: 95% CI

    //  do the pink range using proc rangesweep
    #proc rangesweep
      xfield: 1
      lofield: 6
      hifield: 7
      color: powderblue

    //  now do the curves last so they come out on top of ranges..
    //  do the blue curve using proc lineplot
    #proc lineplot
      xfield: 1
      yfield: 2
      linedetails: color=blue
      legendlabel: Group A

    //  do the red curve using proc lineplot
    #proc lineplot
      xfield: 1
      yfield: 5
      linedetails: color=red
      legendlabel: Group B

    //  render the legend using proc legend
    #proc legend
      location: max-1 max
      seglen: 0.2
      specifyorder:
    	Group A
    	Group B
    	95% CI

    //  here is the data...
    #proc trailer
    data:
    // 1 is blue,   2 is red
    //
    //      T       val1    lo1     hi1     val2    lo2     hi2
    	0       1       1       1       1       1       1
    	2	0.9	0.85	0.95	0.93	0.9	0.96
    	4	0.85	0.8	0.9	0.9	0.86	0.94
    	6	0.8	0.77	0.83	0.83	0.79	0.87
    	12	0.79	0.75	0.84	0.8	0.75	0.85
    	18	0.78	0.73	0.83	0.75	0.7	0.8
    	24	0.77	0.72	0.82	0.65	0.6	0.7
    	30	0.76	0.71	0.81	0.57	0.51	0.63
    	36	0.75	0.69	0.80	0.46	0.39	0.53