How would you go about making these two graphs. I seem to be struggling making simple planes as such. I'm struggling with even just making an axis that is enclosed on all sides.
Any help is appreciated.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityUsually we expect to give us your Minimal Working Example (MWE)
with the code you have tried to achieve the desired output and if we can help we work on your code to help you achieve what you want. You didn't post any code. I made a small piece of code to help you start if you haven't already done so. Please in any future questions include your MWE.
I also mathematically disagree with your graphs as they show the two axes have slightly different 0 (zeros) as we know in complex plane the two axes have the same zeros, as the number 0=0+0i
is the origin itself.
Here is my answer for a start:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (0,0) rectangle (11,11);
\foreach \x in {2,4,6,8,10} \draw (\x,0) -- (\x,-0.1) node[below] {\x};\node[below] at (0,0) {0};
\foreach \y in {2,4,6,8,10} \draw (0,\y) -- (-0.1,\y) node[rotate=90,above] {\y};
\draw[dashed] (4,0) -- (4,3) -- (0,3);
\draw[fill=red] (4,3) circle (0.15) node[above right] {$z=a+bi$};
\node at (5,-1) {\textbf{Real Part}};\node[rotate=90] at (-1,5) {\textbf{Imaginary Part}};\node at (5.5,11.2) {\textbf{Complex Number $z=a+bi$}};
\end{tikzpicture}
\end{document}
Before beginning to appreciate the power of tikz
, pstricks
is a good starting point.
See PSTricks web site with lots of code examples to tinker with.
This example is mostly taken from there.
Most of the positioning was done manually, like in a drawing paper.
\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-plot,pst-eucl}
\begin{document}
\sffamily
\psset{unit=1cm}
\begin{pspicture}(0,0)(6,6)
\psaxes[linewidth=0.7pt,
linecolor=gray!40,
Dx=2,Dy=2,
labelFontSize=\scriptstyle,
axesstyle=frame](0,0)(0,0)(6.5,6.5)
\psset{PointNameSep=18pt,PosAngle=45,linestyle=dashed}
\pstGeonode[PointName={z=4+3i},linecolor=red](4,3){z}
\psCoordinates[linecolor=red,showpoints=false](z)
\rput(3,7){Complex Number $z=a+bi$}
\rput[t](3.5,-0.7){Real Part}
\rput[b]{90.0}(-0.7,3){Imaginay Part}
\end{pspicture}
\end{document}
rectangle
, a few ticks, dashed lines, a red dot and a bunch of text. Or is there more to this?