我需要在较小的圆圈上画一个顺时针箭头,在较大的圆圈上画一个逆时针箭头
\begin{figure}[H]
\begin{center}
\begin{tikzpicture}[very thick,decoration={
markings,
mark=at position 0.5 with {\arrow{stealth}},
mark=at position 0.6 with {\arrowreversed{stealth}}}
]
\draw[thick,->] (0,-2) -- (0,2);
\draw[thick] (-2,0) -- (0.5,0);
\draw[thick,->] (0.5,0) -- (2,0);
\draw[ultra thick, postaction={decorate}] (0.5,0) -- (1.5,0);
\draw[ultra thick] (0,0) circle (1.5);
\draw[ultra thick] (0,0) circle (0.5);
\draw[thick,->] (0,0) -- (0.33,0.33) node[midway,right,rotate=-45]
{$\rho \rightarrow0$};
\draw[thick,->] (0,0) -- (-1.05,1.05) node[midway,right,rotate=45]
{$\rho' \rightarrow\infty$};
\end{tikzpicture}
\end{center}
\caption{contour for gamma function}
\end{figure}
答案1
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[very thick]
\draw[thick,->] (0,-2) -- (0,2);
\draw[thick] (-2,0) -- (0.5,0);
\draw[thick,->] (0.5,0) -- (2,0);
\draw[ultra thick, postaction={decorate},decoration={
markings,
mark=at position 0.5 with {\arrow{stealth}},
mark=at position 0.6 with {\arrowreversed{stealth}}}] (0.5,0) -- (1.5,0);
\draw[ultra thick, postaction={decorate},decoration={
markings, mark=at position 0.65 with {\arrowreversed{stealth}}}] (0,0) circle (1.5);
\draw[ultra thick, postaction={decorate},decoration={
markings, mark=at position 0.65 with {\arrow{stealth}}}] (0,0) circle (0.5);
\draw[thick,->] (0,0) -- (0.33,0.33) node[midway,right,rotate=-45]
{$\rho \rightarrow0$};
\draw[thick,->] (0,0) -- (-1.05,1.05) node[midway,right,rotate=45]
{$\rho' \rightarrow\infty$};
\end{tikzpicture}
\end{document}
如果我要制作这个图表,我会把它做得更大并做一些其他的小改进。
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{arrows.meta}% Arrows library for...
\usetikzlibrary{bending}% The bending library is the one that allows the bending of the arrows
\usetikzlibrary{decorations.pathreplacing} % braces
\begin{document}
\begin{tikzpicture}[scale=2]
\draw[thick,->] (0,-2) -- (0,2);
\draw[thick] (-2,0) -- (0.5,0);
\draw[thick,->] (0.5,0) -- (2,0);
\draw[ultra thick, postaction={decorate},decoration={
markings,
mark=at position 0.5 with {\arrow{Latex[length=0.3cm]}}}] (0.5,-0.1) --
(1.5,-0.1);
\draw[ultra thick, postaction={decorate},decoration={
markings,
mark=at position 0.6 with {\arrowreversed{Latex[length=0.3cm]}}}]
(0.5,0.1) -- (1.5,0.1);
\draw[ultra thick] (4:1.5) arc(4:356:1.5cm);
\draw[ultra thick,-{Latex[length=0.3cm,bend]}] (270:1.5) arc(270:225:1.5cm);
\draw[ultra thick] (10:0.5) arc(10:350:0.5cm);
\draw[ultra thick,-{Latex[length=0.3cm,bend]}] (180:0.5) arc(180:225:0.5cm);
\draw[decorate,decoration={brace,mirror},gray] (0,0) -- (-45:0.5)
node[midway,below,sloped] {$\rho \rightarrow0$};
\draw[decorate,decoration={brace,mirror},gray] (0,0) -- (135:1.5)
node[midway,sloped,above]{$\rho' \rightarrow\infty$};
\end{tikzpicture}
\end{document}