Skip to Main Content Skip to Search
Product Documentation

LineWidthwidth of lines

LineWidth governs the physical width of lines in 2D and 3D.

→ Examples

Attribute

Type

Value

See Also:

AxesLineWidth, GridLineWidth, LineColor, LineColorType, LineStyle, LinesVisible

Details:

Example 1

We draw a house with thick walls:

plot(plot::Polygon2d(
     [[0, 0], [0, 3], [2, 5], [4, 3], [0, 3],
      [4, 0], [0, 0], [4, 3], [4, 0] ],
     LineWidth = 4*unit::mm, Color = RGB::Grey),
     Axes = None):

MuPAD graphics

The building instructions are added by arrows. The drawing order is indicated by the titles of the arrows and their increasing line width:

plot(plot::Polygon2d(
     [[0, 0], [0, 3], [2, 5], [4, 3], [0, 3],
      [4, 0], [0, 0], [4, 3], [4, 0] ],
     LineWidth = 4*unit::mm, Color = RGB::Grey),
     plot::Arrow2d([0, 0], [0, 3], LineWidth = 0.3*unit::mm,
                   Title = "1", TitlePosition = [0.2, 1.4]),
     plot::Arrow2d([0, 3], [2, 5], LineWidth = 0.5*unit::mm,
                   Title = "2", TitlePosition = [0.5, 3.9]),
     plot::Arrow2d([2, 5], [4, 3], LineWidth = 0.7*unit::mm,
                   Title = "3", TitlePosition = [3.4, 3.9]),
     plot::Arrow2d([4, 3], [0, 3], LineWidth = 0.9*unit::mm,
                   Title = "4", TitlePosition = [1.9, 3.2]),
     plot::Arrow2d([0, 3], [4, 0], LineWidth = 1.1*unit::mm,
                   Title = "5", TitlePosition = [1.0, 2.5]),
     plot::Arrow2d([4, 0], [0, 0], LineWidth = 1.3*unit::mm,
                   Title = "6", TitlePosition = [1.9, 0.2]),
     plot::Arrow2d([0, 0], [4, 3], LineWidth = 1.5*unit::mm,
                   Title = "7", TitlePosition = [0.7, 0.9]),
     plot::Arrow2d([4, 3], [4, 0], LineWidth = 1.7*unit::mm,
                   Title = "8", TitlePosition = [3.7, 1.4]),
     Axes = None,
     TipLength = 5*unit::mm
    ):

MuPAD graphics

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS