dotfiles/emacs/snippets/latex-mode/agraph

25 lines
748 B
Plaintext
Raw Normal View History

# -*- mode: snippet -*-
# name: Graph without considering integers
# key: agraph
# --
\begin{figure}[${1:ht}]
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel=${2:$x$},
ylabel=${3:$y$},
axis lines = middle,
grid=major,
axis equal=false,
tick style={very thick},
major tick style=thick,
minor tick num=2,
domain=${4:-10}:${5:10},$6
]
\addplot[samples=${7:$$(+ (string-to-number (or (yas-field-value 5) "0")) (string-to-number (or (yas-field-value 4) "0")))}, $8]{${9:x}\};
\end{axis}
\end{tikzpicture}
\caption{$10}
\label{fig!${11:$10}}
\end{figure}
`(yas-field-value 4)`