Below is a pretty naïve approach.
To draw arrows, the arrows.meta
module is quite useful, providing support for various arrow types. To enable it, put the following line in your preamble after you have loaded tikz
.
\usetikzlibrary{arrows.meta}
Within the tikzpicture
, you can add a scope, so that each time you can simply use >
to refer to the arrow tip you want. For example, below I shall use Stealth
.
\begin{scope}[>=Stealth]
...
\end{scope}
You can then draw the lines first:
\draw (0,0) -- (0, 1);
\draw (0,0) -- (0,-1);
\draw (0,0) -- ( 1,0);
\draw (0,0) -- (-1,0);
An arrow can be drawn like
\draw[->] (0,0) -- (0.6,0);
Here the arrow is placed at (0.6,0)
(the line from (0,0)
to (0.6,0)
coincide with the line that you've drawn in the previous step). In the same way, you can draw an arrow of reversed direction:
\draw[>-] ( 0.6,0) -- (0,0);
Below is the complete code for a "c-type" arrow in your picture:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\begin{scope}[>=Stealth]
\draw (0,0) -- (0, 1);
\draw (0,0) -- (0,-1);
\draw (0,0) -- ( 1,0);
\draw (0,0) -- (-1,0);
\draw[->] (0,0) -- (0, 0.6);
\draw[->] (0,0) -- (0,-0.6);
\draw[>-] ( 0.6,0) -- (0,0);
\draw[>-] (-0.6,0) -- (0,0);
\end{scope}
\end{tikzpicture}
\end{document}
For the grid with arrows, since the distribution of your arrows doesn't seem very regular, you might have to repeat the above steps to draw the arrows -- shouldn't be that hard.
But this is just a beginning, which works even with a minimal amount of TikZ knowledge. I'm not proud of my TikZ skill, there might be some clever methods that can produce such graphs with very simple commands -- I shall left it to the experts :)
Regarding the labeling, this is simple, you can use \node
:
\begin{tikzpicture}
\draw (0,0) -- (0, 1);
\draw (0,0) -- (0,-1);
\draw (0,0) -- ( 1,0);
\draw (0,0) -- (-1,0);
\node at (0.2, 0.6) {$1$};
\node at (0.2,-0.6) {$2$};
\node at ( 0.6,0.2) {$2$};
\node at (-0.6,0.2) {$1$};
\end{tikzpicture}