Using this code,
\usepackage{tkz-base}
\usepackage{tkz-graph}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\tikzset{->-/.style={decoration={markings, mark=at position 0.5 with {\arrow{Latex}}},postaction={decorate}}}
\GraphInit[vstyle=Classic]
\renewcommand{\VertexInnerSep}{0pt}
\renewcommand{\VertexSmallMinSize}{4pt}
\Vertex[x=0,y=0,L=\footnotesize{Label 1},Lpos=below]{A}
\Vertex[x=5,y=0,L=\footnotesize{Label 2},Lpos=below]{B}
\Edge[label=\footnotesize{50},labelstyle={below,fill=none},style={->-,thick}](A)(B);
\end{tikzpicture}
\end{document}
I get the following
What I would like however, is to have this style of graph but with the labels contained in rounded rectangles like this.
This code however does give the rounded rectangle labels, however the labels are applied at the vertices, instead of next to them, and those that are not rounded rectangles are just large circles.
\usepackage{tkz-base}
\usepackage{tkz-graph}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[xscale=0.75,yscale=1]
\tikzset{->-/.style={decoration={markings, mark=at position 0.5 with {\arrow{Latex}}},postaction={decorate}}}
\Vertex[x=0,y=0,L=\footnotesize{Label 1},Lpos=below]{S}
\tikzset{VertexStyle/.append style = {rectangle,rounded corners=9pt,inner sep=5pt}}
\Vertex[x=5,y=0,L=\footnotesize{Label 2},Lpos=below]{T}
\Edge[label=\footnotesize{50},labelstyle={below,fill=none},style={->-,thick}](S)(T)
\end{tikzpicture}
\end{document}
As seen here
I tried using \node[draw, rounded rectangle]{Label 1} for the label, however that just gives the error:
Use of \tikz@scope@opt doesn't match its definition. \pgfutil@ifnextchar ...1\def \pgfutil@reserved@a { #2}\def \pgfutil@reserved@...






rounded rectangleis a shape. Did you load the TikZ libraryshapes.misc? You can't use\nodeinside a label's text. That's just that, text.\Edge[label=\footnotesize 50, labelstyle={below, draw, rounded rectangle}](A)(B);works for me. – Qrrbrbirlbel Dec 07 '22 at 23:00\SetUpEdge[labelstyle={below, draw, rounded rectangle, font=\footnotesize}]\Edge[label=50, style={->-,thick}](A)(B);. Doesn't look like the label for Vertices is customizable. – Qrrbrbirlbel Dec 07 '22 at 23:07