pgfplots lets you generate vector plots directly in LaTeX.
Basic Plot
pgfplots-basic.tex
Plot from Data Table
pgfplots-table.tex
Create publication-quality plots in LaTeX using pgfplots for line charts, scatter plots, and axis customization.
pgfplots lets you generate vector plots directly in LaTeX.
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{tikzpicture}
\begin{axis}[xlabel={$x$},ylabel={$f(x)$},grid=major]
\addplot[blue,thick,domain=0:5,samples=100]{x^2};
\end{axis}
\end{tikzpicture}
\begin{axis}[xlabel=Epoch,ylabel=Accuracy]
\addplot table[row sep=\\]{
1 0.61\\
2 0.68\\
3 0.74\\
4 0.79\\
};
\end{axis}
Was this page helpful?