These are aligned at the top:
\documentclass{article}\usepackage{pgfplots}\pgfplotsset{width=8cm}\usepackage{siunitx}\begin{document} \begin{table} \begin{minipage}[t]{5 cm} \centering \begin{tabular}[t]{|c|c|} \hline Temperature & IQ Score \\ \hline \SI{14}{\celsius} & \SI{57}{\percent} \\ \hline %% change all \% like this \SI{16}{\celsius} & 65\% \\ \hline \SI{18}{\celsius} & 69\% \\ \hline \SI{20}{\celsius} & 71\% \\ \hline \SI{22}{\celsius} & 79\% \\ \hline \SI{24}{\celsius} & 88\% \\ \hline \SI{26}{\celsius} & 81\% \\ \hline \SI{28}{\celsius} & 76\% \\ \hline \SI{30}{\celsius} & 66\% \\ \hline \SI{32}{\celsius} & 62\% \\ \hline \end{tabular} \end{minipage} \hfill \begin{tikzpicture}[baseline={(current bounding box.north)}] \begin{axis}[grid=major, grid style={dashed,gray!30}, xlabel=Temperature $\celsius$,ylabel=IQ Scores\si{\percent}, legend style={at={(axis cs:25,28)},anchor=south}] %\addplot[scatter, only marks, scatter/classes={y={black}}] table[x=x, y=y, col sep=comma] {NumbersAndFunctions-Temp-IQ-data.csv}; \addplot[color=red, domain=7:41, thick, samples=400, mark=none] {88*exp(-(\x-24)²/253.0889)}; \addlegendentry{Raw,Gaussian}; \end{axis} \end{tikzpicture}\end{table}\end{document}
Image may be NSFW.
Clik here to view.
With no [t]
in minipage
and [baseline={(current bounding box.center)}]
in tikzpicture
they are aligned at the center.
Image may be NSFW.
Clik here to view.
With no [b
] in both tabular
and minipage
and [baseline={(current bounding box.south)}]
in tikzpicture
they are aligned at the bottom.
Image may be NSFW.
Clik here to view.