\dashline

SYNOPSIS:
\dashline[stretch]{dash-length}[inter-dot-gap for dash](x1,y1)(x2,y2)...(xn,yn)

where stretch is an integer between -100 and infinity.

The above command connects the specified points by drawing a dashline between each pair of coordinates. At least two points must be specified. A \dashline is a dashed line where each dash is constructed using a dottedline1. The dash-length is the length of the dash and inter-dot-gap is the gap between each dot that is used to construct the dash, both in unitlengths.

By default, a solid looking dash is constructed, but by specifying an inter-dot-gap in the third argument, different looking dashes may be constructed. With a large inter-dot-gap (about >0.4mm), each dash will have the appearance of a little dotted line. One can create a variety of dashlines where each dash looks different. Here are a few sample dashlines:


\begin{picture}(150,30)(0,-5)
\dashline{4}[0.7](0,18)(60,18)\thicklines
\dash...
...\\
\char '134 dashline[-30]\char '173 4\char '175 (0,7)(60,7)
}}}
\end{picture}

The stretch in [ ] is an integer percentage and implies a certain ``stretch'' for positive values and ``shrink'' for negative values; it is optional and by default is ``0'' unless the default itself has been changed (described later). The number ``0'' signifies that a minimum number of dashes be put such that they are approximately equally spaced with the empty spaces between them. A +ve number means increase the number of dashes by stretch percent, and a -ve number means reduce by that percent. By reducing the number of dashes, the empty space between dashes is stretched while maintaining the symmetry. The lower limit on stretch is obviously -100 since at less than -100% reduction one essentially gets nothing. On the upper side, the number, theoretically, can be as large as infinity (barring arithmetic overflows) and the macro does not check for any upper bound; one should normally not require more than 100 percent increase (100 ⇒ double the number of dashes) since that would essentially mean a ``solid line'' and it is more efficient to use the \drawline command for drawing such lines, as described later.

The idea behind the stretch percentage option is that if several dashed lines of different lengths are being drawn, then all the dashed lines with the same -ve or +ve stretch will have similar visual appearance, as might be desired if one were plotting a graph — one would like a particular ``curve'' to look the same between all the points on that curve. Also, it can be used to take any corrective actions, if the appearance of the default dashline does not meet one's approval.

The default stretch percentage can be changed by a \renewcommand on the parameter
\dashlinestretch any time and it takes effect immediately. The argument is the integer percentage increase or reduction that will be applied to all \dashline commands except the ones in which the percentage is explicitly given using [ ] optional parameter. For example, all dashlines could be reduced by 50 percent by putting the following line before using any \dashline command:
\renewcommand{\dashlinestretch}{-50} % ONLY INTEGERS PERMITTED.

An explicit argument to the \dashline command in [ ] overrides any default values, so for instance, after the above declaration, if a dashline with ``0'' stretch was desired, then one would simply say:
\dashline[0]{...}(x1,y1)(x2,y2) % where "0" implies no stretch or shrink

A note about dashlines of small length. All dashlines always have a dash beginning at the first coordinate and another ending at the second coordinate, which implies that a minimum of two dashes are plotted. For small lines (or larger lines with accordingly larger sized dashes) the dash-length is reduced as much as necessary to meet above conditions; in such cases, if necessary, the -ve stretch arguments are ignored. Such dashlines usually do not have an acceptable appearance, and may either be omitted or be plotted separately as a dottedline or a dashline with a small dash-length.