📄 textbox_options.hlp
字号:
{smcl}
{* 05mar2005}{...}
{cmd:help textbox_options}
{hline}
{* index textboxes}{...}
{title:Title}
{p2colset 5 28 30 2}{...}
{p2col :{hi:[G] {it:textbox_options}} {hline 2}}Options for textboxes and concept definition{p_end}
{p2colreset}{...}
{title:Syntax}
{pstd}
Textboxes contain one or more lines of text.
The appearance of textboxes is controlled by the following options:
{col 9}{it:textbox_options}{col 44}description
{col 9}{hline 71}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:tsty:le:(}{it:{help textboxstyle}}{cmd:)}{...}
{col 44}{...}
overall style
{...}
{...}
{...}
{col 9}{...}
{cmdab:orient:ation:(}{it:{help orientationstyle}}{cmd:)}{...}
{col 44}{...}
whether vertical or horizontal
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:si:ze:(}{it:{help textsizestyle}}{cmd:)}{...}
{col 44}{...}
size of text
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:c:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 44}{...}
color of text
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:j:ustification:(}{it:{help justificationstyle}}{cmd:)}{...}
{col 44}{...}
text left, centered, right-justified
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:al:ignment:(}{it:{help alignmentstyle}}{cmd:)}{...}
{col 44}{...}
text top, middle, bottom baseline
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:m:argin:(}{it:{help marginstyle}}{cmd:)}{...}
{col 44}{...}
margin from text to border
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmd:linegap(}{it:{help relativesize}}{cmd:)}{...}
{col 44}{...}
space between lines
{...}
{col 9}{...}
{cmd:width(}{it:{help relativesize}}{cmd:)}{...}
{col 44}{...}
width of textbox override
{col 9}{...}
{cmd:height(}{it:{help relativesize}}{cmd:)}{...}
{col 44}{...}
height of textbox override
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmd:box} or {cmd:nobox}{...}
{col 44}{...}
whether border is drawn around box
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:bc:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 44}{...}
color of background and border
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:fc:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 44}{...}
color of background
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:ls:tyle:(}{it:{help linestyle}}{cmd:)}{...}
{col 44}{...}
overall style of border
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:lp:attern:(}{it:{help linepatternstyle}}{cmd:)}{...}
{col 44}{...}
line pattern of border
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:lw:idth:(}{it:{help linewidthstyle}}{cmd:)}{...}
{col 44}{...}
thickness of border
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:lc:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 44}{...}
color of border
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:bm:argin:(}{it:{help marginstyle}}{cmd:)}{...}
{col 44}{...}
margin from border outwards
{col 9}{...}
{cmdab:bex:pand}{...}
{col 44}{...}
expand box in direction of text
{...}
{* -----------------------------------------------------------}{...}
{col 9}{...}
{cmdab:place:ment:(}{it:{help compassdirstyle}}{cmd:)}{...}
{col 44}{...}
location of textbox override
{...}
{col 9}{hline 71}
{pstd}
The above options invariably occur inside other options. For instance,
the syntax of {cmd:title()} (see {it:{help title_options}}) is
{phang2}
{cmd:title("}{it:string}{cmd:"}
[{cmd:"}{it:string}{cmd:"} [...]]
[{cmd:,}
{it:title_options}
{it:textboxoptions}]{cmd:)}
{pstd}
so any of the options above can appear inside the {cmd:title()} option:
{phang2}
{cmd:. graph}
...
{cmd:,}
...
{cmd:title("My title", color(green) box)}
...
{title:Description}
{pstd}
A textbox contains one or more lines of text. The textbox options
listed above specify how the text and textbox should appear.
{title:Options}
{phang}
{cmd:tstyle(}{it:textboxstyle}{cmd:)}
specifies the overall style of the textbox. Think of a textbox as a set
of characteristics that include, in addition to the text, the size of
font, the color, whether lines are drawn around the box, etc.
The {it:textboxstyle} you choose specifies all of those things, and
it is from there that the changes you make by specifying the other
operations take effect.
{pmore}
The default is determined by the overall context of the text (such
as whether it is due to {cmd:title()}, {cmd:subtitle()}, etc.), and that in
turn is specified by the scheme (see {help schemes}). All of which is
to say, identifying the name of the default style in a context is
virtually impossible.
{pmore}
Option {cmd:tstyle()} is rarely specified. Usually, you simply let
the overall style be whatever it is and specify the other textbox
options to modify it. Do not, however, dismiss the idea of
looking for a better overall style that more closely matches your
desires.
{pmore}
See {it:{help textboxstyle}}.
{phang}
{cmd:orientation(}{it:orientationstyle}{cmd:)}
specifies whether the text and box are to be oriented horizontally or
vertically (text reading from bottom to top or text reading from
top to bottom). See {it:{help orientationstyle}}.
{phang}
{cmd:size(}{it:textsizestyle}{cmd:)}
specifies the size of the text that appears inside the textbox.
See {it:{help textsizestyle}}.
{phang}
{cmd:color(}{it:colorstyle}{cmd:)}
specifies the color of the text that appears inside the textbox.
See {it:{help colorstyle}}.
{phang}
{cmd:justification(}{it:justificationstyle}{cmd:)}
specifies how the text is to be "horizontally" aligned in the box. Choices
include {cmd:left}, {cmd:right}, and {cmd:center}.
Think of the textbox
as being horizontal, even if it is vertical when specifying this option.
See {it:{help justificationstyle}}.
{phang}
{cmd:alignment(}{it:alignmentstyle}{cmd:)}
specifies how the text is to be "vertically" aligned in the box.
Choices include {cmd:baseline}, {cmd:middle}, and {cmd:top}.
Think of the textbox
as being horizontal, even if it is vertical when specifying this option.
See {it:{help alignmentstyle}}.
{phang}
{cmd:margin(}{it:marginstyle}{cmd:)}
specifies the margin around the text (the distance from the text to
the borders of the box). The text that appears in a box, plus
{cmd:margin()}, determine the overall size of the box.
See {it:{help marginstyle}}.
{pmore}
When dealing with rotated textboxes, textboxes for which
{cmd:orientation(vertical)} or
{cmd:orientation(rvertical)} has been specified,
note that the margins for the left, right, bottom, and top refer to
the margins before rotation.
{phang}
{cmd:linegap(}{it:relativesize}{cmd:)}
specifies the distance between lines.
See {it:{help relativesize}} for argument choices.
{phang}
{cmd:width(}{it:relativesize}{cmd:)}
and
{cmd:height(}{it:relativesize}{cmd:)}
override Stata's usual determination of the width and height of the textbox
based on its contents.
See {help textbox_options##remarks6:Width and height} under {hi:Remarks}
below. See {it:{help relativesize}} for argument choices.
{phang}
{cmd:box} and {cmd:nobox}
specify whether a box is to be drawn outlining the border of the
textbox. The default is determined by the {cmd:tstyle()} which
in turn is determined by context, etc. In general, the default
is not to outline boxes, so the option to outline boxes is
{cmd:box}. If an outline appears by default, {cmd:nobox}
is the option to suppress the outlining of the border. No matter
what the default, you can specify {cmd:box} or {cmd:nobox}.
{phang}
{cmd:bcolor(}{it:colorstyle}{cmd:)}
specifies the color of both the background of the box and the color
of the outlined border. This option is typically not specified
because it results in the border disappearing into the background of the
textbox; see options {cmd:fcolor()} and {cmd:lcolor()} below for
alternatives.
The color only matters if {cmd:box} is also specified;
otherwise {cmd:bcolor()} is ignored.
See {it:{help colorstyle}} for a list of color choices.
{phang}
{cmd:fcolor(}{it:colorstyle}{cmd:)}
specifies the color of the background of the box.
The background of the box is filled with the {cmd:fcolor()} only if
{cmd:box} is also specified; otherwise {cmd:fcolor()} is ignored.
See {it:{help colorstyle}} for a list of color choices.
{phang}
{cmd:lstyle(}{it:linestyle}{cmd:)}
specifies the overall style of the line used to outline the border.
The style includes the line's pattern (solid, dashed, etc.),
thickness, and color.
{pmore}
You need not specify {cmd:lstyle()} just because there is something
you want to change about the look of the line. Options
{cmd:lpattern}, {cmd:lwidth()}, and {cmd:lcolor()} will allow you
to change the attributes individually. You specify {cmd:lstyle()}
when there is a style that is exactly what you desire or when another
style would allow you to specify fewer changes.
{pmore}
See {it:{help linestyle}} for a list of style choices and
see {help lines} for a discussion of lines in general.
{phang}
{cmd:lpattern(}{it:linepatternstyle}{cmd:)}
specifies the pattern of the line outlining the border.
See {it:{help linepatternstyle}}.
Also see {help lines} for a discussion of lines in general.
{phang}
{cmd:lwidth(}{it:linewidthstyle}{cmd:)}
specifies the thickness of the line outlining the border.
See {it:{help linewidthstyle}}.
Also see {help lines} for a discussion of lines in general.
{phang}
{cmd:lcolor(}{it:colorstyle}{cmd:)}
specifies the color of the border of the box.
The border color only matters if {cmd:box} is also specified;
otherwise the {cmd:lcolor()} is ignored.
See {it:{help colorstyle}} for a list of color choices.
{phang}
{cmd:bmargin(}{it:marginstyle}{cmd:)}
specifies the margin between the border and the containing box. See
{it:{help marginstyle}}.
{phang}
{cmd:bexpand}
specifies that the textbox be expanded in the direction of the text,
made wider if the text is horizontal, and made longer if the text is
vertical. It is expanded to the borders of its containing box.
See {it:{help title_options}} for a demonstration of this option.
{phang}
{cmd:placement(}{it:compassdirstyle}{cmd:)}
overrides default placement; see
{hi:Appendix: Overriding default or context-specified positioning}
below.
See {it:{help compassdirstyle}} for argument choices.
{title:Remarks}
{pstd}
Remarks are presented under the headings
{help textbox_options##remarks1:Definition of a textbox}
{help textbox_options##remarks2:Position}
{help textbox_options##remarks3:Justification}
{help textbox_options##remarks4:Position and justification combined}
{help textbox_options##remarks5:Margins}
{help textbox_options##remarks6:Width and height}
{help textbox_options##remarks7:Appendix: Overriding default or context-specified positioning}
{marker remarks1}{...}
{title:Definition of a textbox}
{pstd}
A textbox is one or more lines of text
{c TLC}{hline 19}{c TRC} {c TLC}{hline 33}{c TRC}
{c |}single-line textbox{c |} {c |}1st line of multiple-line textbox{c |}
{c BLC}{hline 19}{c BRC} {c |}2nd line of multiple-line textbox{c |}
{c BLC}{hline 33}{c BRC}
{pstd}
for which the borders may or may not be visible (controlled by the
{cmd:box}/{cmd:nobox} option).
Textboxes can be horizontal or vertical
{c TLC}{hline 10}{c TRC} {c TLC}{c -}{c TRC} {c TLC}{c -}{c TRC}
{c |}horizontal{c |} {c |}l{c |} {c |}r{c |}
{c BLC}{hline 10}{c BRC} {c |}a{c |} {c |}v{c |}
{c |}c{c |} {c |}e{c |}
{c |}i{c |} {c |}r{c |}
{c |}t{c |} {c |}t{c |}
{c |}r{c |} {c |}i{c |}
{c |}e{c |} {c |}c{c |}
{c |}v{c |} {c |}a{c |}
{c BLC}{c -}{c BRC} {c |}l{c |}
{c BLC}{c -}{c BRC}
{it:in an} {cmd:orientation(vertical)} {it:in an} {cmd:orientation(rvertical)}
{it:textbox, letters are rotated} {it:textbox, letters are rotated}
{it:90 degrees counterclockwise;} {it:90 degrees clockwise;}
{cmd:orientation(vertical)} {it:reads} {cmd:orientation(rvertical)} {it:reads}
{it:bottom to top} {it:top to bottom}
{pstd}
Even in vertical textboxes, options are stated in horizontal terms of
left and right. Think horizontally, and imagine the rotation as being
performed at the end.
{marker remarks2}{...}
{title:Position}
{pstd}
Textboxes are first formed and second positioned on the graph. The
{it:textbox_options} affect the construction of the textbox, not its positioning.
The options that control its positioning are provided by the context in which
the textbox is used. For instance, the syntax of the {cmd:title()}
option{hline 2}see {it:{help title_options}}{hline 2}is
{p 8 31 2}
{cmd:title("}{it:string}{cmd:"} ...
[{cmd:,}
{cmd:position(}...{cmd:)}
{cmd:ring(}...{cmd:)}
{cmd:span(}...{cmd:)}
...
{it:textbox_options}]{cmd:)}
{pstd}
{cmd:title()}'s {cmd:position()}, {cmd:ring()}, and {cmd:span()} options
determine where the title (i.e., textbox) is positioned.
Once the textbox is formed, its contents no longer matter; it is just a box
to be positioned on the graph.
{pstd}
Textboxes are positioned inside other boxes. For instance, the textbox might
be
{c TLC}{hline 5}{c TRC}
{c |}{it:title}{c |}
{c BLC}{hline 5}{c BRC}
{pstd}
and, due to the {cmd:position()}, {cmd:ring()}, and {cmd:span()} options
specified, {cmd:title()} might position that box somewhere
on the top "line":
{c TLC}{hline 50}{c TRC}
{c |}{space 50}{c |}
{c BLC}{hline 50}{c BRC}
{pstd}
There are many ways the smaller box could be fit into the larger box,
which is the usual case, and forgive us for combining two discussions into
one: how boxes fit into each other and the controlling of placement.
If you specified {cmd:title()}'s {cmd:position(11)} option, the
result would be
{c TLC}{hline 5}{c TT}{hline 44}{c TRC}
{c |}{it:title}{c |}{space 44}{c |}
{c BLC}{hline 5}{c BT}{hline 44}{c BRC}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -