Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tkz-graph]

Package to easily create graph diagrams.

11
votes
1answer
7k views

Multi-rooted Tree-like Structures and Nodes with Multiple Parents in LaTeX

The qtree package seems to facilitate the drawing of simple trees only. Is there a way to incorporate: Multiple roots & Nodes with multiple parents in a tree in LaTeX?
8
votes
2answers
4k views

Petersen graph with new tikz graph library

I'm considering moving from tkz-berge to the new tikz graph library for drawing my graphs (in the sense of graph theory). I have produced the Petersen graph, but is there is a more elegant way of ...
8
votes
1answer
12k views

Showing weights on Tikz graph using “draw edge” commands

I would like to show some numbers as weights of the edges of my Tikz graph. My graph without weights is the following: \begin{figure}[!ht] \begin{tikzpicture}[shorten >=1pt, auto, node distance=...
7
votes
1answer
3k views

How do you make a tkz graph with edges starting and ending at the same vertex?

I am trying to use the tkz-graph package to put together a directed graph. I have never used it before, so I am trying to piece together examples I have found on the internet. Below is the code that I ...
6
votes
1answer
832 views

How to use tkz-graph and tikz-qtree without conflict?

It seems that the tikz-qtree and tkz-graph packages both define (or redefine) the \edge macro... I'd like to use both, but it doesn't seem possible: \documentclass{article} \usepackage{tikz} \...
6
votes
1answer
3k views

How can I increase arrow-head size in tkz-graph?

How can I increase the size of the head of the arrows in a tkz-graph graph? This question is similar to Is it possible to change the size of an arrowhead in TikZ/PGF?, but requires an adaptation of ...
6
votes
1answer
506 views

How to shift edge labels along edges in tkz-graph?

Using tkz-graph package I often feel the need to move a little bit the labels on the edges, that are always positioned midway the edge. In this example I would move the label 0.5 from node a to node d ...
5
votes
3answers
169 views

How to create a vertex at the intersection of two edges with tkz-graph?

I want to draw But I don't know how to create v_6 which is the intersection of \Edge(v_3)(v_5) & \Edge(v_1)(v_4) and v_7 is the intersection of \Edge(v_3)(v_5) & \Edge(v_2)(v_4). Here the ...
5
votes
2answers
191 views

Recreating Peterson graph with tkz graph?

I was trying to recreate Here is my MWE \documentclass{standalone} \usepackage{tkz-graph} \usepackage{tkz-berge} \definecolor{iceberg}{rgb}{0.44, 0.65, 0.82} \tikzstyle{VertexStyle} = [shape = ...
5
votes
2answers
2k views

how to draw a cut through a graph in latex

I want to draw a cut through the graph, like a line passing through the edges from the source to gamma, source to alpha and source to omega. I am doing that to demonstrate a minimum cut in a network ((...
5
votes
1answer
263 views

Drawing particular curves

I need to recreate the curves in the first graph in Latex. What's the best way? \begin{document} \usepackage{tikz} \usetikzlibrary{shapes.geometric,arrows,positioning,fit,calc,} \begin{center} \...
5
votes
1answer
83 views

Drawing a polygon

How to use the tikz package to achieve the following. I looked at but still couldn't get it done. Any help is much appreciated.
5
votes
1answer
1k views

Where can I find documentaion for tkz-graph in english

The tkz-graph / tkz-berge packages are really useful for making graphs. The official documentation available on CTAN, is however not much help. The documentation for tkz-berge only document the high-...
5
votes
0answers
102 views

Moving loops in tkz-graph

I'm trying to modify the graphiso.sty package to show morphisms between directed graphs. This meant it should allow to show edges with arrows, I could do that. The thing is I now want to include ...
4
votes
2answers
89 views

Tkz-graph and foreach

I want to draw the following graph by using the usepackage tkz-graph and the command foreach or by any other method: \documentclass{article} \usepackage{amssymb,amsmath} \usepackage{xcolor} \...
4
votes
1answer
490 views

How to reuse vertex names using the tkz-berge graph drawing package?

I'm trying to draw a graph using tkz-berge, where many of the vertices might display the same value, is there a way I can do this? Here is my code: \begin{figure}[h] \centering \begin{tikzpicture}[...
4
votes
1answer
376 views

How can I fill a vertex with black bars?

Suppose I have simple graph drawing like the following. \documentclass[12pt,a4paper]{article} \usepackage{tkz-graph} \begin{document} \begin{figure} \begin{tikzpicture} \SetUpEdge[lw = 1.5pt, ...
4
votes
1answer
1k views

Labeling Edges in a Weighted Digraph

I would like to have the labels of the edges of a weighted digraph positioned "beside" (north, south, east, west, etc.) the arrows. I have already created the digraph with: \documentclass{article} \...
4
votes
1answer
603 views

tikz for DAG: give outline and background to labels that are out of the node?

I am using the TikZ and tkz-berge packages to create a direct acyclic graph. I've pasted my code below. I would like the variable labels "variable1", "variable2", etc to have an outline around them ...
4
votes
1answer
152 views

Drawing a TikZ Graph

I'd like to try and include this graph in a Beamer presented, and would like to draw it using TikZ instead of including a PDF (for a number of reasons). I honestly have no idea how to get started and ...
4
votes
1answer
3k views

flow chart page size issue

I have been doing this since from last month. I want to draw this flow chart using \documentclass[a4paper,11pt]{report} but if I use above configuration (which I want to use) the flow chart does ...
4
votes
1answer
80 views

Incompatibility between \usetikzlibrary{babel} and the tkz-graph \Edge macro

Continuing on from my question posted yesterday, I struck a similar problem with the \Edge macro of tkz-graph when attempting to define text labels - with \usetikzlibrary{babel} loaded compile ERROR !...
3
votes
2answers
932 views

TikZ Graph with a circle alround some of it's vertices

I want to draw the following Graph with the tikz package and/or tkz-graph package, but I'm still very new to this. Could someone please help me? :)
3
votes
1answer
528 views

tkz-graph vs tkz-berge

What is the difference between the two packages ? Did they have a different use? I know they have been made from the same author. The description of tkz-berge says that it pro­vides a col­lec­tion of ...
3
votes
1answer
240 views

Something wrong to use ifthenelse and mod function in tikz

I get errors for this latex code, please someone can help me \documentclass{article} \usepackage{tikz} \usepackage{tkz-graph} \usetikzlibrary{graphs,graphs.standard,arrows.meta} \begin{document} \...
3
votes
2answers
6k views

tkz-graph: changing individual vertex type

I'm using these settings for most vertices: \GraphInit[vstyle=Classic] \tikzset{VertexStyle/.append style = {minimum size = 5pt, inner sep = 0pt}} But I'd like to have one or two vertices of my ...
3
votes
2answers
2k views

Basic tkz-graph usage problems, errors, bad output

I'm using TeXLive 2011 via MacTeX, and I keep my packages updated. I'm trying to start simple with tkz-graph. When I use the following code, copied directly from the tkz-graph documentation: \begin{...
3
votes
1answer
210 views

Tkz-Graph only two of six vertices should be labeled

This is the code to a graph I'm drawing, but I only want the vertices "a" and "e" to be labeled; the rest should just show as vertices without a label. How can I do that? \documentclass{article} \...
3
votes
1answer
86 views

Achieve a centered node with equal edge lengths using tkz-graph

Ok, so I've used tkz-graph to produce the following graph: The code I've used to produce the graph is as follows: \documentclass{standalone} \usepackage{tkz-graph} \begin{document} \begin{...
3
votes
1answer
1k views

How can I change the colors of the edges in a graph created by tkz-graph in LaTeX

I'm trying to change the colors of two of the edges in the basic graph created by the tkz-graph LaTeX code below to red and the other two to blue and I can't seem to find a way to do it... Any help ...
3
votes
2answers
751 views

Invisible vertices with tkz-graph

Is it possible to hide the vertices while using package tkz-graph? Firstly I want to show just the edges, and then show the whole graph. However, I need the vertices from the beginning in order to ...
3
votes
1answer
63 views

tkz-graph doesn't respect color option to edge when Welsh or Normal style specified

When I specify \GraphInit, the \Edge command doesn't respect any options. In my case, I'd need to specify the color and line width. In this example, I wanted to set one of the edges red and the ...
3
votes
1answer
2k views

Draw a factor graph with tikzpicture [duplicate]

Ordinarily I draw graphs in tikz with: \begin{tikzpicture} \Vertex[x=1,y=1]{x1} \Vertex[x=2,y=1]{x2} \Vertex[x=3,y=1]{x3} \Vertex[x=4,y=1]{x4} \Vertex[x=5,y=1]{x5} \Edge(x1)(...
2
votes
1answer
100 views

How to draw the Errera's graph

someone could you give me an example to draw this graph? My difficulty is set lengths in each vertex, I use tkz-graph Uncompleted example \documentclass[tikz]{standalone} \usepackage{tkz-graph} \...
2
votes
1answer
220 views

How do I move label on loop to above the loop in a Tikz picture

I have the following standalone class file to create a figure for a journal paper: \documentclass[12pt,A4paper]{standalone} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{...
2
votes
2answers
698 views

using tkz-graph to draw concentric cycles of vertices

I would like to use tkz-graph to layout cycles of vertices on concentric circles. If I had complete cycles then tkz-berge would do teh job nicely but because I wish to exclude some edges it seems to ...
2
votes
1answer
37 views

Why the arrows of two edges are not appearing in tkz-graph

I am creating a figure using tkz-graph. But there are two arrows of the edges are missing. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath, amssymb, amsthm} \usepackage{tkz-...
2
votes
1answer
124 views

Multiple labels for a vertex using tkz-graph

I am trying to create figures that illustrate how binary trees may be represented using array indices. Therefore I would like each node in my tree to have two labels: One inside the note, representing ...
2
votes
1answer
102 views

How to reduce the size of the vertices in `tkz-graph`?

How to reduce the size of the Vertex in the following tkz-graph?? MWE: \documentclass[]{standalone} \usepackage{tkz-graph} \begin{document} \begin{tikzpicture} \GraphInit[vstyle=Classic] % \Vertex[...
2
votes
1answer
573 views

Position of edge labels in \Edge[label=e] in tikz

Here is a simple code I have, which enough of an example of what I'm looking for. I am using the \Edge command with label, as this labels directly on the edge, which is what I am looking for. What I ...
2
votes
1answer
336 views

Adding nodes to line segments

\documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage[active,float]{preview} \usetikzlibrary{calc} \usetikzlibrary{graphs,plotmarks,arrows,automata,positioning,fit,shapes....
2
votes
1answer
1k views

Change color of vertex outline in tkz-graph

Suppose I have the following graph: \documentclass[]{article} \usepackage[utf8]{inputenc} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{fullpage} \usepackage[upright]{fourier} \...
2
votes
1answer
161 views

How can I make a thick line in a graph?

I have this code which generate me a graph. How can I make line 1-3 to be thick? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[top=2in, bottom=1in, left=1in, right=1in]{geometry} \...
2
votes
1answer
554 views

Drawing arrows next to edges on graphs

I need to draw several graphs (the graph theory kind) with arrows drawn next to the edges. Here is a rough sketch of the kind of thing I mean: I'm aware of tkz-graph and would like to use it if ...
2
votes
1answer
907 views

How to make a vertex with math inside using tkz-graph?

Okay, my goal is to make a diagram like this in LaTeX: With the difference, that I want where you see dots or dots2, I want to have $\ldots$ displayed. I'm trying to get that working using the tkz-...
2
votes
1answer
74 views

Self-loops in graphs change their shapes when the picture is rotated

I am using tkz-graph for drawing graphs. Self-loops change their shapes when the picture is rotated. Is this normal? Since I could probably redesign the rotated graph from the beginning, I am more ...
2
votes
1answer
435 views

tkz-graph: \Edges works but not \Edge

Using the tkz-graph package, I am able to use the \Edges command but not the \Edge command. When I try to use the \Edge command commented out below, I get the following error: Paragraph ended before \...
2
votes
1answer
648 views

Individual node coloring of predefined graphs from TikZ-berge

So far your forum has given me all the information I needed for TeX. Thanks for that. Now, it is the first time, I have a question, I couldn't find an answer to: I want to draw graphs of the Platonic ...
2
votes
0answers
17 views

Adjust tkzKiviatDiagram Diagram axis label size

I am trying to display several Kivat diagrams on a single A4 page. For that reason, I have embedded them in subfigures under one figure. This is why I have rescaled the Kivat diagram to fit in one ...
1
vote
1answer
61 views

Adding two nodes in tikz besides each other?

I am new to tkiz, I need to generate a figure like in the attached a picture. Here is the Wml code for generating the left side of figure. How to add the right part with the arrow shown.?? \...