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 , , ... (repeated cyclically). The are given as a fraction of the total width of the graph.

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

DetailsDetails

  • 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 specified as , it is drawn as a dot whose diameter is the thickness of the line. »

ExamplesExamplesopen allclose all

Basic Examples (4)Basic Examples (4)

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

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Set the dashing of edges of polygons:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=

Set the dashing of lines in plots using PlotStyle:

In[1]:=
Click for copyable input
Out[1]=

Set the dashing of the frame:

In[1]:=
Click for copyable input
Out[1]=
New in 1 | Last modified in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »