brokenaxis

How to download and try this example

Usage: pl -gif brokenaxis.htm

A bar graph where Y axis is broken to allow compact display
of extreme value.

Note: a series of "warning, bar completely out of y plotting area"
messages can be expected as normal.

#proc page #if @DEVICE in gif,png scale: 0.6 #endif // get the plot data (at end of this file) #proc getdata #intrailer // set up lower area #proc areadef rectangle: 1 1 6 3.5 xscaletype: date mm/yy xrange: 01/98 06/00 yrange: 0 250 xaxis.stubs inc 1 month xaxis.stubformat: M xaxis.autoyears: yes yaxis.stubs inc 50 yaxis.stubrange: 0 200 yaxis.grid: color=pink // do the lower bars, truncating at top.. #proc bars locfield: 1 lenfield: 2 color: teal barwidth: 0.1 truncate: yes #saveas: B // now set up an area immediately above, rectangle and range must be in proportion #proc areadef rectangle: 1 3.5 6 4.5 xscaletype: date mm/yy xrange: 01/98 06/00 yrange: 700 800 yaxis.stubs: inc 50 yaxis.stubrange: 750 500 yaxis.grid: color=pink // and do bars again.. only the extreme bar will appear #proc bars #clone B // do a break symbol on Y axis at Y=700 #proc breakaxis axis: y location: axis breakpoint: 700 // do a break symbol on tall bar at Y=700 #proc breakaxis axis: y location: 09/99 breakpoint: 700 #proc trailer data: 03/98 39 04/98 28 05/98 30 06/98 44 07/98 39 08/98 43 09/98 47 10/98 54 11/98 89 12/98 77 01/99 80 02/99 91 03/99 104 04/99 95 05/99 145 06/99 127 07/99 189 08/99 117 09/99 776 10/99 137 11/99 112 12/99 128 01/00 165 02/00 89 03/00 111