Skip to content

Instantly share code, notes, and snippets.

@abikoushi
Created May 26, 2022 12:57
Show Gist options
  • Save abikoushi/f931254cb7048c0becd93986eb74ce33 to your computer and use it in GitHub Desktop.
Save abikoushi/f931254cb7048c0becd93986eb74ce33 to your computer and use it in GitHub Desktop.
TikZ example
\documentclass[dvipdfmx, tikz, margin=10pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[step=1cm, color = gray] (0, 0) grid (3, 3);
\foreach \x in {0, 1, 2}
{
\draw [->, thick](\x + 0.5 , 2 + 0.5) -- (\x + 1.5 - 0.1, 2 - 0.5 + 0.1);
}
\foreach \x in {0, 1, 2}
{
\draw [->, thick](\x + 0.5 , 2 + 0.5) -- (\x + 0.5, 2 - 0.5 + 0.1);
}
\foreach \x in {0, 1, 2}
{
\draw [->, thick](\x + 0.5 , 1 + 0.5) -- (\x + 1.5 - 0.1, 1 - 0.5 + 0.1);
}
\foreach \x in {0, 1, 2}
{
\draw [->, thick](\x + 0.5 , 1 + 0.5) -- (\x + 0.5, 1 - 0.5 + 0.1);
}
\draw [->,thick] (0, 3.3) -- (3.3, 3.3) node [right]{position};
\draw [->,thick] (-0.2, 3.3) -- (-0.2,-0.3) node [below]{time};
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment