Edit
The offset
is the movement of the dash
(but need to $\mod (r1+r2)$). Just like a TranslationTransform[offset]
or similar with RotateLeft
.

r1 = 2/3;
r2 = 1/3;
Manipulate[
Graphics[{Line[{{0, 0}, {1, 0}}], Dashing[{r1, r2}, offset],
Opacity[.3], Thickness[.25], Red, Line[{{0, 0}, {1, 0}}]},
PlotRange -> {{0, 1}, {-.2, .2}}], {offset, 0, r1 + r2},
ControlPlacement -> Top]

Original
A long comment.
- For arbitrary positive or negative
offset
, the final offset
is the remainder on division of r1+r2
by offset
. For example, offset=9
, r1 = .1;r2 = .05;
,then the final offset
is
r1 = .1;
r2 = .05;
offset=9;
Mod[offset,r1+r2,0]
( * 0.15 *)
We can see they are the same in the animation.
r1 = .1;
r2 = .05;
Manipulate[
Show[Plot[Sin[x], {x, 0, 3 π},
PlotStyle -> Dashing[{r1, r2}, offset]],
Plot[Sin[x], {x, 0, 3 π},
PlotStyle -> {Opacity[.2], Red, Thickness[.03],
Dashing[{r1, r2}, Mod[offset, r1 + r2, 0]]}]], {offset, 0,
2 (r1 + r2)}, ControlPlacement -> Top]

- If we set
{r1,r2},offset
, then {r2,r1},r2+offset
is the complement.

r1 = .1;
r2 = .05;
Manipulate[
Show[Plot[Sin[x], {x, 0, 3 π},
PlotStyle -> Dashing[{r1, r2}, offset]],
Plot[Sin[x], {x, 0, 3 π},
PlotStyle -> {Opacity[.2], Red, Thickness[.03],
Dashing[{r2, r1}, r2 + offset]}]], {offset, 0, 10}]

- But I still don't understand the meaning of the size of
r1=2/3
and r2=1/3
etc. The difference results as below still confuse me.
r1 = 2/3;
r2 = 1/3;
offset = 0;
{Plot[Sin[x], {x, 0, 3},
PlotStyle -> {Red, Dashing[{r1, r2}, offset]}],
Plot[x, {x, 0, 3}, PlotStyle -> {Red, Dashing[{r1, r2}, offset]}],
Plot[0, {x, 0, 3},
PlotStyle -> {Red, Dashing[{r1, r2}, offset]}]} // GraphicsRow
