GDDM-PGF V2R1.3 Application Programming Guide
|
Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF |
BOOK
Bar charts GDDM-PGF V2R1.3 Application Programming Guide SC33-0913-01 |
|
In a bar chart, all the bars have equal width. They can be drawn on either a logical x axis or a numeric one. The calls and options that affect bar charts are listed below. The default options are shown first:
CHBAR or CHBARX Plots the bar chart
CHSET
'ABSOLUTE'|'RELATIVE' Absolute or relative data
'CVALUES'|'NOVALUES' Format/position of values ...
'VSCIENTI'|'VFIXED' ... format (scientific or fixed-point)
'VINSIDE'|'VONTOP' ... position (inside/on top of bars)
'FILL'|'INFILL'|'NOFILL' Shading method
'MBAR'|'CBAR'|'FBAR' Multiple, composite(stacked), or floating
'NNOTES'|'INOTES' Notes to be repositioned or clipped
'YVERTICAL'|'XVERTICAL' Vertical or horizontal bars
CHPAT Specify shading-pattern table values
CHCOL Specify basic color table for shading
CHVCHR Number of characters in values on bars
CHVATT Attributes of values on bars
CHVDIG Decimal digits after decimal point
CHLC Specify line-color table
CHLT Specify line-type table
CHLW Specify line-width table
CHGAP Distance between bars
CHGGAP Distance between groups of bars
With a logical x axis, each bar represents a logical x entity, usually
indicated by a label. The bars are always spaced out evenly along the x
axis. So, the x data of this type of bar chart is not a set of numbers,
it is a set of labels. Nevertheless, these labels are specified in the
normal way (using CHXLAB, CHXDAY, or CHXMTH).
The logical x axis has a nominal numeric scale: 1 for the first bar, 2 for the second, and so on, and a range of 0.5 to N + 0.5 (where N is the number of bars). Tick marks (and therefore labels) appear under each bar or group of bars; any CHXTIC specification is ignored. This is a typical specification for a bar chart with a logical x axis:
DCL X_LABS CHAR(32) INIT('ITALY FRANCE SPAIN GREECE SWEDEN');
DCL Y_DATA(15) FLOAT DEC(6) INIT(
27, 32, 36, 47, 52, /* Data for 1st component */
12, 18, 27, 23, 31, /* Data for 2nd component */
31, 23, 18, 29, 45); /* Data for 3rd component */
A numeric x axis differs from a logical one in that you supply a set of x
values at which the bars are to be drawn. The call that plots this type
of chart is exactly similar to the CHPLOT call that plots line graphs:
DCL X_DATA(5) FLOAT DEC(6) INIT
(8.1, 3.0, 3.9, 4.8, 6.5); /* x values */
DCL Y_DATA(15) FLOAT DEC(6) INIT
( 27, 32, 36, 47, 52, /*Y data for 1st component*/
12, 18, 27, 23, 31, /*Y data for 2nd component*/
31, 23, 18, 29, 45);/*Y data for 3rd component*/
Both of these examples specify bar charts with three components, each
component having five data values. There are three different ways of
displaying multicomponent bar charts:
An example of a bar chart on a numeric x axis is shown in Figure 21 in topic 5.4.3. It was drawn by the program that drew the line graph in Figure 4 in topic 3.2, amended by replacing the CHPLOT call with a CHBARX. Notice that PG routines extend the x axis beyond the highest x value, to accommodate the width of the last pair of bars. Subtopics:
|
Copyright IBM Corporation 1990, 2012 |