#set method = 1 #set RECT = "1 1 11 3" #proc page scale: .8 pagesize: 12 5 #proc getdata // file: data.txt file: barber.dat delimit: space #proc areadef // rectangle: 1 1 11 3 rectangle: @RECT xscaletype: datetime yyyy/mm/dd.hh:mm xautorange: datafield=1 yrange: 0 100 #saveas: A #endproc #proc yaxis stubs: inc 20 grid: color=skyblue label: % labeldetails: adjust=-0.2,0 size=11 // do x axis later.. #proc lineplot xfield: 1 yfield: 4 fill: rgb(.1,.65,.1) legendlabel: IO Wait #proc lineplot xfield: 1 yfield: 3 fill: rgb(0,0,.8) legendlabel: User #proc lineplot xfield: 1 yfield: 2 fill: rgb(.8,0,0) legendlabel: Sys #proc legend location: max+.35 max //////////////////// // now do x axis.. // use variables XMIN & XMAX (set automatically by xautorange), // and extract date component.. #set XMINDATE = $substring( @XMIN, 1, 10 ) #set XMAXDATE = $substring( @XMAX, 1, 10 ) // set up a new transparent areadef using date scale type #proc areadef rectangle: @RECT xscaletype: date yyyy/mm/dd xrange: @XMINDATE @XMAXDATE yrange: 0 10 #proc xaxis location: min stubs: inc 1 day stubcull: .2 stubformat: dd grid: color=skyblue #proc xaxis location: min-0.3 stubs: inc 1 month stubdetails: adjust=0,0.1 stubformat: Mmm stubslide: 14(s) ticlen: 0.15 axisline: none