1

I wish to draw the text "USA" on path_1 using options as it was drawn "USA" in path_2, but draw without using nodes,only using edge in path_1.

Draw above path without use node

    \documentclass{article}
    \usepackage{tikz}
    \usepackage{accsupp}
    \usetikzlibrary{mindmap}
    \begin{document}
    \begin{tikzpicture}
    \node (energy1) at (30:10cm){Text};
    \node (energy2) at (90:10cm) {Text};
    %path_1    \draw [circle connection bar]
    (energy1) edge (energy2) %draw above USA this path without using     node;

%path_2  \draw (energy1)--node[orange,sloped,above=0.5cm,align=center,text width=8cm]{USA}(energy2); 
    \end{tikzpicture}
    \end{document}
2

If you don't want to use the word node for some reasons, you can as well use the quotes library:

\documentclass{article}
\usepackage{tikz}
\usepackage{accsupp}
\usetikzlibrary{mindmap,quotes}
\begin{document}
\begin{tikzpicture}
\node (energy1) at (30:10cm){Text};
\node (energy2) at (90:10cm) {Text};
%path_1
\draw[circle connection bar]
  (energy1)
  edge["USA" {orange ,sloped,above=.5cm,align=center,text width=8cm}]
  (energy2)
  ;
\end{tikzpicture}
\end{document}

enter image description here

1
\documentclass{article}
\usepackage{tikz}
\usepackage{accsupp}
\usetikzlibrary{mindmap}
\begin{document}
\begin{tikzpicture}
\node (energy1) at (30:10cm){};
\node (energy2) at (90:10cm) {};
\draw [circle connection bar]
(energy1) edge node[orange,sloped,above=0.5cm,align=center,text width=8cm]{USA}
(energy2); 
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.