# 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}].

Dashing[{r1,r2,},offset]

offsets the dashes by offset.

Dashing[{r1,r2,},offset,capform]

sets the CapForm for individual dashes to capform.

# 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. »
• offset is specified as a fraction of the total width of the graph, and it may be positive or negative. If offset is not specified, it is 0.
• capform can take any of the legal form values in CapForm[form]. If not specified, all segments will be drawn with the "Butt" cap form.

# 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(8)

### Dashing Specifications(5)

No dashing:

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

Symbolic values for predefined absolute dashings:

Specify multiple cyclic segments:

Specify offset to dashed segments:

Specify caps to dashed segments:

### Primitives Affected(3)

Specify the dashing of the shaft of an arrow:

Specify the dashing of edges of primitives using EdgeForm:

## Properties & Relations(6)

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:

Dashing overrides the CapForm directive:

Specify the third argument to Dashing to set a cap form for all dashes:

## Possible Issues(1)

Line caps add to the length of individual dashes and may cause closely spaced dashes to overlap:

## Neat Examples(3)

Randomly dashed circles:

A curve with a random dash pattern:

Vary the offset for dashed rays out of the origin:

Wolfram Research (1988), Dashing, Wolfram Language function, https://reference.wolfram.com/language/ref/Dashing.html (updated 2021).

#### Text

Wolfram Research (1988), Dashing, Wolfram Language function, https://reference.wolfram.com/language/ref/Dashing.html (updated 2021).

#### CMS

Wolfram Language. 1988. "Dashing." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Dashing.html.

#### APA

Wolfram Language. (1988). Dashing. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Dashing.html

#### BibTeX

@misc{reference.wolfram_2024_dashing, author="Wolfram Research", title="{Dashing}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Dashing.html}", note=[Accessed: 24-June-2024 ]}

#### BibLaTeX

@online{reference.wolfram_2024_dashing, organization={Wolfram Research}, title={Dashing}, year={2021}, url={https://reference.wolfram.com/language/ref/Dashing.html}, note=[Accessed: 24-June-2024 ]}