TickedStroke patheffect
Matplotlib's patheffects can be used to alter the way paths
are drawn at a low enough level that they can affect almost anything.
The patheffects guide details the use of patheffects.
The TickedStroke patheffect illustrated here
draws a path with a ticked style. The spacing, length, and angle of
ticks can be controlled.
See also the Lines with a ticked patheffect example.
See also the Contouring the solution space of optimizations example.



