![编译器注释“我不知道密钥 /tikz/...”让我很困惑](https://linux22.com/image/350165/%E7%BC%96%E8%AF%91%E5%99%A8%E6%B3%A8%E9%87%8A%E2%80%9C%E6%88%91%E4%B8%8D%E7%9F%A5%E9%81%93%E5%AF%86%E9%92%A5%20%2Ftikz%2F...%E2%80%9D%E8%AE%A9%E6%88%91%E5%BE%88%E5%9B%B0%E6%83%91.png)
能帮助我发现我的错误吗?
\begin{table}[!h]
\caption{ Convergence poo on kkk and lkj}
\label{courb1}
\begin{tabular}{cc}
\begin{tikzpicture}
\begin{axis}[
width=6.35cm,
title={MM(BOOP) },
x unit=m,x unit prefix=k,
y unit=N,y unit prefix=m,
xlabel=Iteration,ylabel=solution quality]
\addplot coordinates {
(60,5421)
(180,87555)
(300,14578)
(420,3698)
(540,1478)
(660,9875)
(780,1236)
(960,5874)
(1000,9876)
};
\addplot coordinates {
(60,7895)
(180,4125)
(300,9875)
(420,6325)
(540,1478)
(660,9874)
(780,1254)
(960,9875)
(1000,1478)
};
\legend{NNA,NNA-MM}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
width=6.35cm,
title={POO(PLL) },
x unit=m,x unit prefix=k,
y unit=N,y unit prefix=m,
xlabel=Iteration]
\addplot coordinates {
(60,36899)
(180,4587)
(300,14587)
(420,32654)
(540,33493)
(660,14879)
(780,12587)
(960,9865)
(1000,6598)
};
\addplot coordinates {
(60,5444)
(180,5699)
(300,4125)
(420,789)
(540,1487)
(660,31070)
(780,30980)
(960,30910)
(1000,30910)
};
\legend{MLO,MLO-NN}
\end{axis}
\end{tikzpicture}
\end{tabular}
\end{table}
答案1
如果您使用所有需要的包,那么一切都会正常……或者您还有其他问题和困难吗?
\documentclass[10pt,a4paper]{article}
\usepackage{tabularx}
\usepackage{pgfplots}
\usepgfplotslibrary{units}
\begin{document}
\begin{table}[!h]
\caption{ Convergence NL8 on TTP and UTTP}
\label{courb1}
\begin{tabular}{cc}
\begin{tikzpicture}
\begin{axis}[
width=6.35cm,
title={MM(BOOP) },
x unit=m,x unit prefix=k,
y unit=N,y unit prefix=m,
xlabel=Iteration,ylabel=solution quality]
\addplot coordinates {
(60,5421)
(180,87555)
(300,14578)
(420,3698)
(540,1478)
(660,9875)
(780,1236)
(960,5874)
(1000,9876)
};
\addplot coordinates {
(60,7895)
(180,4125)
(300,9875)
(420,6325)
(540,1478)
(660,9874)
(780,1254)
(960,9875)
(1000,1478)
};
\legend{BBO,BBO-VNS}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
width=6.35cm,
title={NL8 (UTTP) },
x unit=m,x unit prefix=k,
y unit=N,y unit prefix=m,
xlabel=Iteration]
\addplot coordinates {
(60,36899)
(180,4587)
(300,14587)
(420,32654)
(540,33493)
(660,14879)
(780,12587)
(960,9865)
(1000,6598)
};
\addplot coordinates {
(60,5444)
(180,5699)
(300,4125)
(420,789)
(540,1487)
(660,31070)
(780,30980)
(960,30910)
(1000,30910)
};
\legend{BBO,BBO-VNS}
\end{axis}
\end{tikzpicture}
\end{tabular}
\end{table}
\end{document}