4

My MWE is:

\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}
\draw[red,dotted] (0,0) circle (2);
\draw[black,thick] (5,0) circle (2);
\end{tikzpicture}
% <<dashed>> can be used in place of <<dotted>>
% %<<\draw (a,b) \polygon{c}{d}>> can be used in place of <<\draw[black,thick] (a,b) circle (d)>>

\end{document}

How do I control the size of dots or dashes on the first circle (make them larger or thicker maybe?) and how do I also control the distance between the evenly spaced dots, that is, how dots are spaced around the circle, without manually placing nodes or arcs of a definite size in a circle formation? How do I do this in a way that also works for polygons?

Also, for future reference, how to I replicate this in pstricks, not just tikz?

[P.S.:-- I hope the question is not a duplicate but I have not been able to find an identical question.]

2

1 Answer 1

4

With pstricks you can do this

\documentclass[pstricks,border=10pt]{standalone}
\begin{document}
\begin{pspicture}(-3,-3)(8,3)
\pscircle[linecolor=red,linestyle=dotted,dotsep=1pt,linewidth=1pt](0,0){2}
\pscircle[linecolor=red,linestyle=dotted,dotsep=5pt,linewidth=3pt](5,0){2}
\end{pspicture}
\begin{pspicture}(-3,-3)(8,3)
\pscircle[linecolor=blue,linestyle=dashed,dash=2pt 6pt,linewidth=0.5pt](0,0){2}
\pscircle[linecolor=blue,linestyle=dashed,dash=2pt 5pt 4pt 5pt,linewidth=3pt](5,0){2}
\end{pspicture}
\end{document}

enter image description here

enter image description here

3
  • 1
    Compile with LaTeX -> dvips -> ps2pdf - Thomas
    – Thomas S
    Commented May 22, 2014 at 19:59
  • 1
    @GuidoJorg: You have to compile it with either latex->dvips->ps2pdf (very much much faster) or xelatex (very much much slower). Commented May 22, 2014 at 19:59
  • 1
    tex.stackexchange.com/questions/101262/… solved my question for tikz! And this solved it for pstricks :) Commented May 22, 2014 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .