Is there a way to get values for predefined dash patterns such as dotted? I would like to use those in another program to create the same visual experience. Or do I have to define my own patterns in order to have the same values?
Asked
Active
Viewed 6.5k times
108
Andrey Vihrov
- 22,325
Eike
- 1,083
1 Answers
172
You can find the definitions of these and many others in the tikz.code.tex file in your distribution (e.g. MikTeX has it under C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pgf\frontendlayer\tikz\ )
\tikzstyle{solid}= [dash pattern=]
\tikzstyle{dotted}= [dash pattern=on \pgflinewidth off 2pt]
\tikzstyle{densely dotted}= [dash pattern=on \pgflinewidth off 1pt]
\tikzstyle{loosely dotted}= [dash pattern=on \pgflinewidth off 4pt]
\tikzstyle{dashed}= [dash pattern=on 3pt off 3pt]
\tikzstyle{densely dashed}= [dash pattern=on 3pt off 2pt]
\tikzstyle{loosely dashed}= [dash pattern=on 3pt off 6pt]
\tikzstyle{dashdotted}= [dash pattern=on 3pt off 2pt on \the\pgflinewidth off 2pt]
\tikzstyle{densely dashdotted}= [dash pattern=on 3pt off 1pt on \the\pgflinewidth off 1pt]
\tikzstyle{loosely dashdotted}= [dash pattern=on 3pt off 4pt on \the\pgflinewidth off 4pt]
For quick comparison, see the output below:
percusse
- 157,807

\thein thedashdottedvariants, but not in thedottedvariants? – burnpanck Jul 31 '15 at 14:20dash pattern. You can even dodash pattern=on2off3*3on5, which meansdash pattern=on 2pt off 9pt on 5pt off 2pt on 9pt off 5pt. – Symbol 1 Nov 15 '19 at 22:46