2

I want to draw a circle in Latex and I have drawn what it should look like, except really I want the top half to be dashed. How can I do this?

enter image description here

\begin{adjustwidth*}{}{}
\begin{tikzpicture}[scale=5.3,cap=round,>=latex]

\def\Radius{.3cm}

  ;

  
 

 

\draw (1.25cm,0cm) circle[radius=\Radius];

\begin{scope}[
    -{Stealth[round, length=8pt, width=8pt, bend]},
    shorten >=4pt,
    very thin,
  ]
  
    \draw (0.2298+1.25, -0.1928) arc(312:314:\Radius);
    \draw (-0.05+1.325, 0.3) arc(275:277:\Radius);
    \draw (-0.212132+1.25, -0.212132) arc(224:226:\Radius);
  \end{scope}

  % draw the points 
  \fill[radius=0.5pt]
    (1.25, -\Radius) circle[] node[above left] {}
     (0.95, 0) circle[] node[above left] {}
     (1.55, 0) circle[] node[above left] {}

    ;

      \path
    (-45:\Radius+1.2) node[below right] {}
    (-135:\Radius+1.25) node[above left] {}
    (1.21, -\Radius-0.39) node[below right] {}
    (0.2298+1.25, -0.1928) node[above] {$\gamma_2\;\;\,$}
    (-0.05+1.27, 0.32) node[above] {$\gamma_2\gamma_1\;$}
    (-0.212132+1.25, -0.212132) node[above] {$\;\;\;\;\;\gamma_1\;$}

  ;
    
  
  
\end{tikzpicture}
\end{adjustwidth*}

2 Answers 2

3

How do you find this approach ?

\documentclass[tikz, border=20mm]{standalone}
\usepackage{amsmath,amssymb}
\usetikzlibrary{positioning, decorations.markings, decorations.pathreplacing}
\tikzstyle{directed}=[postaction={decorate,decoration={markings,mark=at position .5 with{\arrow{stealth}}}}]

\begin{document}
\begin{tikzpicture}
%A simple for loop to draw the circles :
\foreach \i in {0, 180, 270}{
\filldraw (\i:1)circle(0.05);
}
%The top dashed part :
\draw[dashed, directed] (180:1)arc[start angle=180, end angle=0, x radius=1cm, y radius=1cm] node[midway, above] {$\gamma_1\gamma_2$};
%The path gamma 1
\draw[directed] (180:1)arc[start angle=180, end angle=270, x radius=1cm, y radius=1cm] node[midway, left] {$\gamma_1$};
%The path gamma 2
\draw[directed] (270:1)arc[start angle=270, end angle=360, x radius=1cm, y radius=1cm] node[midway, right] {$\gamma_2$};
\end{tikzpicture}
\end{document}

enter image description here

3
  • Thank you for your answer, I find this approach much simpler than what I was doing! But when I compile it the arrows are very small, how can I make them bigger?
    – JLA
    Feb 13, 2023 at 23:43
  • Yes, you can make the arrow bigger use the following : \tikzstyle arrowstyle=[scale=2] \tikzstyle directed=[postaction={decorate,decoration={markings,mark=at position .5 with{\arrow[arrowstyle]{stealth}}}}]
    – euler_med
    Feb 14, 2023 at 0:55
  • 1
    Thanks a lot, that works great!
    – JLA
    Feb 14, 2023 at 6:51
4

You can use \clip to draw only part of the circle. This way you can draw the top and bottom half separately with different line styles:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{arrows.meta,bending}

\begin{document}

%\begin{adjustwidth*}{}{}
\begin{tikzpicture}[scale=5.3,cap=round,>=latex]

\def\Radius{.3cm}

  ;

  
 

 
\begin{scope}
\clip (0.9,0.35) rectangle (1.6,0);
\draw[dashed] (1.25cm,0cm) circle[radius=\Radius];
\end{scope}

\begin{scope}
\clip (0.9,-0.35) rectangle (1.6,0);
\draw (1.25cm,0cm) circle[radius=\Radius];
\end{scope}

\begin{scope}[
    -{Stealth[round, length=8pt, width=8pt, bend]},
    shorten >=4pt,
    very thin,
  ]
  
    \draw (0.2298+1.25, -0.1928) arc(312:314:\Radius);
    \draw (-0.05+1.325, 0.3) arc(275:277:\Radius);
    \draw (-0.212132+1.25, -0.212132) arc(224:226:\Radius);
  \end{scope}

  % draw the points 
  \fill[radius=0.5pt]
    (1.25, -\Radius) circle[] node[above left] {}
     (0.95, 0) circle[] node[above left] {}
     (1.55, 0) circle[] node[above left] {}

    ;

      \path
    (-45:\Radius+1.2) node[below right] {}
    (-135:\Radius+1.25) node[above left] {}
    (1.21, -\Radius-0.39) node[below right] {}
    (0.2298+1.25, -0.1928) node[above] {$\gamma_2\;\;\,$}
    (-0.05+1.27, 0.32) node[above] {$\gamma_2\gamma_1\;$}
    (-0.212132+1.25, -0.212132) node[above] {$\;\;\;\;\;\gamma_1\;$}


  ;
    
  
  
\end{tikzpicture}
%\end{adjustwidth*}
%

\end{document}

enter image description here

2

You must log in to answer this question.

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