I am getting a significant amount of empty space under the following figure. How do I get rid of it? (I am a new user and I don't know how to post a tex code.)
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{figure}[h!]
\centering
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(5,0){B}
\tkzLabelPoints[below](A)
\tkzLabelPoints[below](B)
\tkzDrawSegment(A,B)
\tkzDefPoint(2,3){C}
\tkzLabelPoints[above](C)
\tkzDrawSegment(A,C)
\tkzDrawSegment(B,C)
\tkzDrawBisector(C,B,A)(P)
\tkzDrawBisector(C,A,B)(Q)
\tkzDrawBisector(A,C,B)(R)
\tkzDefCircle[in](A,B,C)\tkzGetPoint{I}\tkzGetLength{rIN}
\tkzDrawCircle[R](I,\rIN pt)
\draw[red] (I) -- ($(A)!(I)!(C)$)++(-30:0.1) -- ++(56:0.1) -- +(-34:-0.1);
\draw[red] (I) -- ($(A)!(I)!(B)$) ++(90:0.1) -- ++(0:-0.1) -- +(-90:0.1);
\draw[red] (I) -- ($(B)!(I)!(C)$) ++(45:-0.1) -- ++(-45:0.1) -- +(45:0.1);
\draw (I)+(.2,-.3) node {$I$};
\end{tikzpicture}
\caption{Inscribed circle.}
\end{figure}
\end{document}
{}
in the editor (which indents by 4 spaces) not really possible to answer the question as it is impossible to say why you have space: it depends on other things on the page. But in general you should use\centering
not\begin{center}
in figures as the environment form adds vertical space, and don't use[!h]
use[htp]
or no option.[!h]
usually generates a warning that it is being changed to[!ht]
.