Stata 15 help for textstyle

[G-4] textstyle -- Choices for the overall look of text

Syntax

textstyle Description ------------------------------------------------------------------------- heading large text suitable for headings; default used by title() subheading medium text suitable for subheadings; default used by subtitle() body medium-sized text; default used by caption() small_body small text; default used by note()

axis_title default for axis titles

label text suitable for labeling key_label default used to label keys in legends small_label default used to label points tick_label default used to label major ticks minor_ticklabel default used to label minor ticks -------------------------------------------------------------------------

Other textstyles may be available; type

. graph query textboxstyle (sic)

to obtain the complete list of textstyles installed on your computer. The textstyle list is the same as the textboxstyle list.

Description

textstyle specifies the overall look of single lines of text. textstyle is specified in options such as the marker-label option mltextstyle() (see [G-3] marker_label_options):

. twoway scatter ..., mlabel(...) mltextstyle(textstylelist) ...

In the example above, a textstylelist is allowed. A textstylelist is a sequence of textstyles separated by spaces. Shorthands are allowed to make specifying the list easier; see [G-4] stylelists.

A textstyle is in fact a textboxstyle, but only a subset of the attributes of the textbox matter; see [G-4] textboxstyle.

Remarks

Remarks are presented under the following headings:

What is text? What is a textstyle? You do not need to specify a textstyle Relationship between textstyles and textboxstyles

What is text?

Text is one line of text.

What is a textstyle?

How text appears is defined by five attributes:

1. Whether the text is vertical or horizontal; see [G-4] orientationstyle

2. The size of the text; see [G-4] textsizestyle

3. The color of the text; see [G-4] colorstyle

4. Whether the text is left-justified, centered, or right-justified; see [G-4] justificationstyle

5. How the text aligns with the baseline; see [G-4] alignmentstyle

The textstyle specifies these five attributes.

You do not need to specify a textstyle

The textstyle is specified in options such as

mltextstyle(textstyle)

Correspondingly, you will find other options are available for setting each attribute above; see [G-3] marker_label_options.

You specify the textstyle when a style exists that is exactly what you desire or when another style would allow you to specify fewer changes to obtain what you want.

Relationship between textstyles and textboxstyles

textstyles are in fact a subset of the attributes of textboxstyles; see [G-4] textboxstyle. A textbox allows multiple lines, has an optional border around it, has a background color, and more. By comparison, text is just a line of text, and textstyle is the overall style of that single line.

Most textual graphical elements are textboxes, but there are a few simple graphical elements that are merely text, such as the marker labels mentioned above. The mltextstyle(textstyle) option really should be documented as mltextstyle(textboxstyle) because it is in fact a textboxstyle that mltextstyle() accepts. When mltextstyle() processes the textboxstyle, however, it looks only at the five attributes listed above and ignores the other attributes textboxstyle defines.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index