``` \documentclass[a4paper]{article} \usepackage{pgfplots} \usepgfplotslibrary{colorbrewer} \pgfplotsset{width=7cm,compat=1.13} \begin{document} \begin{tikzpicture} \begin{loglogaxis}[ title=Convergence Plot, xlabel={Degrees of freedom}, ylabel={$L_2$ Error}, grid=major, legend entries={$d=2$,$d=3$,$d=4$,$d=5$}, ] \addplot table {data_d2.dat}; \addplot table {data_d3.dat}; \addplot table {data_d4.dat}; \addplot table[ x=dof, y={create col/linear regression={y=l2_err, variance list={1000,800,600,500,400,200,100}}] {data_d4.dat}; \end{loglogaxis} \end{tikzpicture} \end{document} ```

1 回答1

0
```tex \addplot table[ x=dof, y={create col/linear regression={ y=l2_err, variance list={1000,800,600,500,400,200,100} } } ]{data_d4.dat}; ``` 你把括号匹配一下试试。

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。