3

I try to represent a complex number in a Gauss plane. The problem is in the representation of the angle between the abscissas and the oz segment. This is my code:

\documentclass{scrbook} 

\input{configuration}

\usepackage[utf8]{inputenc}

\usepackage{amsfonts, amsthm, amsmath, braket}
\usepackage{tikz}
\usetikzlibrary{angles, quotes,calc,patterns}


\begin{document}

    \begin{tikzpicture}
        \draw (0,0) node[anchor=north east] {$ O $};
        \draw[thick, ->] (-0.35,0) -- (5.5,0) node[anchor=north west] {$ \mathbb{R} $};
        \draw[thick, ->] (0,-0.35) -- (0,5.5) node[anchor=south east] {$ \mathbb{C} $};

        \draw [color=black, fill=black] (3.5,3) circle(0.05) node[anchor=south west] {$Z$};

        \draw (0,0) -- (3.5,0) node[anchor=north west] {$x$};
        \draw (0,0) -- (0,3.5) node[anchor=north east] {$y$};

        \draw[dashed] (0,3) -- (3.5,3);
        \draw[dashed] (3.5,0) -- (3.5,3);

        \draw[thick] (0,0) -- (3.5,3);

        \draw (2.5,2.16) -- (3,5) -- (4, 5) node[anchor=west] {$\rho = |z| = \sqrt{zz^*}$};
        \draw (1,0) arc (-180:90:-1);
    \end{tikzpicture}

\end{document}
6

with use of the angles and quotes library and made a little bit different looks of diagram:

enter image description here

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{angles, quotes}
\usepackage{amssymb}

\begin{document}
    \begin{tikzpicture}[
every edge quotes/.append style = {anchor=south, sloped}
                        ]
% axis
\draw[thick, ->] (-0.35,0) -- (5.5,0) coordinate[label=below: $\mathbb{R}$] (x);
\draw[thick, ->] (0,-0.35) -- (0,5.5) 
    node[left] {$\mathbb{I}$}
    node[below right=5mm] {$Z=\rho\cdot \mathrm{e}^{j\theta}$};
\coordinate[label=below left:$ O $] (O);
% phasor
\fill           (3.5,3) coordinate[label=above right:$Z$] (z) circle(0.05);
\draw[dashed]   (0,3) node[left] {$y$} -| (3.5,0) node[below] {$x$};
\draw[thick]    (O) to ["$\rho=|z|=\sqrt{zz^*}$"] (3.5,3);
% angle
\pic [draw, <->,
      angle radius=11mm, angle eccentricity=1.2,
      "$\theta$"] {angle = x--O--z};
    \end{tikzpicture}
\end{document}
5
  • 1
    instead of \mathbb{R} and \mathbb{I} i would rather use \Re and \Im. mathematical more correct, i think. – Zarko Aug 4 '18 at 18:17
  • 1
    I agree with that comment but personally I would use \usepackage{amsmath} \DeclareMathOperator{\re}{Re} \DeclareMathOperator{\im}{Im} and then take the axes labels to be $\re z$ and $\im z$. +1 for using the angles library for that. – user121799 Aug 4 '18 at 18:39
  • 1
    @marmot, thank you very much. in school we use symbols as you suggested, however for (to me unknown) reason are in latex defined symbols \Re and \Im and i just use them. ones i should ask some latex guru, where is origin this (somehow strange) notation :-). – Zarko Aug 4 '18 at 18:47
  • 1
    At universities also virtually nobody uses the LaTeX \Re and \Im commands. I have not seen them in any paper in a long time. – user121799 Aug 4 '18 at 18:50
  • 1
    actualy i sow them in some old german books. where is more appropriate to ask from they originate, here or on "metaTeX"? – Zarko Aug 4 '18 at 19:07
5

Maybe that?

\documentclass{scrbook} 

%\input{configuration}

\usepackage[utf8]{inputenc}

\usepackage{amsfonts, amsthm, amsmath, braket}
\usepackage{tikz}
\usetikzlibrary{angles, quotes,calc,patterns}


\begin{document}

    \begin{tikzpicture}
        \draw (0,0) node[anchor=north east] {$ O $};
        \draw[thick, ->] (-0.35,0) -- (5.5,0) node[anchor=north west] {$ \mathbb{R} $};
        \draw[thick, ->] (0,-0.35) -- (0,5.5) node[anchor=south east] {$ \mathbb{C} $};

        \draw [color=black, fill=black] (3.5,3) circle(0.05) node[anchor=south west] {$Z$};

        \draw (0,0) -- (3.5,0) node[anchor=north west] {$x$};
        \draw (0,0) -- (0,3.5) node[anchor=north east] {$y$};

        \draw[dashed] (0,3) -- (3.5,3);
        \draw[dashed] (3.5,0) -- (3.5,3);

        \draw[thick] (0,0) -- (3.5,3);

        \draw (2.5,2.16) -- (3,5) -- (4, 5) node[anchor=west] {$\rho = |z| = \sqrt{zz^*}$};
        \draw (1,0) arc (0:41:1);
    \end{tikzpicture}

\end{document}

Output:

Screenshot

3
  • Shouldn't it be a z instead of Z? I also would recommend you to change the arrow type and maybe to use \mathbbm{R} (or rather \mathbbm{C}) from the bbm package. – current_user Aug 4 '18 at 17:41
  • 1
    You could use arc (0:{atan(3/3.5}:1) to get the angle calculated for you. Nonetheless, good answer (+1)! – Max Aug 4 '18 at 17:42
  • @Max_Snippe: Yes, I know that but I thought I could explicit right down the angle because it's an very small code but yeah, you're absolutely right and thanks! – current_user Aug 4 '18 at 17:43

Your Answer

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