I am using TikZ for the first time, and I am experiencing some difficulty getting what exactly I want it to display. I am trying to draw the following picture:
Here is the code (I know it is not that good, but note it's my first time using TikZ):
\documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size
\usepackage[T1]{fontenc}
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm} % Math packages
\usepackage{graphicx}
\usepackage{mdframed}
\usepackage[ampersand]{easylist}
\usepackage{enumitem}
\usepackage{tikz}
\begin{document}
\begin{center}\begin{tikzpicture}[auto]
\draw[thick, ->] (-6,0) -- (10,0) node[anchor = north west] {x};
\draw[thick, ->] (0,-3) -- (0,11) node[anchor = south east] {y};
\node (P) at (-4,-2) {$P(-4;-2)$};
\node (Q) at (8,3) {$Q(8;3)$};
\node (R) at (4,10) {$R(4;10)$};
\node (N) at (2,7) {N};
\draw (P) to (Q);
\draw (R) to (Q);
\draw (P) to (R);
\draw (N) to (Q);
\end{tikzpicture}\end{center}
\end{document}
and it is currently giving me the following:
How can I
- get the point names to not cut through the lines,
- draw the line connecting QN to be indicated as a perpendicular line?
\documentclass
at the start and\end{document}
at the end.