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

Filter by
Sorted by
Tagged with
1
vote
1answer
73 views

How to draw a force graph with fixed clustered nodes?

How to draw a graph like the following with TikZ? In particular: It is an undirected graph. There are groups of 3 nodes that always stay close to each other and are linked by the bold edges. Some of ...
0
votes
1answer
71 views

How to draw the following picture on tikz?

Is there any way to do this without drawing every single circles?
1
vote
1answer
55 views

Create a graph with very large number of edges

I am trying to create in Latex a graph with a very large number of edges. Something similar to the attached image (taken from a paper by Bissyandé et al). I've tried to simply draw a graph using ...
1
vote
1answer
32 views

How can I reference the location of nodes that are placed with the \graph command in TikZ?

I've declared a graph like this: \documentclass[border=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{graphs} \begin{document} \begin{tikzpicture} \graph {1 -> 2}; \end{tikzpicture} \...
1
vote
1answer
52 views

Change tikz plot style parameters (numbers on axes, size of points) to match previous ones

I want to modify a graph to be in agreement with the previous ones in my paper. Throughout my document I have plotted with the following style: the codes are as follows: \begin{figure}[H] %Parabola \...
2
votes
1answer
49 views

Arrows do not appear in graphdrawing

I try to draw a diagram showing how different areas communicate with each other. In the end it should have the areas labelled A1,...,A5 in a circle and there will be many labelled arrows between them. ...
3
votes
1answer
54 views

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 (...
0
votes
1answer
54 views

How to label two edges differently in compact tree graph syntax

I am trying to draw a tree in TikZ as pictured below. Everything is as I want it to be except that I cannot figure out how to ask LaTeX to draw two different labels on the edges in the tree/graph ...
2
votes
2answers
88 views

tikz - repeating a tikz figure several time in another tikz figure

I have a graph drawn in tikz, in sperate tex file, that I call upon with an input, and a call to \TikzExampleLargeKtn{6}{1}{1} (for instance). I'm not using tkz-graph but I'm open to it. \usepackage{...
0
votes
1answer
48 views

Why is the root node not centered?

I'm trying to code a star graph, using the tikz graphs library. This is what I have so far: \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{graphs} \begin{document} \...
0
votes
1answer
34 views

How to move the Y-axis label to the origin of the graph?

I would like to replicate a graph as seen in the picture below, using LaTeX. I have found this tutorial and have used it as a basis of creating the graph. However, I struggle with moving the Y-axis ...
1
vote
3answers
62 views

Apply operations to iterator \x in \foreach loop in Tikz

I am trying to draw a graph comprised of 13 triangles joined at the centre (i.e. a wheel graph with some edges missing from the outer cycle). I managed to connect the outer vertices to the central one ...
1
vote
1answer
48 views

How do I make a graph with branching rectangular edges, labeled before branching?

This graph duplicates the label, and the edges are not vertical or horizontal. I would like a vertical edge to leave A, labeled 'x' then split into two right and left horizontal branches which would ...
0
votes
2answers
80 views

Cannot draw specific graphs in Latex for my math homework

Can anyone tell me how to draw this graph (and these types of graphs) in latex? Thanks
1
vote
1answer
46 views

TIkz Generated Graph Node Coloring

I have the following graph and I was wondering how I could color each node with different colors. \documentclass[border=2cm]{standalone} \usepackage{tikz} \begin{document} \begin{...
3
votes
3answers
107 views

Centering TikZ Graph

Is there a simple way to align the following two sets of the bipartite graph horizontally, i.e. move the three nodes on the left 1.5 times the vertical node distance downwards? \begin{tikzpicture} \...
1
vote
1answer
47 views

Binary tree layout removes duplicate branches

What I want to do is draw a tree that doubles in size on each layer, so I thought a binary tree would be the right solution, as of right now I have the following code: \documentclass[a4paper, 12pt]{...
-1
votes
1answer
84 views

Division in process

This is the process of Euclidean Algorithm to find $\gcd(a,b)$. Could anyone help me hơ to draw the process of division? Thank all
3
votes
1answer
90 views

Tikz graph library with no node text

I'm trying to use the TikZ graph library to draw graphs, but I'm having trouble figuring out how to draw graphs without text on the nodes. Here's a MWE. \documentclass{article} \usepackage{amsthm, ...
0
votes
1answer
79 views

Tikz graphdrawing node distance

I would like to create certain graphs in Tikz with a given node distance. I tried: \documentclass{amsart} \usepackage{tikz} \usetikzlibrary{graphs,graphdrawing,positioning,graphdrawing.layered} \...
2
votes
2answers
95 views

Fill area under curve in the right order

Good evening. I am building a plot for a data which was recorded over a year. For this frequency analysis I want to add thresholds to show at which time these have been passed. The area under these ...
-1
votes
1answer
58 views

How to draw a labelled color diagram

I am new to the latex diagram and I can't find any model to draw the labeled color diagram below. I wonder if it's possible to draw it? Thanks!
2
votes
0answers
81 views

Left-align TikZ pics and issue with TikZ graph

I'm trying to put together a more complex drawing from several TikZ pics. I have constructed a minimal example from which the challenges become visible (see below). After the styles, first the two ...
2
votes
2answers
164 views

importing an external image on top of a node using tikz

How can I generate this nodes and edge structure using tikz in latex? I created the following figure using tikz, now I'd like to put some figures on the top of each node (e.g. a heart with heart-...
2
votes
2answers
276 views

using Tikz to create a maze

I created this figure with microsoft powerpoint but I'd like to make a similar one using latex because I am writing my document in latex. I already asked how I can make similar maze structure but in ...
12
votes
4answers
3k views

How to draw a diagram for "Rope Around the Earth" problem?

I would like to produce an image to help students to better understand the celebrated ``Rope Around the Earth'' problem, which asks---how much slack must be added to a tightly fitting rope around the ...
1
vote
3answers
78 views

Connect two nested graphs

Is there an easy way I can connect the vertices of these graphs using the code I have? In other words, I want to connect the first node of the smaller decagon with the first node of the larger decagon,...
2
votes
1answer
28 views

Visual issue when printing edge weights in tikz

I am trying to place edge weight in a network that I draw in tikz, however, it does not show up as I wanted. I am providing a MWE below. \documentclass{standalone} \usepackage{tikz} \begin{document}...
0
votes
2answers
119 views

Understanding algorithmic graph drawing in TikZ

Using the graphdrawing library for TikZ, is it possible to draw the following graph with this formatting? I have used the following code to draw it "manually": \tikz[nodes={circle, draw}] {...
2
votes
1answer
134 views

How to draw the the following directed graph with TikZ?

I am new to TikZ. I am trying to realize the photo using the TikZ package. I know how to draw these individual figures using tikzpicture. However I am not sure how I can place them in order and use ...
1
vote
3answers
71 views

Add captions to two graphs side by side

How do I add a caption under each graph while still keeping them next to each other? \documentclass{article} \usepackage{tikz} \begin{document} \usetikzlibrary{positioning} \tikzset{main node/.style={...
1
vote
1answer
48 views

Align multiple graphs side by side

I would like to align all of these graphs next to each other so they are side by side. How can this be done? I also can't figure out why the they are crooked. \documentclass{article} \usepackage{tikz} ...
3
votes
1answer
77 views

Color specific edges and vertices in a graph

How do I make only some edges and vertices a different color? \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \tikzset{main node/.style={circle,fill=black,draw,...
9
votes
2answers
773 views

Tikz wrong calculation draw exponential function

Thanks for your help in advance:) I have a problem with tikz calculating/printing the values of my function wrong. The function is f(x) = (ax³+bx²+cx)*e^(dx) with a=-3.01718 b=11.8804 c=0.753323 d=-0....
2
votes
0answers
108 views

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 ...
4
votes
2answers
140 views

Filling with color between functions

I need some help in filling with colors between some functions, here is my code: \documentclass[12pt]{report} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \begin{document} ...
2
votes
1answer
152 views

Some problem in drawing undirected graph with loops(TikZ)

I'm trying to draw some undirected graphs with loops using TikZ, but running into some problem. My set up is \documentclass[11pt]{article} \usepackage{float} \usepackage{tikz} \tikzset{every loop/....
1
vote
0answers
116 views

Which drawing method should I use for a finite state machine in tikz?

I have a finite state machine with 4 states and a few dozen arrows. Which method should I use to draw it? Graph Drawing section of the pgf manual uses \graph The Petri net example uses \node and \edge ...
0
votes
0answers
25 views

Dots and arrows in a graph

Please, I'm looking help to represent this graph. I don't understand why the arrows doesn't appear, and also I'll have problems to represent the dots. My try: \begin{document} \begin{center} \...
0
votes
2answers
103 views

Changing individual elements of a matrix in Tikz

I am preparing lecture notes and I need to manipulate a matrix between iteration. Typically, only few elements change. Therefore, it would be nice to change these elements instead of copying a matrix ...
1
vote
2answers
247 views

Different horizontal and vertical spacing between nodes in a Graph using tikz

I am drawing a simple graph and I would like to have more spacing in the x direction than in y. However, using "node distance=4cm" I can only control the distance. \documentclass{article} \...
-2
votes
1answer
174 views

Draw a graph with a common vertex [closed]

For my project in machine learning, I want to draw in LaTex a Graph with a common vertex Like this example: How can I do it, please?
0
votes
2answers
170 views

How do I create this graph in LaTeX?

I was wondering how I would be able to create this complete graph (K4) in LaTeX, with the edges colored either blue or red based on what's shown. Any help would be greatly appreciated. Thank you!
0
votes
1answer
149 views

TikZ: Non-intersecting edges

GIVEN: The code snipset below which shall draw a graph of non-intersecting edges. \usepackage{pgf} \usetikzlibrary{automata, positioning, arrows} \begin{document} \begin{tikzpicture}[->,node ...
1
vote
1answer
113 views

Shading Region of a Graph

Hope you're safe! I'm new to making graphs in pgfplots, and I've made the following graph (code below): What I'd like to do is to shade the area of the graph corresponding to all the points which ...
1
vote
2answers
95 views

Can I make the loops ultra thick. How could it be made possible?

\documentclass[beamer]{standalone} \setbeamercovered{highly dynamic} \usepackage{tikz} \usepackage{tkz-graph} \usepackage{mathrsfs} \pagestyle{empty} \usetikzlibrary{arrows,positioning,matrix} \...
0
votes
2answers
206 views

Figure for a physics problem

I want to copy this figure, but I cannot do it since I'm new to LaTeX, can anyone help me? I tried using the equation $x=\sqrt{1-(y+1)^{2}}$, but I can't seem to plot it on TikZ. Thanks for the help.
2
votes
2answers
185 views

Drawing a graph for n→n+1, n→ a⋅n mod m in TikZ

I have a newbie question. I would like to use TikZ to draw a graph with vertices 0,..,m-1 in a circle, and edges n → n+1 mod m, n → a⋅n mod m, where m=19, a=5, say. The following attempt almost works ...
3
votes
2answers
242 views

How to have the two different nodes parent the same child?

I'm trying to draw a dependency graph, I've followed this example, but I'm having difficulties with one node. I need node t to have two childs: r_vec and dR. However, I don't know how to link t and dR....
1
vote
2answers
405 views

How can one name a TikZ \graph and position a \node below it?

I'd like to place a node below a \graph in a tikzpicture. But, for some reason, I can't access the \graph. MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,graphs} \begin{...