Questions tagged [tikz-graphs]

The graphs and graphdrawing libraries included in PGF/TikZ 3.0 provide powerful tools for drawing graphs (with edges and nodes, not graphs of functions).

The graphs library provides much more convenient code for specifying graphs than previous versions of TikZ. The graphdrawing library (and its sub-libraries) use LuaTeX to provide graph-drawing algorithms that position nodes and edges automatically.

206 questions
7
votes
1 answer

Help with Tikz to draw graphs with squiggly edges

In my work there are case analysis of graphs of the type: I am new to the wonderful world of TikZ and I have tried the following: \begin{tikzpicture}[every node/.style={circle, draw, scale=.6}, scale=.5, rotate = 180, xscale = -1] \node…
4
votes
1 answer

Tikz - drawing edges between subgraphs systematically

I have a similar question to this, but am hoping to find a more systematic answer. This is my code-- \documentclass[tikz,border=5]{standalone} \usetikzlibrary{graphs} \usetikzlibrary{graphs.standard} \begin{document} …
Kati
  • 41
4
votes
1 answer

tikz graphs library: Edge label syntax

I'm using tikz and its "graph" library, and I'd like to label some of my graph's edges. The tikz manual (pgfmanual.pdf v3.0.1, p. 364) suggests the syntax \documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{graphs} \begin{document} \tikz…
aranea
  • 43
3
votes
2 answers

How to shift the whole graph made with TikZ library graphs?

I would like to shift my graph a couple of cm to the left, as it overflows a bit on the right. I tried enclosing the \graph in scope, like so: \begin{scope}[shift={(-10,0)}] \graph[...]{...}; \end{scope} The output looks the same. Here is a…
3
votes
1 answer

How to draw two loops in same vertice in graph

I wish to draw a graph with two loops undirected on the same vertice, follows the figure: I draw the two loops, but got ugly, follows the code: \begin{tikzpicture} \draw[fill=black] (2,-1) circle (3pt); \draw[fill=black] (2,0) circle…
Frank
  • 192
3
votes
2 answers

Drawing of a set with TikZ

How can I draw the following figure with TikZ?
user110902
3
votes
1 answer

File explorer-like tree using TiKZ/graphs

I want to draw a binary tree using TiKZ (more exactly a rooted binary DAG, but there is only one occurence of node with two parents). I managed to obtain a tree using the standard TiKZ graph layouts: Here is the corresponding code (to compile with…
scand1sk
  • 141
3
votes
1 answer

Labelling the points of a line in xy-plane

see the given…
snehal
  • 71
3
votes
1 answer

Edges Overlaped With Nodes

I am drawing Petersen graph.But edges of graphs overlapped with nodes. \documentclass{article} \usepackage{animate} \usepackage{tikz} \usepackage{tkz-graph} \usetikzlibrary{arrows} \usetikzlibrary{lindenmayersystems} …
3
votes
1 answer

Changing Size of Vertex Circle

How to change the size of…
3
votes
1 answer

Tikz graphs with typeset nodes

Here is an example of what I want to do: \documentclass{minimal} \usepackage{tikz,amssymb} \usetikzlibrary{graphs} \begin{document} \begin{tikzpicture} \begin{graph}[multi]{ 1 -> 2; % this does not work: % $\mathbb{Q}$ ->…
Henry
  • 353
3
votes
1 answer

Tikzpicture edge over graph

I've got the image attached, obtained from code \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,thick,main node/.style={circle,draw,font=\sffamily\Large\bfseries}] \node (S) {}; \node[main node] (0) [node distance=1.1cm,below of=S]…
2
votes
1 answer

How to draw a loop passing through by a edge?

I wish draw the following graph: Follows the my attempt: \usetikzlibrary{positioning} \begin{tikzpicture} \tikzset{pointblack/.style={fill=black, circle, minimum width=3pt, scale=0.6}} %% \node at (2, 0.5) [pointblack] (xhw) {}; \node at (2, -0.5)…
Frank
  • 192
2
votes
0 answers

Draw edges connecting vertices that are arranged in a circle

I would like to be able to draw lines (edges) between any two vertices within this circle of 10 vertices. I have been able to draw the vertices in the circle but I can't figure out how to draw the edges. This is what I currently…
2
votes
1 answer

How to draw a pentagon shaped graph with edges only on the outside?

I've managed to find the graph below but I would like for the edges to only be between consecutive outside points (ie (1,2), (2,3), ..., (5,1)) \documentclass[border=3mm,tikz]{standalone} \begin{document} \begin{tikzpicture}[ every…
Eloise
  • 23
1
2