---
title: "AxisObject"
language: "en"
type: "Symbol"
summary: "AxisObject[path] is a Graphics primitive that represents an axis with a quantitative scale along the path path. AxisObject[path, scale] uses the scale specified by scale."
canonical_url: "https://reference.wolfram.com/language/ref/AxisObject.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Graphics Objects"
    link: "https://reference.wolfram.com/language/guide/GraphicsObjects.en.md"
related_functions: 
  - 
    title: "Graphics"
    link: "https://reference.wolfram.com/language/ref/Graphics.en.md"
  - 
    title: "Axes"
    link: "https://reference.wolfram.com/language/ref/Axes.en.md"
  - 
    title: "Frame"
    link: "https://reference.wolfram.com/language/ref/Frame.en.md"
  - 
    title: "Line"
    link: "https://reference.wolfram.com/language/ref/Line.en.md"
  - 
    title: "InfiniteLine"
    link: "https://reference.wolfram.com/language/ref/InfiniteLine.en.md"
  - 
    title: "HorizontalGauge"
    link: "https://reference.wolfram.com/language/ref/HorizontalGauge.en.md"
  - 
    title: "VerticalGauge"
    link: "https://reference.wolfram.com/language/ref/VerticalGauge.en.md"
  - 
    title: "NumberLinePlot"
    link: "https://reference.wolfram.com/language/ref/NumberLinePlot.en.md"
  - 
    title: "BulletGauge"
    link: "https://reference.wolfram.com/language/ref/BulletGauge.en.md"
  - 
    title: "AngularGauge"
    link: "https://reference.wolfram.com/language/ref/AngularGauge.en.md"
  - 
    title: "Ticks"
    link: "https://reference.wolfram.com/language/ref/Ticks.en.md"
  - 
    title: "FrameTicks"
    link: "https://reference.wolfram.com/language/ref/FrameTicks.en.md"
---
[EXPERIMENTAL]

# AxisObject

AxisObject[path] is a Graphics primitive that represents an axis with a quantitative scale along the path path.

AxisObject[path, scale] uses the scale specified by scale.

## Details and Options

* ``AxisObject[…]`` represents a generalized axis that can be placed in arbitrary graphics.

* An axis consists of a path, which determines where the axis is drawn; the scale, which controls how coordinates in the graphic are mapped to values along the path; and options that affect the detailed appearance of the axis, ticks and labels.

[image]

* Possible settings for ``path`` include:

|     |     |
| --- | --- |
| {pt1, pt2} | axis through the points pt1 and pt2 |
| {"Horizontal", y0} | horizontal axis through $y=y_0$ |
| {"Horizontal", y0, {xmin, xmax}} | horizontal axis from $x=x_{\min }$ to $x=x_{\max }$ |
| {"Vertical", x0} | vertical axis through $x=x_0$ |
| {"Vertical", x0, {ymin, ymax}} | vertical axis from $y=y_{\min }$ to $y=y_{\max }$ |
| InfiniteLine[{pt1, pt2}] | infinite axis through points pt1 and pt2 |
| InfiniteLine[pt, v] | infinite axis passing through the point pt in the direction v |
| Line[{pt1, pt2}**]** | finite axis from point pt1 to point pt2 |
| Line[{pt1, …, ptn}**]** | curve axis from point pt1 to point pt*n* |
| HalfLine[{pt1, pt2}] | half-axis from the point pt1 through pt2 |
| HalfLine[pt, v] | half-axis from point pt in the direction v |
| BSplineCurve[…] | axis along the given B-spline curve |
| BezierCurve[…] | axis along the given Bézier curve |
| Circle[…] | axis along the given circle or arc |

* Infinite forms of axes draw to the edges of the graphic.

* By default, ``"Horizontal"`` and ``"Vertical"`` axes use the natural scale where the axis values correspond to the vertical and horizontal components of the underlying graphics coordinates.

* Possible settings for ``scale`` include:

|                            |                                                       |
| -------------------------- | ----------------------------------------------------- |
| {val1, val2}               | use val1 at the start of the axis and val2 at the end |
| {loc1 -> val1, loc2 -> val2} | use val1 and val2 at locations loc1 and loc2          |

* For infinite axes, the "start" and "end" points are taken to be ``pt1`` and ``pt2``.

* For ``"Horizontal"`` and ``"Vertical"`` axes, the locations ``loci`` can be specified as ``x`` and ``y`` coordinates.

* The locations ``loci`` used to define the value scale for an axis do not have to be visually present in the graphic.

* If the location ``loci`` is not on the axis, it will be projected to the nearest point that is.

* Possible options for ``AxisObject`` are:

|                       |           |                                          |
| --------------------- | --------- | ---------------------------------------- |
| AxisLabel             | None      | how to label the axis                    |
| AxisStyle             | {}        | how to style the axis path               |
| BaseStyle             | {}        | general style for the axis               |
| LabelStyle            | {}        | how to style labels                      |
| RotateLabel           | False     | how to rotate axis labels                |
| TickDirection         | Automatic | on which side of the axis to place ticks |
| TickLabelOrientation  | None      | how to rotate tick labels                |
| TickLabelPositioning  | Automatic | where to place tick labels               |
| TickLabels            | Automatic | how to label ticks                       |
| TickLengths           | Automatic | how long to draw ticks                   |
| TickPositions         | Automatic | where to place ticks along the axis      |
| Ticks                 | Automatic | individual ticks                         |
| TicksStyle            | {}        | how to style ticks                       |

* Settings for tick and label options are generally either of the form ``opt -> spec``, which uses ``spec`` for all the ticks and labels, or of the form ``opt -> {spec1, …, specn}``, where the ``speci`` correspond to collections of settings for corresponding collections of ticks and labels.

* Axes are typically drawn with two sets of ticks: "major" ticks that are longer and have labels and "minor" ticks that are shorter and unlabeled.

* By default, axis labels are placed at the end of the axis.

* ``AxisLabel -> Placed[label, pos]`` can be used to specify where the axis label should be placed.

* ``Placed`` can use the following positions ``pos`` :

|                             |                             |
| --------------------------- | --------------------------- |
| "Start"                     | the start of the axis       |
| "End"                       | the end of the axis         |
| Center                      | centered along the axis     |
| Above, Below, Before, After | placed relative to the axis |

* Possible settings for ``speci`` for ``TickPositions`` are:

|                   |                                          |
| ----------------- | ---------------------------------------- |
| Automatic         | automatically compute ticks              |
| n                 | use approximately n ticks                |
| {dx}              | use ticks that are multiples of dx       |
| {min, max, dx}    | use ticks from min to max in steps of dx |
| {{t1, t2, …, tm}} | use specific ticks ti                    |

* Possible settings for ``speci`` for ``TickLabels`` are:

|                       |                               |
| --------------------- | ----------------------------- |
| Automatic             | automatically label ticks     |
| All                   | include labels                |
| None                  | omit labels                   |
| {lab1, lab2, …, labm} | use labi to label position ti |

* The ``Automatic`` setting for ``TickLabels`` is ``All`` for ``spec1`` and ``None`` otherwise.

* The settings for ``speci`` in ``TickLengths`` are:

|                            |                                        |
| -------------------------- | -------------------------------------- |
| Automatic                  | automatic lengths                      |
| None                       | omit the tick marker                   |
| Scaled[s]                  | use a scaled length                    |
| Offset[s]                  | use an absolute length                 |
| "Major"                    | use the default length for major ticks |
| "Minor"                    | use the default length for minor ticks |
| Tiny, Small, Medium, Large | named lengths                          |

* ``TickDirection -> dir`` specifies in what direction ``dir`` the ticks should be drawn relative to the axis.

|         |                 |                                     |
| ------- | --------------- | ----------------------------------- |
| [image] | Automatic       | automatically chosen direction      |
| [image] | "Inward"        | toward the center of the graphic    |
| [image] | "Outward"       | away from the center of the graphic |
| [image] | "InwardOutward" | crosses over axis                   |
| [image] | Left            | to the left                         |
| [image] | Right           | to the right                        |
| [image] | Up              | toward the top                      |
| [image] | Down            | toward the bottom                   |

* ``TickLabelPositioning -> pos`` specifies the position ``pos`` where tick labels should be drawn relative to the tick.

* Possible settings for ``pos`` include:

|         |        |                                                 |
| ------- | ------ | ----------------------------------------------- |
| [image] | "Base" | at the base of the tick where it meets the axis |
| [image] | "Tip"  | at the tip of the tick                          |
| [image] | Before | end of the label before the tick                |
| [image] | After  | start of the label after the tick               |

* Possible settings for ``RotateLabel`` and ``TickLabelOrientation`` include:

|                    |                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------------------- |
| None, "Horizontal" | do not rotate labels                                                                            |
| "Vertical"         | rotate labels 90° counterclockwise                                                              |
| "Parallel"         | rotate labels to be parallel to the axis                                                        |
| "Perpendicular"    | rotate labels to be perpendicular to the axis                                                   |
| θ                  | rotate labels counterclockwise from horizontal by angle $\theta$  |

## Examples (54)

### Basic Examples (4)

Place a horizontal axis at $y=0$ :

```wl
In[1]:= Graphics[AxisObject[{"Horizontal", 0}], PlotRange -> {{-2, 2}, {-1, 1}}]

Out[1]= [image]
```

---

Limit the axis so that $x$ is between $-1$ and 1:

```wl
In[1]:= Graphics[AxisObject[{"Horizontal", 0, {-1, 1}}], PlotRange -> {{-2, 2}, {-1, 1}}]

Out[1]= [image]
```

---

Construct several vertical axes:

```wl
In[1]:= Graphics[{AxisObject[{"Vertical", 1, {0, 1}}], AxisObject[{"Vertical", 2, {0, 2}}], AxisObject[{"Vertical", 3, {0, 3}}]}, PlotRange -> {{0, 3}, {0, 3}}]

Out[1]= [image]
```

---

Construct an axis that is 0 at the point $\{-1,-1\}$ and 1 at the point $\{2,2\}$ :

```wl
In[1]:= Graphics[AxisObject[Line[{{-1, -1}, {2, 2}}]], Frame -> True, PlotRange -> 3]

Out[1]= [image]
```

### Scope (9)

#### Axis Placement and Scales (6)

Use a finite line for an axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{-1, -1}, {1, 1}}]], PlotRange -> 2]

Out[1]= [image]

In[2]:= Graphics[AxisObject[Line[{{-1, -1}, {1, 1}}], {0, 10}], PlotRange -> 2]

Out[2]= [image]
```

---

Use an infinite line through two points, whose values are 0 and 10:

```wl
In[1]:= Graphics[AxisObject[InfiniteLine[{{-1, -1}, {1, 1}}], {0, 10}], PlotRange -> 2]

Out[1]= [image]
```

Use a point and direction to define the infinite line:

```wl
In[2]:= Graphics[AxisObject[InfiniteLine[{-1, -1}, {1, 1}], {0, 10}], PlotRange -> 2]

Out[2]= [image]
```

---

Use a half-line through two points:

```wl
In[1]:= Graphics[AxisObject[HalfLine[{{0, 0}, {1, 1}}], {0, 10}], PlotRange -> 2]

Out[1]= [image]
```

Use a point and direction to define the half-line:

```wl
In[2]:= Graphics[AxisObject[HalfLine[{0, 0}, {1, 1}], {0, 10}], PlotRange -> 2]

Out[2]= [image]
```

---

Use a Bézier curve as the path for an axis:

```wl
In[1]:= Graphics[AxisObject[BezierCurve[{{-1, -1}, {-1, 1}, {1, 1}}]], PlotRange -> 2]

Out[1]= [image]
```

Change the values at the endpoints:

```wl
In[2]:= Graphics[AxisObject[BezierCurve[{{-1, -1}, {-1, 1}, {1, 1}}], {0, 10}], PlotRange -> 2]

Out[2]= [image]
```

---

Use a B-spline curve as the path for an axis:

```wl
In[1]:= Graphics[AxisObject[BSplineCurve[{{-1, -1}, {-1, 1}, {1, 1}}]], PlotRange -> 2]

Out[1]= [image]
```

Change the values at the endpoints:

```wl
In[2]:= Graphics[AxisObject[BSplineCurve[{{-1, -1}, {-1, 1}, {1, 1}}], {0, 10}], PlotRange -> 2]

Out[2]= [image]
```

---

Construct an axis along an arbitrary curve:

```wl
In[1]:= Graphics[AxisObject[Line[Table[{t Cos[t], t Sin[t]}, {t, 0, 5Pi, 0.1}]]]]

Out[1]= [image]
```

Specify the values at the endpoints:

```wl
In[2]:= Graphics[AxisObject[Line[Table[{t Cos[t], t Sin[t]}, {t, 0, 5Pi, 0.1}]], {0, 10}]]

Out[2]= [image]
```

#### Tick Placement (3)

Use approximately five ticks on the axis:

```wl
In[1]:= Graphics[AxisObject[{"Horizontal", 0, {-5, 5}}, TickPositions -> {5}]]

Out[1]= [image]
```

Further subdivide the axis into approximately five minor ticks per major interval:

```wl
In[2]:= Graphics[AxisObject[{"Horizontal", 0, {-5, 5}}, TickPositions -> {5, 5}]]

Out[2]= [image]
```

---

Place ticks at positions from $-5$ to 5 in steps of 1:

```wl
In[1]:= Graphics[AxisObject[{"Horizontal", 0, {-5, 5}}, TickPositions -> {{-5, 5, 1}}]]

Out[1]= [image]
```

Include minor ticks at multiples of 0.2:

```wl
In[2]:= Graphics[AxisObject[{"Horizontal", 0, {-5, 5}}, TickPositions -> {{-5, 5, 1}, {-5, 5, 0.2}}]]

Out[2]= [image]
```

---

Place ticks at specific locations:

```wl
In[1]:= Graphics[AxisObject[{"Horizontal", 0, {-5, 5}}, TickPositions -> {{{-5, -2, -1, 0, 1, 2, 5}}}]]

Out[1]= [image]
```

Include minor ticks at multiples of 1:

```wl
In[2]:= Graphics[AxisObject[{"Horizontal", 0, {-5, 5}}, TickPositions -> {{{-5, -2, -1, 0, 1, 2, 5}}, {-5, 5, 1}}, TickLabels -> {All, None}]]

Out[2]= [image]
```

### Options (39)

#### AxisLabel (4)

The label is placed at the end of the axis by default:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisLabel -> "hello"]]

Out[1]= [image]
```

---

Label the start of the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisLabel -> Placed["hello", "Start"]]]

Out[1]= [image]
```

---

Place the label close to the axis above or below it:

```wl
In[1]:= {Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisLabel -> Placed["hello", Above]]], Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisLabel -> Placed["hello", Below]]]}

Out[1]= {[image], [image]}
```

Before and after the axis:

```wl
In[2]:= {Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisLabel -> Placed["hello", Before]]], Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisLabel -> Placed["hello", After]]]}

Out[2]= {[image], [image]}
```

---

Center the label along the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisLabel -> Placed["hello", Center]]]

Out[1]= [image]
```

Rotate the label to be parallel to the axis:

```wl
In[2]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisLabel -> Placed["hello", Center], RotateLabel -> "Parallel"]]

Out[2]= [image]
```

#### AxisStyle (3)

``AxisStyle`` affects only the style of the axis path:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisStyle -> Blue]]

Out[1]= [image]
```

---

``AxisStyle -> Transparent`` will hide the axis curve, leaving only the ticks and labels:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisStyle -> Transparent]]

Out[1]= [image]
```

---

``AxisStyle`` inherits from the overall base style for the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisStyle -> Thick, BaseStyle -> Red]]

Out[1]= [image]
```

#### BaseStyle (3)

Construct a red axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, BaseStyle -> Red]]

Out[1]= [image]
```

---

``AxisStyle`` affects only the style of the axis path:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, AxisStyle -> Blue, BaseStyle -> Red]]

Out[1]= [image]
```

---

``TicksStyle`` affects the style of the ticks, including their labels:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TicksStyle -> Blue, BaseStyle -> Red]]

Out[1]= [image]
```

#### LabelStyle (4)

``LabelStyle`` affects only the style of the labels:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, LabelStyle -> Blue]]

Out[1]= [image]

In[2]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, LabelStyle -> Blue, BaseStyle -> Red]]

Out[2]= [image]
```

---

Use ``LabelStyle -> size`` to specify the font size for the labels:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, LabelStyle -> 16]]

Out[1]= [image]
```

---

Specify a font and font size for the labels:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, LabelStyle -> {FontFamily -> "Times", 15}]]

Out[1]= [image]
```

---

``LabelStyle`` inherits from the overall base style for the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, LabelStyle -> 16, BaseStyle -> Red]]

Out[1]= [image]
```

#### TickDirection (4)

By default, ticks point up and to the right:

```wl
In[1]:= Graphics[{AxisObject[Line[{{-2, -3}, {2, -3}}], {0, 10}], AxisObject[Line[{{-2, 3}, {2, 3}}], {0, 10}], AxisObject[Line[{{-3, -2}, {-3, 2}}], {0, 10}], AxisObject[Line[{{3, -2}, {3, 2}}], {0, 10}]}]

Out[1]= [image]
```

---

Point all the ticks toward the center of the graphic:

```wl
In[1]:= Graphics[{AxisObject[Line[{{-2, -3}, {2, -3}}], {0, 10}, TickDirection -> "Inward"], AxisObject[Line[{{-2, 3}, {2, 3}}], {0, 10}, TickDirection -> "Inward"], AxisObject[Line[{{-3, -2}, {-3, 2}}], {0, 10}, TickDirection -> "Inward"], AxisObject[Line[{{3, -2}, {3, 2}}], {0, 10}, TickDirection -> "Inward"]}]

Out[1]= [image]
```

---

Point all the ticks away from the center of the graphic:

```wl
In[1]:= Graphics[{AxisObject[Line[{{-2, -3}, {2, -3}}], {0, 10}, TickDirection -> "Outward"], AxisObject[Line[{{-2, 3}, {2, 3}}], {0, 10}, TickDirection -> "Outward"], AxisObject[Line[{{-3, -2}, {-3, 2}}], {0, 10}, TickDirection -> "Outward"], AxisObject[Line[{{3, -2}, {3, 2}}], {0, 10}, TickDirection -> "Outward"]}]

Out[1]= [image]
```

---

Use ticks that point to the left or right:

```wl
In[1]:= Graphics[{AxisObject[Line[{{-1, -1}, {-1, 1}}], {0, 10}, TickDirection -> Right], AxisObject[Line[{{1, -1}, {1, 1}}], {0, 10}, TickDirection -> Left]}]

Out[1]= [image]
```

Use ticks that point up or down:

```wl
In[2]:= Graphics[{AxisObject[Line[{{-1, -1}, {1, -1}}], {0, 10}, TickDirection -> Up], AxisObject[Line[{{-1, 1}, {1, 1}}], {0, 10}, TickDirection -> Down]}]

Out[2]= [image]
```

#### TickLabels (3)

Ticks are automatically labeled by default:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickLabels -> Automatic]]

Out[1]= [image]
```

---

Use automatic labels for the first collection of ticks and no labels for the second:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickPositions -> {{0, 10, 2}, {1, 9, 2}}, TickLabels -> {All, None}]]

Out[1]= [image]
```

Reverse the labeling of tick collections:

```wl
In[2]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickPositions -> {{0, 10, 2}, {1, 9, 2}}, TickLabels -> {None, All}]]

Out[2]= [image]
```

---

Use specific labels for each tick:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickPositions -> {{0, 10, 1}}, TickLabels -> {CharacterRange["a", "k"]}]]

Out[1]= [image]
```

#### TickLabelOrientation (5)

Tick labels are horizontal by default:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickLabelOrientation -> "Horizontal"]]

Out[1]= [image]
```

---

Rotate the labels 90° so that they read bottom to top:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickLabelOrientation -> "Vertical"]]

Out[1]= [image]
```

---

Rotate the labels so that the text is parallel to the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickLabelOrientation -> "Parallel"]]

Out[1]= [image]
```

---

Rotate the labels so that the text is perpendicular to the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickLabelOrientation -> "Perpendicular"]]

Out[1]= [image]
```

---

Rotate the labels by an arbitrary angle:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 0}}], {0, 10}, TickLabelOrientation -> 45Degree]]

Out[1]= [image]
```

#### TickLabelPositioning (2)

Tick labels are placed at the base of the tick by default:

```wl
In[1]:= Graphics[{AxisObject[Line[{{0, 2}, {10, 2}}], {0, 10}, TickDirection -> Down], AxisObject[Line[{{0, -2}, {10, -2}}], {0, 10}, TickDirection -> Up]}]

Out[1]= [image]
```

---

Place the labels at the tip of the tick:

```wl
In[1]:= Graphics[{AxisObject[Line[{{0, 2}, {10, 2}}], {0, 10}, TickDirection -> Down, TickLabelPositioning -> "Tip"], AxisObject[Line[{{0, -2}, {10, -2}}], {0, 10}, TickDirection -> Up, TickLabelPositioning -> "Tip"]}]

Out[1]= [image]
```

#### TickLengths (3)

Use the default lengths for major and minor ticks:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}]]

Out[1]= [image]
```

---

Use a scaled length for all the ticks:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickLengths -> 0.1]]

Out[1]= [image]
```

---

Use different tick lengths for different collections of ticks:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickLengths -> {0.2, 0.1}]]

Out[1]= [image]
```

#### TickPositions (5)

Use approximately six ticks along the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickPositions -> {6}]]

Out[1]= [image]
```

---

Use major and minor ticks:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickPositions -> {6, 6}]]

Out[1]= [image]
```

---

Use ticks at integer positions along the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickPositions -> {{1}}]]

Out[1]= [image]
```

---

Specify the lower and upper bounds for the ticks:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickPositions -> {{0, 5, 1}}]]

Out[1]= [image]
```

---

Give a list of specific tick locations for the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickPositions -> {{{1, 2, 3, 5, 7, 10}}}]]

Out[1]= [image]
```

#### TicksStyle (3)

``TicksStyle`` styles both the tick marks and labels:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TicksStyle -> Blue]]

Out[1]= [image]
```

---

Use different styles for different collections of ticks:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TickPositions -> {{0, 10, 2}, {1, 9, 2}}, TickLengths -> 0.1, TicksStyle -> {Red, Blue}]]

Out[1]= [image]
```

---

``TicksStyle`` inherits from the overall base style for the axis:

```wl
In[1]:= Graphics[AxisObject[Line[{{0, 0}, {10, 10}}], {0, 10}, TicksStyle -> Thick, BaseStyle -> Red]]

Out[1]= [image]
```

### Applications (2)

Create a ruler labeled down to the quarter-inch:

```wl
In[1]:= Graphics[AxisObject[{"Horizontal", 0, {0, 12}}, {0, 5}, TickPositions -> {{0, 6, 1}, {0.5, 6, 1}, {0.25, 6, 0.5}, {0.125, 6, 0.25}}, TickLabels -> {Automatic, Automatic, Automatic, None}, TickLengths -> {0.75, 0.6, 0.4, 0.3}, TickDirection -> Up, TickLabelPositioning -> "Tip", AxisLabel -> Placed["INCH", {0.0, {1.1, 1.2}}], RotateLabel -> 270 °]]

Out[1]= [image]
```

---

Use three axes to construct a frame for ternary plots:

```wl
In[1]:=
ternaryFrame = Graphics[{
	AxisObject[Line[{{1, 0}, {0, 0}}], {0, 100}, AxisLabel -> Placed["Component A", {0.5, {0.5, 2.5}}], RotateLabel -> Automatic, TickDirection -> "Inward"], AxisObject[Line[{{0, 0}, {0.5, Sqrt[3] / 2.}}], {0, 100}, AxisLabel -> Placed["Component B", {0.5, {0.5, -2.0}}], RotateLabel -> 60Degree, TickDirection -> "Inward"], AxisObject[Line[{{0.5, Sqrt[3] / 2.}, {1, 0}}], {0, 100}, AxisLabel -> Placed["Component C", {0.5, {0.5, -2.0}}], RotateLabel -> -60Degree, TickDirection -> "Inward"]}, PlotRange -> {{0, 1}, {0, 1}}]

Out[1]= [image]
```

Create a ternary list plot:

```wl
In[2]:= ternary[{x_, y_, z_}] := Normalize[{x, y, z}, Total].{{0, 0}, {0.5, Sqrt[3] / 2.}, {1, 0}}

In[3]:= data = Table[Tooltip[Point[ternary[{x, y, z}]], {x, y, z}], {x, 0, 100, 25}, {y, 0, 100, 25}, {z, 0, 100, 25}];

In[4]:= Show[Graphics[{Blue, data}], ternaryFrame]

Out[4]= [image]
```

## See Also

* [`Graphics`](https://reference.wolfram.com/language/ref/Graphics.en.md)
* [`Axes`](https://reference.wolfram.com/language/ref/Axes.en.md)
* [`Frame`](https://reference.wolfram.com/language/ref/Frame.en.md)
* [`Line`](https://reference.wolfram.com/language/ref/Line.en.md)
* [`InfiniteLine`](https://reference.wolfram.com/language/ref/InfiniteLine.en.md)
* [`HorizontalGauge`](https://reference.wolfram.com/language/ref/HorizontalGauge.en.md)
* [`VerticalGauge`](https://reference.wolfram.com/language/ref/VerticalGauge.en.md)
* [`NumberLinePlot`](https://reference.wolfram.com/language/ref/NumberLinePlot.en.md)
* [`BulletGauge`](https://reference.wolfram.com/language/ref/BulletGauge.en.md)
* [`AngularGauge`](https://reference.wolfram.com/language/ref/AngularGauge.en.md)
* [`Ticks`](https://reference.wolfram.com/language/ref/Ticks.en.md)
* [`FrameTicks`](https://reference.wolfram.com/language/ref/FrameTicks.en.md)

## Related Guides

* [Graphics Objects](https://reference.wolfram.com/language/guide/GraphicsObjects.en.md)

## History

* [Introduced in 2021 (12.3)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn123.en.md)