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).

123 questions
21 views

Edge Coloring in graph

I'm looking for a simple solution to do Graph edge coloring, even following the tkz-graph documentation, seems my graph edges aren't being colored (neither line width is being changed), probably I'm ...
61 views

How do I draw a simple recurrent neural network with Goodfellow's style?

I need to draw a recurrent neural network that has the same architecture has the following one In other words, a RNN with one input, one single hidden and recurrent unit and one output. However, I ...
39 views

TikZ graph node wobble

Is there a way to align nodes by baseline in TikZ graphs? \documentclass[tikz]{standalone} \usetikzlibrary{graphdrawing} \usegdlibrary{trees} \begin{document} \begin{tikzpicture}[tree layout] \...
45 views

Arrow body disappearing in tikz graph

I used Tikz library graphs to draw a graph, that is: \usetikzlibrary{graphs} Here's my code \begin{tikzpicture} \graph { "$x_1$" -> { "$x_2$" -> "$x_3$", "$x_4$" -&...
53 views

How to start Cartesian placement from existing node

I use the graphs library to create graphs. The Cartesian placement is a very convenient tool for my needs. Sometimes I need to place a new node relative to an existing node that was automatically ...
64 views

tikzcd : how to extended triangle with more arrows?

I have the following code which produces the attached triangle picture. Does anyone know how to produce a directed edge from S_0, down and to the right, ending at D_0b? Also, join vertexes S_1 and ...
567 views

How to draw/optimize this graph with tikz

I would like to know if is there a way to optimize the code that I use to draw the next graph: I do it using this: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} \begin{figure}[h]...
45 views

Tikz: two labels on one edge (one following the other one)

I would like to add a label which follows another one. For instance, I have: \documentclass[10pt]{beamer} \usepackage{tkz-graph} \GraphInit[vstyle = Shade] \tikzset{ LabelStyle/.style = { ...
256 views

pgfplots: How to draw exponential graph with 60° start angle?

I want to draw a simplified Michaelis-Menten kinetic (monod-function) to compare it with a linear function. Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \...
123 views

Phase plane diagrams in latex [closed]

Is there any method to construct phase plane diagrams directly in latex? I want to sketch plots like these based on eigenvalues of a matrix. For e.g., if both the eigenvalues of a 2-by-2 matrix are ...
61 views

How to optimize this codes of graphs with tikz

I am trying to learn Tikz and I want to know if there is a way to optimize this 2 graphs. Thanks. \documentclass[11pt]{article} \usepackage{tikz} \begin{document} \begin{figure}[ht] \...
28 views

How to eliminate the arrows on this Cayley Graph

I am trying to do the next graph, but without using arrows: \documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{lindenmayersystems,arrows.meta} \newcount\quadrant \...
71 views

How to draw this cyclic graph with tikz

I am very new using Tikz, I am trying to draw this graph: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[y=.6cm, x=.6cm,font=\small] \draw [latex-...
92 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} \...
263 views

Why is there a trace line in this tikz graph?

I am trying to generate a shaded area between three curves: two are y=±√x and third one is y=5. \documentclass[10pt,multi=False,border=5pt,tikz,class=scrartcl]{standalone} \usepackage{xcolor} \...
249 views

Simplest way to draw an arbitrary unweighted undirected graph with TikZ?

Sorry if this has been asked before, but I couldn't find something to address my particular issue. Everything I have seen (e.g. this) seems to assume particular pattern to the edges and nodes. I ...
47 views

Changing radius for rounded corners in tikz \graph

I'd like to specify the radius of rounded corners in my \graph. I know I can change the radius of a rounded corner with an explicit \draw command, but I haven't seen a way to do it in a graph. The ...
101 views

Layered graph by tikz lib graphdrawing: rotate & minimize manual adjustments

I was trying to recreate following graphviz graph with tikz (from https://graphs.grevian.org/example) graph { rankdir=LR; a -- { b c d }; b -- { c e }; c -- { e f }; d -- { f g }; e -- h; ...
64 views

How to skip levels in a TikZ graph

In the following simple graph drawn with the TikZ \graph command I would like the red f node to appear on the same level as the other leaf nodes (a, b, c, d). Is there any option to skip a level ...
379 views

Rotating Standard Graphs

Is there are way to rotate standard graphs in tikz? For example, the following produces a cyclic graph with 6 vertices \begin{tikzpicture}[every node/.style={fill,circle,very thick,inner sep=0pt}] ...
264 views

TikZ: Circle node split vertically mixes up representation

I used this previous solution to successfully split a node vertically in my graph. But by using this solution the graph representation will get mixed up. How can I fix this? Thanks in advance! ...
282 views

Tikz graphdrawing trees layout: center second child

I have created following tree/graph: %! TEX program = lualatex \documentclass[]{scrartcl} \usepackage{tikz} \usetikzlibrary{ graphs, graphdrawing, quotes, } \usegdlibrary{trees} \begin{...
187 views

Draw a graph with vertex pairs

I want to draw in LaTex a Petersen Graph using Kneser graph K(2,5) notation. And i'll do the same with the hypercube. Like this exemple: How can i do it please ?
48 views

How can I set bend right=0 for all edges in a tikz graph?

Consider following graph %! TEX program = lualatex \documentclass{article} \usepackage{tikz} \usepackage[graphics, active, tightpage]{preview} \PreviewEnvironment{tikzpicture} \usetikzlibrary{graphs,...
284 views

Graph with parallel multi-edges with designated anchor points

Consider following graph created with the GUI tool LaTeXDraw: I want to create a similar graph with tikz. This is how far I got: %! TEX program = lualatex \documentclass{article} \usepackage{tikz} \...
119 views

What's the code for this graph?

How can I draw the picture below using tex code? I know that possibly every pic of this type can be made into tex environment, but I'm running out of time and I really appreciate your help. All 7 ...
81 views

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{...
240 views

Tikz mindmap: combine “grow cyclic” with “clockwise from”

I'd like to define a mindmap in tikz that basically do the same thing as grow cyclic, except that the direction of the first layer should go to the bottom instead of the right. I tried to use ...
138 views

Macro for TikZ to draw loops in oriented graphs

I am fairly new in TikZ and even more in TikZ macros. I wanted to modify the macros given in another thread, and the goal is to implement node loops but to be able to enter the in and out angles as ...
35 views

Tikz graph labels: Error compiling example from manual

I am trying to add labels to arrows in a Tikz graph. The following example from the manual, p. 260, does not compile on my updated TeXLive 2017 system. Both pdflatex and xelatex give this error: ! ...
97 views

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{...
76 views

How do I make an arrows, texts and dots in my own TikZ graph

Following the advice of @cfr, I have made the graph the TikZ from 0 guiding me through several pdf and TikZ graphs from other approaches. Here my TikZ LaTex: \begin{tikzpicture}[ ell/.style 2 args=...
323 views

graph with tikz, math environment in nodes

I'm trying to draw a graph which node text should be in a math environment. For instance consider the following : \documentclass{article} \usepackage{tikz} \usetikzlibrary{graphs} \begin{document} \...
145 views

How to use arbitrary text as node name in tikz graph in a simple way?

I would like to use tikz graph to draw graphs of function calling relations. But I have trouble with function names from C programming language, where underscore is allowed in a function name. \...
102 views

Issues with node labels using quotes on referenced nodes in graphs

The following: \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{graphs, graphs.standard, quotes} \begin{document} \begin{tikzpicture} \graph[grid placement, n = 4, chain shift = {(2,0)}...
54 views

How can I limit the length of a plotted function?

I'm trying to plot a simple exponential function on a graph, however, the function itself isn't staying within the domain. Here's the code \begin{tikzpicture} \draw[->] (-3,0) -- (3,0) node[...
120 views

Complex TikZ graphs from multiple sources with subgraphs labeling an edge

I'm attempting to create a diagram equivalent to the following using TikZ: Trajectory in the Muddy Children Problem I have a solid handle on how to create the individual components/subgraphs in TikZ....
354 views

Automatically draw a graph with a cycle in Tikz?

I know how to automatically draw graphs with nodes being only bound to the next node in a "line". But how would I do it if I have a cycle like this: Thanks in advance.
315 views

Nesting tikz nodes

I want to put a tikz graph (a Feynman diagram using tikz-feynman) inside other tikz nodes, but it doesn't seem to work. A MWE is below. It has to be compiled with lualatex as I'm using graphs. \...
42 views

How to create equi-distant labeled nodes and edges on a spiral with TikZ?

I used the code below and got figure 1. How do I get figure 2? \documentclass[border=5mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [fill=white] circle [radius=4pt] (0,...
235 views

Rotate tikz “Layered Layout”

I know many of the layouts in Tikz can be rotated, but I fail to do it with the Layered Layout. I have a very large chart that takes a lot of space horisontally, and i believe it would look better ...
37 views

The expression which the key /tikz/graphs/m is supposed to be an abbreviation of, isn't equivalent to it

The section "Graph subgraph I_nm" on pp. 299-300 of the TikZ & PGF manual for version 3.0.1a states (on p. 300) that the key /tikz/graphs/m=<number> is an abbreviation for W={1,...,<...
95 views

Based on what does TikZ decide which graph nodes to connect with an edge?

Consider the following Plain TeX manuscript featuring a TikZ graph. \input tikz \usetikzlibrary{graphs} \tikz \graph { {a,b,c} -> {d,e->f} };% \end This manuscript renders the following graph. ...
196 views

Multiple questions regarding drawing coordinate systems and graphs with Tikz

this is the first time I am trying to use Tikz in LaTeX and I have to admit that the huge amount of stuff you can do with Tikz is overwhelming and I would be thankful for a slow and detailed ...
218 views

Consider the following LaTeX manuscript featuring a TikZ picture of two filled circles. The right circle is drawn inside a \pgfextra. The path's fill color is yellow! \documentclass{standalone} \...
156 views

An example from the TikZ manual re the /tikz/graph/parse key

I will list two LaTeX manuscripts. The first one, which is the example given in the manual to demonstrate the usefulness of the /tikz/graph/parse key, compiles successfully, whereas the second one ...
74 views

Rationale for the < notation for specifying an outgoing edge option as a source node option

Consider the following LaTeX manuscript featuring a simple TikZ graph (the graph's code is essentially copied from p. 260 of the TikZ & PGF manual for version 3.0.1a). \documentclass{standalone} \...
206 views

tikz-graph last level of tree circled only

How can I have only the last level (leaves) of the tree circled (not everyone)? \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{graphdrawing} \usetikzlibrary{graphs} \usegdlibrary{...