Dashing

Dashing[{r1,r2,}]

is a two-dimensional graphics directive specifying that lines that follow are to be drawn dashed, with successive segments of lengths r1, r2, (repeated cyclically). The ri are given as a fraction of the total width of the graph.

Dashing[r]

is equivalent to Dashing[{r,r}].

Details

  • Dashing can be used in both two- and three-dimensional graphics, as well as in Style specifications.
  • Dashing[{}] specifies that lines should be solid. »
  • The following symbolic forms for r can be used: Tiny, Small, Medium, and Large. These specify absolute segment lengths independent of the total width of the graphic. »
  • If a segment has a length ri specified as 0, it is drawn as a dot whose diameter is the thickness of the line. »

Examples

open allclose all

Basic Examples  (4)

Specify the dashing of lines as successive segments with scaled lengths:

Set the dashing of edges of polygons:

Set the dashing of lines in plots using PlotStyle:

Set the dashing of the frame:

Scope  (6)

Dashing Specifications  (3)

No dashing:

Dashing[r] is equivalent to Dashing[{r,r}]:

Symbolic values for predefined absolute dashings:

Specify multiple cyclic segments:

Primitives Affected  (3)

Specify the dashing of the shaft of an arrow:

Specify the dashing of edges of primitives using EdgeForm:

Properties & Relations  (5)

Use Dashed, Dotted, and DotDashed to specify predefined absolute dashings:

Dashing defines the length of a segment as a fraction of the total width of the graphic:

Dashing depends on the image size:

AbsoluteDashing defines the length of a segment in units of printer's points:

AbsoluteDashing is independent of the image size:

The thickness of segments can be specified by Thickness:

A segment with length 0 specifies a dot of the size defined by Thickness:

Neat Examples  (2)

Randomly dashed circles:

A curve with a random dash pattern:

Introduced in 1988
 (1.0)
 |
Updated in 2007
 (6.0)