AxesVisible, XAxisVisible, YAxisVisible, ZAxisVisible

Display coordinate axes?

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Value Summary

AxesVisibleLibrary wrapper for “{XAxisVisible, YAxisVisible}” (2D), “{XAxisVisible, YAxisVisible, ZAxisVisible}” (3D)TRUE, FALSE, or list of 2 or 3 of these, depending on the dimension
XAxisVisible, YAxisVisible, ZAxisVisibleInheritedFALSE, or TRUE

Graphics Primitives

ObjectsDefault Values
plot::CoordinateSystem2d

AxesVisible, XAxisVisible, YAxisVisible: TRUE

plot::CoordinateSystem3d

AxesVisible, XAxisVisible, YAxisVisible, ZAxisVisible: TRUE

Description

With AxesVisible = TRUE versus AxesVisible = FALSE all coordinate axes are “switched on” or “off”.

With XAxisVisible etc., the coordinate axes in the different coordinate directions can be switched on and off, separately.

With Axes = Box, the coordinate axes are displayed as a box about the scene. With XAxisVisible = FALSE etc., the four edges of this box parallel to the respective axis are suppressed.

Alternatively to AxesVisible = FALSE, you may switch the axes off by setting Axes = None, too.

Examples

Example 1

In the following illustration, you probably do not want any axes:

plot(
  plot::Arrow2d([1.5, 1], [2.5, 3],
                Title = "a", TitlePosition = [2.05, 1.9],
                LineStyle = Dashed, Color = RGB::Red),
  plot::Arrow2d([1, 2], [2.5, 3],
                Title = "b", TitlePosition = [1.6, 2.5],
                LineStyle = Dashed, Color = RGB::Blue),
  plot::Arrow2d([0, 0], [1, 2], Color = RGB::Red,
                 Title = "a", TitlePosition = [0.4, 1.0]),
  plot::Arrow2d([0, 0], [1.5, 1], Color = RGB::Blue,
                Title = "b", TitlePosition = [0.8, 0.3]),
  plot::Arrow2d([0, 0], [2.5, 3], Color = RGB::Black,
                Title = "a + b", TitlePosition = [1.35, 1.3]),
  AxesVisible = FALSE, TitleFont = [14],
  TipLength = 5.0*unit::mm, LineWidth = 1.0*unit::mm, 
  HeaderFont = [20], Header = "how to add two vectors"
)

Example 2

Using the default axes style Axes = Box in 3D, we suppress all parts of the axes box in the x direction:

plot(plot::Sphere(1, [0, 0, 0]), XAxisVisible = FALSE):