Consider the following picture:
and the code at the bottom. I'm happy with the result on the left; now I've started with digraphs and I need arrows; I'm trying to get the - for me - best possible style. I would like to achieve the following:
- The arrow head should have 1pt separation from the bullet, but the tail should have no space and also the normal edges should not, of course
- [DONE] The head should be like the one in the following post (and not a triangle as in my attempt): pgfplots: custom axis arrow head
- [DONE] And the standard head should not appear
- Since I generate the picture out of python, the formatting of the arrow should be encapsulated in a style, as I do for the nodes with the style
bullet
, see my try withmyarrow
.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{subcaption}
\begin{document}
\begin{figure}[hbt]
\begin{subfigure}[b]{0.49000\textwidth}
\centering
\begin{tikzpicture}[bullet/.style={circle, fill,minimum size=4pt,inner sep=0pt, outer sep=0pt}]\useasboundingbox (-2,-2)rectangle(2,2);\node[bullet] at (2.00000,0.00000) (0) {};
\node[bullet] at (1.00000,1.73205) (1) {};
\node[bullet] at (-1.00000,1.73205) (2) {};
\node[bullet] at (-2.00000,0.00000) (3) {};
\node[bullet] at (-1.00000,-1.73205) (4) {};
\node[bullet] at (1.00000,-1.73205) (5) {};
\draw (0) -- (1); \draw (1) -- (2); \draw (2) -- (3); \draw (3) -- (4); \draw (4) -- (5); \draw (5) -- (0); \end{tikzpicture}\caption{}
\end{subfigure}
\begin{subfigure}[b]{0.49000\textwidth}
\centering
\begin{tikzpicture}
[bullet/.style={circle, fill,minimum size=4pt,inner sep=0pt, outer sep=0pt}]
[myarrow/.style={-{Stealth[length=2mm, width=2mm]}}]
\useasboundingbox (-2,-2)rectangle(2,2);\node[bullet] at (2.00000,0.00000) (0) {};
\node[bullet] at (1.00000,1.73205) (1) {};
\node[bullet] at (-1.00000,1.73205) (2) {};
\node[bullet] at (-2.00000,0.00000) (3) {};
\node[bullet] at (-1.00000,-1.73205) (4) {};
\node[bullet] at (1.00000,-1.73205) (5) {};
\draw (0) -- (1); \draw (1) -- (2); \draw (2) -- (3); \draw (3) -- (4); \draw[myarrow] (4) -- (5); \draw[-{Stealth[length=2mm, width=2mm]}] (5) -- (0); \end{tikzpicture}\caption{}
\end{subfigure}
\caption{}
\end{figure}
\end{document}