Object Reference : Object View and Procedure Reference : Graph
Sets axis scaling and display characteristics for the graph.
By default, EViews optimally chooses the axis scaling to fit the graph data.
graph_name.axis(axis_id) options_list
The axis_id parameter identifies which of the axes the command modifies. If no option is specified, the proc will modify all of the axes. axis_id may take on one of the following values:
left / l
Left vertical axis.
right / r
Right vertical axis.
bottom / b
Bottom axis for XY and scatter graphs ( scat, xyarea, xybar, xyline, xypair).
top / t
Top axis for XY and scatter graphs ( scat, xyarea, xybar, xyline, xypair).
zerotop / zeroback
Draw zero line on [top / bottom] of other graph elements.
all / a
All axes.
The options list may include any of the following options:
Data scaling options
Linear data scaling (default).
Linear data scaling (include zero when auto range selection is employed).
Logarithmic scaling.
Norm (standardize) the data prior to plotting.
Specifies the endpoints for the scale, where arg may be: “auto” (automatic choice), “minmax” (use the maximum and minimum values of the data), “n1, n2” (set minimum to n1 and maximum to n2, e.g. “range(3, 9)”).
overlap / ‑overlap
[Overlap / Do not overlap] scales on dual scale graphs.
invert / -invert
[Invert / do not invert] scale.
Specifies the units of the data, where arg may be: “n” (native), “p” (percent), “k” (thousands), “m” (millions), “b” (billions), “t” (trillions).
format(option1 [,option2, ...])
Sets data formatting, where you may provide one or more of the following options:
“commadec” / “-commadec” ([Do / Do not] use comma as decimal, “ksep” / “-ksep” ([Do / Do not] include a thousands separator, “leadzero” / “-leadzero” ([Do / Do not] include leading zeros, “dec=arg” (set number of decimal places, where arg may be an integer or “a” for auto), “prefix=c” (add a prefix character, where c may be a single quoted character or “” to remove the prefix), “suffix=c” (add a suffix character, where c may be a single quoted character or “” to remove the suffix).
Axis options
grid / -grid
[Draw / Do not draw] grid lines.
zeroline /
[Draw / Do not draw] a line at zero on the data scale.
zerotop /
[Draw / Do not draw] the zero line on top of the graph.
Draw tickmarks outside the graph axes.
Draw tickmarks inside the graph axes.
Draw tickmarks both outside and inside the graph axes.
Do not draw tickmarks.
Allow EViews to determine whether to draw tickmarks on or between observations.
Draw tickmarks on observations.
Draw tickmarks between observations.
Draw tickmarks between observations, removing space at the axis ends.
minor /
[Allow / Do not allow] minor tick marks.
label /
[Place / Do not place] labels on the axes.
duallevel / -duallevel
[Allow / Do not allow] two row date labels on the observation axis.
font([face], [pt], [+/- b], [+/- i], [+/- u], [+/- s])
Set characteristics of axis font. The font name (face), size (pt), and characteristics are all optional. face should be a valid font name, enclosed in double quotes. pt should be the font size in points. The remaining options specify whether to turn on/off boldface (b), italic (i), underline (u), and strikeout (s) styles.
Sets the color of the axis text. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
mirror / -mirror
[Label / Do not label] both left and right axes with duplicate axes (single scale graphs only).
Set label angle, where arg can be an integer between -90 and 90 degrees, measured in 15 degree increments, or “a” (auto) for automatically determined angling. The angle is measured from the horizontal axis.
The options which support the “–” may be preceded by a “+” or “–” indicating whether to turn on or off the option. The “+” is optional.
Note that the default settings are taken from the Global Defaults.
Color definitions
color_arg specifies the color to be employed in the arguments above. The color may be specified using predefined color names, by specifying the individual red-green-blue (RGB) components using the special “@RGB” function, or by specifying the individual red-green-blue (RGB) components in hexadecimal using the special “@HEX” function.
The predefined colors are given by the keywords (with their RGB and HEX equivalents):
@rgb(0, 0, 255)
@rgb(255, 0, 0)
@rgb(255, 168, 168)
@rgb(0, 128, 0)
@rgb(0, 0, 0)
@rgb(255, 255, 255)
@rgb(128, 0, 128)
@rgb(255, 128, 0)
@rgb(255, 255, 0)
@rgb(128, 128, 128)
@rgb(192, 192, 192)
To set the right scale to logarithmic with manual range, you can enter:
graph1.axis(right) log range(10, 30)
graph1.axis(r) zeroline -minor font(12)
draws a horizontal line through the graph at zero on the right axis, removes minor ticks, and changes the font size of the right axis labels to 12 point.
graph2.axis -mirror
turns of mirroring of axes in single scale graphs.
mygra1.axis font("Times", 12, b, i) textcolor(blue)
sets the axis font to blue “Times” 12pt bold italic.
gra1.axis(l) units(b) format(ksep, prefix="$", suffix="")
plots the data on the left axis in billions, using commas to separate thousands, adds a “$” to the beginning of each data label and erases the suffix.
See “Graph Objects” for a discussion of graph options.
See also Graph::datelabel, Graph::options, and Graph::setelem.