I am wondering what is the best way to place floats directly across from a array or tabular environment. I want to get the graph to show on the right of the table of values. A picture is shown below along with a MWE
.
\documentclass[12pt,letterpaper]{article}
\usepackage[margin=2.0cm]{geometry}
\usepackage{amsmath}
\begin{document}
$
\begin{array}{rr}
-7.0 & 7.0 \\
-6.0 & 0.067 \\
-5.0 & -4.9 \\
-4.0 & -7.7 \\
-3.0 & -7.9 \\
-2.0 & -2.9 \\
-1.0 & 39. \\
0 & 87. \\
1.0 & 50. \\
2.0 & 21. \\
3.0 & 28. \\
4.0 & 40. \\
5.0 & 55. \\
6.0 & 72. \\
7.0 & 91.
\end{array}
$
\begin{figure}[h!]
\centering
\scalebox{0.5}{
\includegraphics{hx.pdf}
}
\caption{Plot of the function \( h(x) \)}
\end{figure}
\end{document}