I consider this question unanswered as I would like a minimal example. The examples I've seen are for very complex shapes and I get lost in the immensity and complexity of the code. This question is different from the red square solution as I'd like to be able to have a certain compat in pfgplots. Also, I'd like to be able to put in exact values for a coordinate point (sqrt(75) for example). I get an error when I do that, but putting something in like 8.66 works just fine. This is not a duplicate, no more reporting it as one, please.
\documentclass[11pt]{exam}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\begin{document}
\begin{tikzpicture}
\draw (-5,0) -- (5,0);
\draw (0,0) -- (0,5);
\end{tikzpicture}
\end{document}
What would be the simplest way to mark 90 degrees on this diagram.


\draw(.5,0)--(.5,.5)--(0,.5);– Herr K. Mar 04 '17 at 06:33tkz-euclidepackage defines a macro for marking the right angle between three named coordinates (see e.g. http://tex.stackexchange.com/a/154354/586), but that has a fixed default size, so you would have to change it manually for cases when it is not suitable. – Torbjørn T. Mar 04 '17 at 08:12compatsetting forpgfplotsnor the coordinate specification has any relevance for the question at hand I think. The coordinate specification is a different question altogether, and I think thecompatsetting would only be relevant if you're trying to mark angles inside anaxisenvironment. – Torbjørn T. Mar 04 '17 at 09:18