LaTeX forum ⇒ Graphics, Figures & TablesSpecific Drawings with Arrows and Vertices

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

Specific Drawings with Arrows and Vertices

Postby Lemon » Sun Jul 14, 2013 8:39 am

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 106 times

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9521
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Jul 14, 2013 9:23 am

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
Site admin

Lemon
Posts: 2
Joined: Sun Jul 14, 2013 8:17 am

Postby Lemon » Sun Jul 14, 2013 10:37 am

Hi Stefan,

Thank you for your response. I now have this:

  1. \documentclass[11pt]{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{tikz}
  4. \usetikzlibrary{arrows}
  5.  
  6. \begin{document}
  7. \begin{figure}[!ht]
  8. \centering
  9. \begin{tikzpicture}[
  10. auto=left,
  11. every node/.style={
  12. circle,
  13. draw,
  14. fill=black,
  15. text=white,
  16. scale=1.0
  17. }
  18. ]
  19. \node (A) at (0, 0) {A};
  20. \node (B) at (0, 2) {};
  21. \node (C) at (0, 4) {};
  22. \node (D) at (-2, 6) {};
  23. \node (E) at (2, 6) {};
  24.  
  25. \foreach \from/\to in {A/B, B/C, C/D, C/E}
  26. \draw (\from) -- (\to)[black];
  27.  
  28. \draw [blue, very thick] plot [smooth] coordinates {(-2,6) (-3,5) (0,2)};
  29. \draw [red, dashed] plot [smooth] coordinates {(2,6) (3,7) (4,5) (3,3) (0,0)};
  30.  
  31. \node [fill=none, draw=none, text=black] (X1) at (2, 1) {$e_1$};
  32. \end{tikzpicture}
  33. \caption{Example}
  34. \label{fig:xample}
  35. \end{figure}
  36. \end{document}
Last edited by localghost on Sun Jul 14, 2013 12:08 pm, edited 3 times in total.
Reason: Code reduced to a proper minimal example (see Board Rules). Has to be done by oneself.

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Sun Jul 14, 2013 12:20 pm

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.
  1. \documentclass[11pt]{standalone}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{tikz}
  4. \usetikzlibrary{arrows}
  5.  
  6. \begin{document}
  7. \begin{tikzpicture}[
  8. >=stealth,
  9. auto,
  10. point/.style={
  11. circle,
  12. draw,
  13. fill=black,
  14. text=white,
  15. scale=1.0
  16. }
  17. ]
  18. \node[point] (A) at (0,0) {A};
  19. \node[point] (B) at (0,2) {};
  20. \node[point] (C) at (0,4) {};
  21. \node[point] (D) at (-2,6) {};
  22. \node[point] (E) at (2,6) {};
  23.  
  24. \foreach \from/\to in {A/B, B/C, C/D, C/E}
  25. \draw (\from) -- (\to)[black];
  26.  
  27. \draw[->,blue,very thick] (D.135) .. controls +(left:2) and +(left:2) .. (B);
  28. \draw [->,red,dashed] (E.45) .. controls +(right:2) and +(right:2) .. node[midway,black] (e1) {$e_1$} (A);
  29. \end{tikzpicture}
  30. \end{document}

I don't think that we will get feedback on tis. m(


Best regards and welcome to the board
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

mayankmi
Posts: 45
Joined: Sat Apr 20, 2013 7:52 pm

Postby mayankmi » Sun Jul 14, 2013 2:25 pm

good example..


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: MSN [Bot] and 5 guests