# Axis

The axis is just a scene object, making it easy to manipulate and share between plots. Axis objects also contains the mapping you want to apply to the data and can interactively be changed. An Axis object can be created from any boundingbox and inserted into any plot.

There are two types of axes: Axis2D and Axis3D.

## Interacting with the Axis

One can quite easily interact with the attributes of the axis like with any other plot.

You can access the axis of a scene by doing

axis = scene[Axis]

The axis attributes are nested, and there are different attributes depending on whether it is an Axis2D or Axis3D object.

You can access the nested attributes in multiple ways. Take the nested attribute axis -> :names -> :axisnames, for example:

1. axis[:names, :axisnames] = ("x", "y", "z")
2. axis[:names][:axisnames] = ("x", "y", "z")
3. axis = (names = (axisnames = ("x", "y", "z"),),)

## Axis2D

### Axis2D attributes groups

SymbolDescription
frameSee the detailed descriptions for frame attributes.
gridSee the detailed descriptions for grid attributes.
namesSee the detailed descriptions for names attributes.
ticksSee the detailed descriptions for ticks attributes.

#### :grid

SymbolDescription
linecolorSymbol or Colorant. Specifies the color of the grid lines. Can be a color symbol/string like :red, or a Colorant.
linestyle
linewidthNTuple{2, Number}. Width of the x and y grids.

#### :ticks

SymbolDescription
alignNTuple{2,(:pos, :pos)}. Specify the text alignment for the axis ticks, where :pos can be :left, :center, or :right
fontNTuple{2,String}. Specifies the font and can name any font available on the system.
gapNumber. Specifies the gap (in pixels) between the axis tick labels and the axes themselves.
linecolorNTuple{2,Symbol or Colorant}. Specifies the color of the grid lines. Can be a color symbol/string like :red, or a Colorant.
linestyle
linewidthNTuple{2,Number}. Width of the axes ticks.
rotationNTuple{3,Float32}. Specifies the rotations for each axis's ticks, in radians.
textcolorNTuple{2,Symbol or Colorant}. Specifies the color of the axes ticks. Can be a color symbol/string like :red, or a Colorant.
textsizeNTuple{2,Int}. Font pointsize for tick labels.
title_gapNumber. Specifies the gap (in pixels) between the axis titles and the axis tick labels.

#### :frame

SymbolDescription
arrow_sizeNumber. Size of the axes arrows.
axis_arrowBool. Toggles the axes arrows.
axis_position
framesNTuple{2,NTuple{2,Bool}}.
linecolorSymbol or Colorant. Specifies the color of the grid lines. Can be a color symbol/string like :red, or a Colorant.
linestyle
linewidthNumber. Widths of the axes frame lines.

#### :names

SymbolDescription
align(:pos, :pos). Specify the text alignment, where :pos can be :left, :center, or :right.
axisnamesNTuple{2,String}. Specifies the text labels for the axes.
fontNTuple{2,String}. Specifies the font and can name any font available on the system.
rotationNTuple{3,Float32}. Specifies the rotations for each axis's label, in radians.
textcolorNTuple{2,Symbol or Colorant}. Specifies the color of the axes labels. Can be a color symbol/string like :red, or a Colorant.
textsizeInteger. Font pointsize for text.

## Axis3D

### Axis3D attributes groups

SymbolDescription
frameSee the detailed descriptions for frame attributes.
namesSee the detailed descriptions for names attributes.
scaleNTuple{3,Float}. Specifies the scaling for the axes.
showaxisNTuple{3,Bool}. Specifies whether to show the axes.
showgridNTuple{3,Bool}. Specifies whether to show the axis grids.
showticksNTuple{3,Bool}. Specifies whether to show the axis ticks.
ticksSee the detailed descriptions for ticks attributes.

#### :ticks

SymbolDescription
alignNTuple{3,(:pos, :pos)}. Specify the text alignment for the axis ticks, where :pos can be :left, :center, or :right.
fontNTuple{3,String}. Specifies the font for the axis ticks, and can choose any font available on the system.
gapNumber. Specifies the gap (in pixels) between the axis ticks and the axes themselves.
rotationNTuple{3,Quaternion{Float32}}. Specifies the rotations for each axis's ticks, in radians.
textcolorNTuple{3,Symbol or Colorant}. Specifies the color of the axes ticks. Can be a color symbol/string like :red, or a Colorant.
textsizeInteger. Font pointsize for text.

#### :frame

SymbolDescription
axiscolorSymbol or Colorant. Specifies the color of the axes. Can be a color symbol/string like :red, or a Colorant.
linecolorSymbol or Colorant. Specifies the color of the grid lines. Can be a color symbol/string like :red, or a Colorant.
linewidthNumber. Width of the axes grid lines.

#### :names

SymbolDescription
alignNTuple{3,(:pos, :pos)}. Specify the text alignment for the axis labels, where :pos can be :left, :center, or :right.
axisnamesNTuple{3,String}. Specifies the axis labels.
fontNTuple{3,String}. Specifies the font for the axis labels, and can choose any font available on the system.
gapNumber. Specifies the gap (in pixels) between the axis labels and the axes themselves.
rotationNTuple{3,Quaternion{Float32}}. Specifies the rotations for each axis's label, in radians.
textcolorNTuple{3,Symbol or Colorant}. Specifies the color of the axes labels. Can be a color symbol/string like :red, or a Colorant.
textsizeNTuple{3,Int}. Font pointsize for axes labels.