3

I would like to display six graphs in two columns on a page. They are the graphs of various sets. I would like the first column to be flush with the left margin. Since these graphs are solutions to a problem, I would like to display "4.) a.) set_1", "c.) set_2", and "e.) set_3" along the left margin. I guess displaying these in the upper left corner of each graph would look good. Maybe above each graph. I have seen solution manuals present it in both ways. Same thing for second column. I guess second column should be flush with right margin. Any other opinions?

I included the codes for each graph. I do not know whether they should all be in one TikZ environment. It does not display as I would like it to be displayed, but the sets to be displayed are there, and the code for graphing each set is there except for the hatching - a particular kind of shading - for b.) and e.). I looked on page 217 of tikzpgfmanual.pdf for drawing diagonal hatch lines. They are not there, and I didn't see any examples of drawing hatch lines outside or inside a circle.

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc,angles,quotes,decorations.markings}


\begin{document}


{\bf 4.) a.)} $\{z \mid \vert z – 1 + i \vert = 1\}$
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-2,0) -- (2,0) node[below] {$x $};
  \draw[<->] (0,-2) -- (0,2) node[left] y$};
  \draw[help lines] (1,-1) circle (1);
\end{tikzpicture}

{\bf b.)} $\{z \mid \vert z + i \vert < 3\}$
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-4,0) -- (4,0) node[below] {$x$};
  \draw[<->] (0,-4) -- (0,4) node[left] y$};
  \pscircle[linestyle=dashed,dash=2pt 4pt,linewidth=0.5pt](0,-1) circle (3);
\end{tikzpicture}

{\bf c.)} $\{z \mid {\mathrm{Re}}\bigl(\overline{z} - i\bigr) = 2\}$
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-4,0) -- (4,0) node[below] {$x $};
  \draw[<->] (0,-4) -- (0,4) node[left] y$};
  \draw[help lines] (0,-1) circle (3);
\end{tikzpicture}

{\bf d.)} $\{z \mid \vert z – i \vert = \vert z + i \vert \}$
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-2,0) -- (2,0) node[below] {$x $};
  \draw[<->] (0,-2) -- (0,2) node[left] y$};
  \draw[line width=12] (0,0) (-1.75,0) -- (1.75,0);

{\bf e.)} $\{z \mid \vert z \vert > 1\}$
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-2,0) -- (2,0) node[below] {$x $};
  \draw[<->] (0,-2) -- (0,2) node[left] y$};
  \pscircle[linestyle=dashed,dash=2pt 4pt,linewidth=0.5pt](0,0) circle (1);
\end{tikzpicture}


{\bf f.)} $\{z \mid z^{5} = 1\}$
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-2,0) -- (2,0) node[below] {$x $};
  \draw[<->] (0,-2) -- (0,2) node[left] y$};
  \foreach \i in {1,...,5 } {\node[dot,label={\i*360/5 -(\i==5)*45:$w_{\i}$}] (w\i) at (\i*360/5:1) {};
    \draw[->] (O) -- (w\i);
  }
  \draw[->] (0:.3) arc (0:360/5:.3);
  \node at (360/5 /2:.5) {${\scriptscripttyle{72^{\circ}}}$};
\end{tikzpicture}



\end{document}
  • Can you please post a working code and let us know the compiler you use (latex, pdflatex, etc)? For instance, I find several problems with your tikzpictures and pscircle is undefined... – darthbith Aug 3 '14 at 19:34
1

Although I had to comment out some code and fix some typos, the below code nonetheless achieves what I think is your objective. I also changed \bf to \bfseries per the comment from Gonzalo. It uses the floatrow package to put floats in two columns. I also adjusted the margins so that it would fit better, but you'd probably be better off adjusting the size of the figures. Hope it helps!

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc,angles,quotes,decorations.markings}
\usepackage[margin=1cm]{geometry}
\usepackage{floatrow}


\begin{document}

\begin{figure}
\begin{floatrow}
\ffigbox{}{
{\bfseries 4.) a.)} $\{z \mid \vert z - 1 + i \vert = 1\}$\\
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-2,0) -- (2,0) node[below] {$x $};
  \draw[<->] (0,-2) -- (0,2) node[left] {$y$};
  \draw[help lines] (1,-1) circle (1);
\end{tikzpicture}

\par

{\bfseries b.)} $\{z \mid \vert z + i \vert < 3\}$\\
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-4,0) -- (4,0) node[below] {$x$};
  \draw[<->] (0,-4) -- (0,4) node[left] {$y$};
  % \pscircle[linestyle=dashed,dash=2pt 4pt,linewidth=0.5pt](0,-1) circle (3);
\end{tikzpicture}

\par

{\bfseries c.)} $\{z \mid {\mathrm{Re}}\bigl(\overline{z} - i\bigr) = 2\}$\\
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-4,0) -- (4,0) node[below] {$x $};
  \draw[<->] (0,-4) -- (0,4) node[left] {$y$};
  \draw[help lines] (0,-1) circle (3);
\end{tikzpicture}
}

\hfill

\ffigbox{}{
{\bfseries d.)} $\{z \mid \vert z – i \vert = \vert z + i \vert \}$\\
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-2,0) -- (2,0) node[below] {$x $};
  \draw[<->] (0,-2) -- (0,2) node[left] {$y$};
  \draw[line width=12] (0,0) (-1.75,0) -- (1.75,0);
\end{tikzpicture}

\par

{\bfseries e.)} $\{z \mid \vert z \vert > 1\}$\\
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-2,0) -- (2,0) node[below] {$x $};
  \draw[<->] (0,-2) -- (0,2) node[left] {$y$};
  % \pscircle[linestyle=dashed,dash=2pt 4pt,linewidth=0.5pt](0,0) circle (1);
\end{tikzpicture}

\par

{\bfseries f.)} $\{z \mid z^{5} = 1\}$\\
\begin{tikzpicture}[dot/.style={draw,fill,circle,inner sep=1pt}]
  \draw[<->] (-2,0) -- (2,0) node[below] {$x $};
  \draw[<->] (0,-2) -- (0,2) node[left] {$y$};
  \foreach \i in {1,...,5 } {\node[dot,label={\i*360/5 -(\i==5)*45:$w_{\i}$}] (w\i) at (\i*360/5:1) {};
    \draw[->] (0,0) -- (w\i);
  }
  \draw[->] (0:.3) arc (0:360/5:.3);
  \node at (360/5 /2:.5) {${\scriptstyle{72^{\circ}}}$};
\end{tikzpicture}
}
\end{floatrow}
\end{figure}
\end{document}

Output: enter image description here

  • 3
    As usual, \bfseries instead of \bf. – Gonzalo Medina Aug 3 '14 at 19:50
  • I tried compiling the code on two computers. On my computer, I got the error "LaTeX Error: File 'floatrow.sty' not found." On another computer, I got the error "I can't find file `tikzlibraryangles.code.tex'." – user143462 Aug 4 '14 at 13:53
  • In the first case you are missing the floatrow package - how to install this depends on which TeX distribution you have installed. In the second, you appear to be missing some libraries. You should re-install the tikz package. – darthbith Aug 4 '14 at 14:54
  • I am not sure what you mean by "TeX distribution". I am using MikTeX to compile the code on both computers. The editor that my computer has installed is WinEdt. I just looked. I do have "\usepackage{floatrow}" in the preamble. – user143462 Aug 4 '14 at 15:55
  • I put "%" before the commands "\begin{floatrow}" and "\end{floatrow}" to look at the graphs. In a.) you have "$\{z \mid \vert z – 1 + i \vert = 1\}$" in the code, but the display is "|z1 + i| = 1". What happened to the minus sign? In b.), only the coordinates axes are drawn. In c.), the graph for b.) is drawn. (I guess deleting the floatrow command did this.) I wanted the circle to be dashed and I wanted diagonal hatch lines in the circle. (Look at the set.) Graphs for e.) and f.) are missing, but you have the code for them. (For graph in e.), I wanted shading outside the circle.) – user143462 Aug 4 '14 at 16:42

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.