# stockday

How to download and try this example

    Usage: pl -gif stockday.htm

    #proc page
    #if @DEVICE in gif,png
      scale: 0.7
    #endif

    // read data file using proc getdata
    #proc getdata
    file: stockday.dat
    fieldnames: date time price volume
    select: @@date = 13-Nov-01

    // define top plotting area using proc areadef
    #proc areadef
    title: Trailer Tongue Technologies Corp.
    rectangle: 1 3 5 5
    xscaletype: time
    xrange: 9:30 16:00
    yautorange: datafield=price lowfix=16
    #saveas: A

    // set up X axis using proc xaxis
    #proc xaxis
    stubs: inc 1 hour
    stubformat: hhA
    stubrange: 10:00
    grid: color=gray(0.8)
    tics: none

    // set up Y axis using proc yaxis
    #proc yaxis
    stubs: inc 2
    // grid: color=gray(0.8)
    axisline: none
    tics: none

    // draw filled curve using proc lineplot
    #proc lineplot
    xfield: time
    yfield: price
    fill: dullyellow

    // draw curve again using proc lineplot
    #proc lineplot
    xfield: time
    yfield: price
    linedetails: width=0.5

    // do volume

    // define bottom plotting area using proc areadef
    #proc areadef
    #clone: A
    rectangle: 1 1.6 5 2.6
    yautorange: datafield=volume
    yscaletype: linear
    title:

    // set up X axis using proc xaxis
    #proc xaxis
    label: Volume
    axisline: none
    tics: none

    // set up Y axis using proc yaxis
    #proc yaxis
    stubs: inc 1000
    grid: color=gray(0.8)
    axisline: none
    tics: none

    // render histogram using proc bars
    #proc bars
    barwidth: 0.04
    color: dullyellow
    locfield: time
    lenfield: volume
    outline: no