# bars9

How to download and try this example

    Usage: pl -gif bars9.htm
    // Source: Commerce department (values interpolated from another graph and
    // may not be exact)

    // use proc getdata to specify 4 values
    #proc getdata
    data:   98feb -12
    	98mar -13.5
    	98apr -14.2
    	98may -15.5
    	98jun -14.4
    	98jul -15
    	98aug -16.3
    	98sep -14.8
    	98oct -14.1
    	98nov -15
    	98dec -14.2
    	99jan -16.8
    	99feb -19.4

    // use proc areadef to set up scaled plotting area
    #proc areadef
    title: U.S. Trade Deficit
    rectangle: 1 1 3 2
    xscaletype: date yymmm
    xrange: 98jan 99mar
    yrange: -20 0
    areacolor: gray(0.8)

    // use proc axis to do the X axis..
    #proc xaxis
    stubs: inc 1
    stubformat: M
    autoyears: 'yy
    ticlen: 0 0
    stubrange: 98feb 99feb

    // use proc axis to do the Y axis..
    #proc yaxis
    stubs: inc 5
    ticlen: 0 0
    grid: color=white
    label: $ Billions
    axisline: none

    // use proc bars to plot bars
    #proc bars
    locfield: 1
    lenfield: 2
    color: red
    barwidth: 0.1
    crossover: 0
    outline: no

    // use proc line to draw a year-end line
    #proc line
    linedetails: style=1
    points: 15dec98(s) min(s) 15dec98(s) max(s)