annot1

How to download and try this example

Usage: pl -gif annot1.htm
Notes: This is the example lpfilled2.p, with annotation added.

// Use proc page to set the overall text size to 6 pt #proc page textsize: 9 pagesize: 6 3 // Specify some data using proc getdata #proc getdata data: 2000 750 2010 1700 2015 2000 2020 1800 2025 1300 2030 400 // Define a plotting area using proc areadef #proc areadef titledetails: adjust=0,0.1 rectangle: 1 1 5 2 xrange: 2000 2035 yrange: 0 2000 // Define an X axis using proc xaxis #proc xaxis stubs: inc 5 label: Year // fill area under curve using proc lineplot #proc lineplot xfield: 1 yfield: 2 fill: pink // highlight special range under curve using proc lineplot again, with a range #proc lineplot xfield: 1 yfield: 2 fill: rgb(.7,.3,.3) linerange: 2010 2020 // Now go back and put a red curve on top of the fill using proc lineplot a 3rd time.. #proc lineplot xfield: 1 yfield: 2 linedetails: color=red // Define a Y axis using proc yaxis // Do this last so that the grid lines go on top of everything else.. #proc yaxis stubs: incremental 500 grid: color=blue axisline: none // annotate the curve using proc annotate // the (s) indicates scaled units #proc annotate location: 2012(s) 2500(s) arrowhead: 2012(s) 1800(s) text: Baby boomers begin retiring