1

Apologies if this is not the correct SE for this.

I have been transferring all of my notes to LaTeX and I have been wanting to include some custom diagrams. I often find my self having to find images to add to my notes but they are not quite what I want. I have tried using different graphic software but nothing seems to do it properly. Could anybody suggest to me any software through which I could make diagrams like this?:

enter image description here

  • I would recommend pstricks and some of its modules – for this kind of figures, pst-plot, preferably compiled with xelatex (pdflatex does not have the necessary tools to make the computations required by postscript). – Bernard Oct 15 '20 at 22:03
  • 2
    Here there is a starting point: https://tex.stackexchange.com/questions/298795/draw-the-dogbone-contour-for-complex-integral; https://tex.stackexchange.com/questions/112285/contour-integrals?noredirect=1&lq=1 – Sebastiano Oct 15 '20 at 22:14
  • 1
    I would do this in TikZ with pgfplots. I’ve never written an analysis textbook, though! – Davislor Oct 16 '20 at 11:19

1 Answers1

4

Here is, for instance, a short code to obtain the above image:

\documentclass[border=3pt, x11names]{standalone}
\usepackage{amsmath}
\DeclareMathOperator{\re}{Re}
\DeclareMathOperator{\im}{Im}
\usepackage{pst-plot, pst-arrow}

\begin{document}

\psset{dimen=middle, arrowinset=0.12, unit=3cm, linejoin=1, dash=3pt 2pt} \begin{pspicture}(-1.4,-1.4)(1.6,1.4) \psaxes[linecolor=LightSteelBlue3,xAxis=true,yAxis=true,labels=none,ticks=none]{->}(0,0)(-1.3,-1.32)(1.3,1.3)[$ \re z $,0][$\im z$,0] \psset{linecolor =SteelBlue4, linewidth = 1.2pt, ArrowInsidePos=0.3} \pslineArrowInside=->(0.2;334)\pslineArrowInside=->(1;5) \pscustom{\psarc{->}{1}{5}{60}\psarc(0,0){1}{60}{355}\psline(1;355)(0.2;334)% \psarcn{->}{0.2}{334}{135}\psarcn(0,0){0.2}{135}{26}\psline(0.2;26)(1;5)% \closepath} \psdotdotstyle=x\uputd{$z = -1_{\varepsilon} $} \psline[linewidth=0.4pt, linestyle=dashed]{<->}(1;110)(0,0)(0.2;-130) \uput{2pt}ur{$C_R$}\uput{1pt}ul{$C_\varepsilon$} \uput{2pt}ur{$R$}\uput{2pt}ul{$I^{+} $}\uput{2pt}d{$I^{-} $} \end{pspicture}

\end{document}

enter image description here

Bernard
  • 271,350
  • This doesn't really answer the question “What do mathematicians use to make graphs for analysis textbooks?” but that is not answerable in a meaningful manner anyway, – Henri Menke Oct 16 '20 at 10:29
  • @HenriMenke: I only had mentioned pstricks in a comment first, then decided it was worth giving an example. – Bernard Oct 16 '20 at 10:31