3

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.]

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

  • 1
    Compile with LaTeX -> dvips -> ps2pdf - Thomas – Thomas S May 22 '14 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). – kiss my armpit May 22 '14 at 19:59
  • 1
    tex.stackexchange.com/questions/101262/… solved my question for tikz! And this solved it for pstricks :) – Guido Jorg May 22 '14 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.