Stata 15 help for tickstyle

[G-4] tickstyle -- Choices for the overall look of axis ticks and axis tick labels

Syntax

tickstyle Description ------------------------------------------------------------------------- major major tick and major tick label major_nolabel major tick with no tick label major_notick major tick label with no tick

minor minor tick and minor tick label minor_nolabel minor tick with no tick label minor_notick minor tick label with no tick

none no tick, no tick label -------------------------------------------------------------------------

Other tickstyles may be available; type

. graph query tickstyle

to obtain the complete list of tickstyles installed on your computer.

Description

Ticks are the marks that appear on axes. tickstyle specifies the overall look of ticks. See [G-3] axis_label_options.

Remarks

Remarks are presented under the following headings:

What is a tick? What is a tick label? What is a tickstyle? You do not need to specify a tickstyle Suppressing ticks and/or tick labels

What is a tick? What is a tick label?

A tick is the small line that extends or crosses an axis and next to which, sometimes, numbers are placed.

A tick label is the text (typically a number) that optionally appears beside the tick.

What is a tickstyle?

tickstyle is really misnamed; it ought to be called a tick_and_tick_label_style in that it controls both the look of ticks and their labels.

Ticks are defined by three attributes:

1. The length of the tick; see [G-4] relativesize

2. Whether the tick extends out, extends in, or crosses the axis

3. The line style of the tick, including its thickness, color, and whether it is to be solid, dashed, etc.; see [G-4] linestyle

Labels are defined by two attributes:

1. The size of the text

2. The color of the text

Ticks and tick labels share one more attribute:

1. The gap between the tick and the tick label

The tickstyle specifies all six of these attributes.

You do not need to specify a tickstyle

The tickstyle is specified in the options named

{y|x}{label|tick|mlabel|mtick}(tstyle(tickstyle))

Correspondingly, there are other {y|x}{label|tick|mlabel|mtick}() suboptions that allow you to specify the individual attributes; see [G-3] axis_label_options.

You specify the tickstyle 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.

Suppressing ticks and/or tick labels

To suppress the ticks that usually appear, specify one of these styles

tickstyle Description --------------------------------------------------------------------- major_nolabel major tick with no tick label major_notick major tick label with no tick

minor_nolabel minor tick with no tick label minor_notick minor tick label with no tick

none no tick, no tick label ---------------------------------------------------------------------

For instance, you might type

. scatter .... , ylabel(,tstyle(major_notick))

Suppressing the ticks can be useful when you are creating special effects. For instance, consider a case where you wish to add grid lines to a graph at y = 10, 20, 30, and 40, but you do not want ticks or labels at those values. Moreover, you do not want even to interfere with the ordinary ticking or labeling of the graph. The solution is

. scatter ..., ymtick(10(10)40, grid tstyle(none))

We "borrowed" the ymtick() option and changed it so that it did not output ticks. We could just as well have borrowed the ytick() option. See [G-3] axis_label_options.


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