Graphics, Figures & TablesSpecific Drawings with Arrows and Vertices

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Lemon
Posts: 2
Joined: Sun Jul 14, 2013 8:17 am

Specific Drawings with Arrows and Vertices

Post by Lemon »

Hi there,

I would like to know how to draw the pictures from the attachment in LaTeX.

I tried all the basic stuff using coordinates and smooth lines etcetera but the resulting pictures are terrible!

All hints, tips and trick will be very much appreciated.

Kind regards,

Lemon
Attachments
Configurations.pdf
(130.05 KiB) Downloaded 218 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Specific Drawings with Arrows and Vertices

Post by Stefan Kottwitz »

Hi Lemon,

Welcome to the forum!
Lemon wrote:I tried all the basic stuff using coordinates and smooth lines etcetera but the resulting pictures are terrible!
Please show what you tried, so we can help to improve it.

Stefan
LaTeX.org admin
Lemon
Posts: 2
Joined: Sun Jul 14, 2013 8:17 am

Specific Drawings with Arrows and Vertices

Post by Lemon »

Hi Stefan,

Thank you for your response. I now have this:

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{arrows}

\begin{document}
  \begin{figure}[!ht]
    \centering
    \begin{tikzpicture}[
      auto=left,
      every node/.style={
        circle,
        draw,
        fill=black,
        text=white,
        scale=1.0
      }
    ]
      \node (A) at (0, 0) {A};
      \node (B) at (0, 2) {};
      \node (C) at (0, 4) {};
      \node (D) at (-2, 6) {};
      \node (E) at (2, 6) {};

      \foreach \from/\to in {A/B, B/C, C/D, C/E}
        \draw (\from) -- (\to)[black];

      \draw [blue, very thick] plot [smooth] coordinates {(-2,6) (-3,5) (0,2)};
      \draw [red, dashed] plot [smooth] coordinates {(2,6) (3,7) (4,5) (3,3) (0,0)};

      \node [fill=none, draw=none, text=black] (X1) at (2, 1) {$e_1$};
    \end{tikzpicture}
    \caption{Example}
    \label{fig:xample}
  \end{figure}
\end{document}
Last edited by localghost on Sun Jul 14, 2013 12:08 pm, edited 3 times in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Specific Drawings with Arrows and Vertices

Post by localghost »

Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX} SX nearly at the same time and already has an accepted answer. Please read what our administrator thinks about that.
Board Rules wrote:A crossposting is always contra-productive. But there is nothing really against it as long as it is mentioned. This means that a direct link has to be added. So other users who want to help are preserved from double efforts and waste of time.
Regarding the problem, you can try something like this. Click on "Open in writeLaTeX" in the below code box to see the output instantly.

Code: Select all

\documentclass[11pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{arrows}

\begin{document}
    \begin{tikzpicture}[
      >=stealth,
      auto,
      point/.style={
        circle,
        draw,
        fill=black,
        text=white,
        scale=1.0
      }
    ]
      \node[point] (A) at (0,0)  {A};
      \node[point] (B) at (0,2)  {};
      \node[point] (C) at (0,4)  {};
      \node[point] (D) at (-2,6) {};
      \node[point] (E) at (2,6)  {};

      \foreach \from/\to in {A/B, B/C, C/D, C/E}
        \draw (\from) -- (\to)[black];

      \draw[->,blue,very thick] (D.135) .. controls +(left:2) and +(left:2) .. (B);
      \draw [->,red,dashed] (E.45) .. controls +(right:2) and +(right:2) .. node[midway,black] (e1) {$e_1$} (A);
    \end{tikzpicture}
\end{document}
I don't think that we will get feedback on tis. m(


Best regards and welcome to the board
Thorsten
mayankmi
Posts: 45
Joined: Sat Apr 20, 2013 7:52 pm

Re: Specific Drawings with Arrows and Vertices

Post by mayankmi »

good example..
Post Reply