Graphics, Figures & TablesGraph theory figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
bobbybd
Posts: 2
Joined: Wed Oct 20, 2010 2:30 am

Graph theory figures

Post by bobbybd »

Hello,

I am using latex to draw graphs-those in graph theory
but when I compile the tex file, I get a bunch of error in pgfcorearrow.code.tex and other lib files, really strange

Help me please, I'd like to draw a graph, I have to hand in my report tomorrow, I don't like to embed image while drawing is feasible


\begin{tikzpicture}[scale=0.75,transform shape]

%graph1
\Vertex[x=0,y=0](A)
\Vertex[x=3,y=0](B)
\Vertex[x=0,y=-3](C)
\Vertex[x=3,y=-3](D)
\tikzstyle{LabelStyle}=[fill=gray!30,sloped]
\tikzstyle{EdgeStyle}=[bend left]
\Edge[label=$e_1$](A)(B)
\Edge[label=$e_2$](C)(B)
\Edge[label=$e_3$](A)(D)
\Edge[label=$e_4$](C)(D)
\Edge[label=$e_5$](D)(B)
\Edge[label=$e_6$](A)(C)

\end{tikzpicture}

Errors are shown as in below image
Attachments
untitled.PNG
untitled.PNG (190.58 KiB) Viewed 3255 times

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Graph theory figures

Post by gmedina »

Hi,

try this:

Code: Select all

\documentclass{article}
\usepackage{tkz-graph}

\begin{document}

\begin{tikzpicture}[scale=0.75,transform shape]
%graph1
\Vertex[x=0,y=0,L=A]{A}
\Vertex[x=3,y=0,L=B]{B}
\Vertex[x=0,y=-3,L=C]{C}
\Vertex[x=3,y=-3,L=D]{D}
\tikzstyle{LabelStyle}=[fill=gray!30,sloped]
\tikzstyle{EdgeStyle}=[bend left]
\Edge[label=$e_1$](A)(B)%
\Edge[label=$e_2$](C)(B)
\Edge[label=$e_3$](A)(D)
\Edge[label=$e_4$](C)(D)
\Edge[label=$e_5$](D)(B)
\Edge[label=$e_6$](A)(C)
\end{tikzpicture}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply