Object Reference : Object View and Procedure Reference : Graph
  
 
axis
Sets axis scaling and display characteristics for the graph.
By default, EViews optimally chooses the axis scaling to fit the graph data.
Syntax
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.
Options
The options list may include any of the following options:
Data scaling options
 
linear
Linear data scaling (default).
linearzero
Linear data scaling (include zero when auto range selection is employed).
log
Logarithmic scaling.
norm
Norm (standardize) the data prior to plotting.
range(arg)
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.
units(arg)
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 /
‑zeroline
[Draw / Do not draw] a line at zero on the data scale.
zerotop /
-zerotop
[Draw / Do not draw] the zero line on top of the graph.
ticksout
Draw tickmarks outside the graph axes.
ticksin
Draw tickmarks inside the graph axes.
ticksboth
Draw tickmarks both outside and inside the graph axes.
ticksnone
Do not draw tickmarks.
ticksauto
Allow EViews to determine whether to draw tickmarks on or between observations.
tickson
Draw tickmarks on observations.
ticksbtw
Draw tickmarks between observations.
ticksbtwns
Draw tickmarks between observations, removing space at the axis ends.
minor / -minor
[Allow / Do not allow] minor tick marks.
label / -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.
textcolor(arg)
Sets the color of the axis text. arg may be one of the predefined color keywords, or it may be made up of n1, n2, n3, a set of three integers from 0 to 255, representing the RGB values of the color. For a description of the available color keywords (“blue”, “red”, “green”, “black”, “white”, “purple”, “orange”, “yellow”, “gray”, “ltgray”), see Table::setfillcolor.
mirror / -mirror
[Label / Do not label] both left and right axes with duplicate axes (single scale graphs only).
angle(arg)
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.
Examples
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.
Cross-references
See “Graph Objects” for a discussion of graph options.
See also Graph::datelabel, Graph::options and Graph::setelem.