cat_axis_label_options.hlp

来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 193 行

HLP
193
字号
{smcl}
{* 01mar2005}{...}
{cmd:help cat_axis_label_options}
{hline}
{* index axis line, look of}{...}

{title:Title}

{p2colset 5 35 37 2}{...}
{p2col :{hi:[G] {it:cat_axis_label_options}} {hline 2}}Options for specifying look of categorical axis labels{p_end}
{p2colreset}{...}


{title:Syntax}

	{it:cat_axis_label_options}{col 40}description
	{hline 70}
	{cmdab:nolab:els}{...}
{col 40}suppress axis labels
	{cmdab:tick:s}{...}
{col 40}display axis ticks
	{cmd:angle(}{it:{help anglestyle}}{cmd:)}{...}
{col 40}angle of axis labels
	{cmdab:alt:ernate}{...}
{col 40}offset adjacent labels

	{cmdab:tsty:le:(}{it:{help tickstyle}}{cmd:)}{...}
{col 40}labels & ticks: overall style

	{cmd:labgap(}{it:{help relativesize}}{cmd:)}{...}
{col 40}labels: margin between tick and label
	{cmd:labstyle(}{it:{help textstyle}}{cmd:)}{...}
{col 40}labels: overall style
	{cmdab:labs:ize:(}{it:{help textsizestyle}}{cmd:)}{...}
{col 40}labels: size of text
	{cmdab:labc:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 40}labels: color of text

	{cmdab:tl:ength:(}{it:{help relativesize}}{cmd:)}{...}
{col 40}ticks: length
	{cmdab:tp:osition:(}{...}
{cmdab:o:utside}|{cmdab:c:rossing}|
			       {cmdab:i:nside:)}{...}
{col 40}ticks: position/direction
	{cmdab:tlsty:le:(}{it:{help linestyle}}{cmd:)}{...}
{col 40}ticks: linestyle of
	{cmdab:tlw:idth:(}{it:{help linewidthstyle}}{cmd:)}{...}
{col 40}ticks: thickness of line
	{cmdab:tlc:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 40}ticks: color of line
	{cmdab:tlp:attern(}{it:{help linepatternstyle}}{cmd:)}{...}
{col 40}ticks: line pattern of line
	{hline 70}


{title:Description}

{pstd}
The {it:cat_axis_label_options} determine the look of the labels that appear
on a categorical {it:x} axis produced by {cmd:graph} {cmd:bar}, {cmd:graph}
{cmd:hbar}, {cmd:graph} {cmd:dot}, and {cmd:graph} {cmd:box}.  These options
are specified inside {cmd:label()} of {cmd:over()}:

{phang2}
	. {cmd:graph} ...{cmd:, over(}{it:varname}{cmd:,} ... {cmd:label(}{it:cat_axis_label_options}{cmd:)} ...{cmd:)}

{pstd}
The most useful
{it:cat_axis_label_options} are
{cmd:angle()}, {cmd:alternate}, {cmd:labcolor()}, and {cmd:labsize()}.


{title:Options}

{phang}
{cmd:nolabels}
    suppresses display of category labels on the axis.  In the case of
    {cmd:graph} {cmd:bar} and {cmd:graph} {cmd:hbar}, {cmd:nolabels} is useful
    when combined with the {cmd:blabel()} option used to place the labels on
    the bars themselves; see {it:{help blabel_option}}.

{phang}
{cmd:ticks}
    specifies that ticks appear on the categorical {it:x} axis.
    By default, ticks are not presented on categorical axes, and it is unlikely
    that you would want them to be.

{phang}
{cmd:angle(}{it:anglestyle}{cmd:)}
    specifies the angle at which the labels on the axis
    appear.  The default is {cmd:angle(0)}, meaning horizontal.  With
    vertical bar charts and other vertically oriented charts,
    it is sometimes useful to specify
    {cmd:angle(90)} (vertical text reading bottom to top),
    {cmd:angle(-90)} (vertical text reading top to bottom), or
    {cmd:angle(-45)} (angled text reading top-left to bottom-right);
    see {it:{help anglestyle}}.

{pmore}
    Unix users:  if you specify {cmd:angle(-45)}, results will appear on your
    screen as if you specified {cmd:angle(-90)}; results will appear correctly
    when you print.

{phang}
{cmd:alternate}
    causes adjacent labels to be offset from one another and is useful when
    there are many labels or labels are long.  For instance, rather than
    obtaining an axis labeled

	    {hline 4}{c TT}{hline 9}{c TT}{hline 9}{c TT}{hline 9}{c TT}{hline 4}
	     ResearchDevelopmentMarketing   Sales

{pmore}
    with {cmd:alternate}, you obtain

	    {hline 4}{c TT}{hline 9}{c TT}{hline 9}{c TT}{hline 9}{c TT}{hline 4}
	     Research           Marketing
		     Development            Sales

{phang}
{cmd:tstyle(}{it:tickstyle}{cmd:)}
    specifies the overall look of labels and ticks.  In this case, the
    emphasis is on labels since ticks are usually suppressed on a categorical
    axis.  The options documented below will allow you to change each
    attribute of the label and tick, but the {it:tickstyle} specifies the
    starting point.

{pmore}
    You need not specify {cmd:tstyle()} just because there is something
    you want to change about the look of labels and ticks.  You specify
    {cmd:tstyle()} when another style exists that is exactly what you desire
    or when another style would allow you to specify fewer changes to obtain
    what you want.

{phang}
{cmd:labgap()},
{cmd:labstyle()},
{cmd:labsize()}, and
{cmd:labcolor()}
    specify details about how the labels are presented.  Of particular
    interest are {cmd:labsize(}{it:textsizestyle}{cmd:)}, which specifies the
    size of the labels, and {cmd:labcolor(}{it:colorstyle}{cmd:)}, which
    specifies the color of the labels; see {it:{help textsizestyle}} and
    {it:{help colorstyle}} for a list of color choices.

{phang}
{cmd:tlength(}{it:relativesize}{cmd:)}
    specifies the overall length of the ticks.

{phang}
{cmd:tposition(outside}|{cmd:crossing}|{cmd:inside)}
    specifies whether the ticks are to extend {cmd:outside} (from the axis
    out, the usual default), {cmd:crossing} (crossing the axis
    line, extending in and out), or {cmd:inside} (from the axis
    into the plot region).

{phang}
{cmd:tlstyle()},
{cmd:tlwidth()},
{cmd:tlcolor()},
{cmd:tlpattern()}
    specify other details about the look of the ticks.
    Ticks are just lines.
    See {help lines} for more information.


{title:Remarks}

{pstd}
You draw a bar, dot, or box plot of empcost by division:

{phang2}
	{cmd:. graph} ... {cmd:empcost, over(division)}

{pstd}
Seeing the result, you wish to make the text labeling the divisions 20%
larger.  You type:

{phang2}
	. {cmd:graph} ... {cmd:empcost, over(division, label(labsize(*1.2)))}


{title:Also see}

{psee}
Manual:  {bf:[G] {it:cat_axis_label_options}}

{psee}
Online:  {helpb graph bar},
{helpb graph box},
{helpb graph dot}
{p_end}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?