LinesVisible, ULinesVisible, VLinesVisible, XLinesVisible, YLinesVisible

Visibility of lines

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

LinesVisible, ULinesVisible, VLinesVisible, XLinesVisible, YLinesVisibleInheritedFALSE, or TRUE


LinesVisible = TRUE versus LinesVisible = FALSE governs the visibility of line objects.

ULinesVisible, VLinesVisible governs the visibility of coordinate lines on parametrized surfaces in 3D.

XLinesVisible, YLinesVisible governs the visibility of coordinate lines on 3D function graphs and matrix plots.

For most object types, LinesVisible determines whether lines are drawn. This includes the lines making up 2D function plots, curves, polygons, etc. as well as the circumference of (filled) circles, the edges of 2D rectangles and 3D boxes etc.

The exception are surface objects that exhibit parameter lines in two directions, such as 3D function plots, parameterized surfaces, tube plots etc. Depending on whether they react to XMesh, YMesh or to UMesh, VMesh, the parameter lines on the surfaces can be made visible or invisible with the attributes XLinesVisible, YLinesVisible or ULinesVisible, VLinesVisible, respectively.

Note that setting LinesVisible = FALSE for a 2D function plot without setting PointsVisible = TRUE will render the function invisible. (In case of singular functions, the vertical asymptotes may remain visible, though).

The same holds true for plots involving filled areas: switching off the lines and the filling makes such objects invisible.

LinesVisible etc. do not have an effect on coordinate axes and coordinate grid lines. Use the attributes AxesVisible and GridVisible to control the visibility of axes and coordinate grid.


Example 1

By default, the lines of a box are visible:

plot(plot::Box(1..4, 2..5, 3..6), Axes = None)

We set LinesVisible = FALSE to switch them off:

plot(plot::Box(1..4, 2..5, 3..6, LinesVisible = FALSE),
     Axes = None)

Example 2

By default, parameter lines are drawn on a parametrized surface:

plot(plot::Surface([u*cos(v), u*sin(v), u^2*sin(5*v)],
                   u = 0..2, v = 0..2*PI, VSubmesh = 3)):

You can switch these lines off interactively, or, as we do here, by setting ULinesVisible and VLinesVisible to FALSE in the plot command:

plot(plot::Surface([u*cos(v), u*sin(v), u^2*sin(5*v)],
                   u = 0..2, v = 0..2*PI, VSubmesh = 3,
                   ULinesVisible = FALSE, 
                   VLinesVisible = FALSE)):

When the surface is created with an adaptive mesh, we can make the irregular adaptive mesh visible by setting MeshVisible = TRUE:

plot(plot::Surface([u*cos(v), u*sin(v), u^2*sin(5*v)],
                   u = 0..2, v = 0..2*PI,
                   UMesh =  5, VMesh = 10, 
                   ULinesVisible = FALSE,
                   VLinesVisible = FALSE,
                   AdaptiveMesh = 3,
                   MeshVisible = TRUE)):

Example 3

We plot a dodecahedron with and without the border lines of its faces:

plot(plot::Scene3d(plot::Dodecahedron(LinesVisible = TRUE)),
     plot::Scene3d(plot::Dodecahedron(LinesVisible = FALSE)),
     Layout = Horizontal, Axes = None):