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
0 votes
1 answer
46 views

TikZ graph with nodes crossed out

I'm trying to learn how to draw graphs in TikZ, but the simple examples I find on tutorials online do not help with the graph I'm trying to create. Basically, I want to have four types of nodes: empty ...
user avatar
3 votes
1 answer
130 views

How to draw graphs with half-edges?

I tried to generate the graphs shown in the picture using tikz-network and tikz packages but I am unable to get the T shaped half edges like the picture. Any kind of help appreciated. \begin{...
user avatar
1 vote
1 answer
74 views

Multiple pgfplots with common y-axis

As a part of manuscript, I have to plot multiple graphs whose x and y axes ranges are the same. I am using subflot along with tikzpicture. My question is, since the range of values of the both axes ...
user avatar
  • 101
0 votes
1 answer
47 views

How can I draw this Automata with Tikz?

I want something like the figure: But what I got is: this is my code: \begin{center} \begin{tikzpicture}[node distance=1.5cm] % position the nodes a..d \node (a) [] {$\textrm{I}$}...
user avatar
  • 51
8 votes
1 answer
167 views

Find midpoint of path

I have two coordinates (v1) and (v2) which are connected by a bended path. Now I would like to connect a third variable (v3) to the middle point of this path, but I cannot figure out how. \coordinate (...
user avatar
  • 247
5 votes
2 answers
122 views

Positioning two graphs relative to each other inside a tikzpicture

I have two graphs within the same tikzpicture, I would like the second to be placed to the right of the first, but currently they just perfectly overlay each other. I tried placing them both on the ...
user avatar
0 votes
1 answer
77 views

Increase thickness of edges in graph

Consider the following LaTeX code that create Petersen graph in latex \begin{tikzpicture}[rotate=90] \GraphInit[vstyle=Hasse] \SetVertexNormal[LineWidth=.7pt] \grPetersen[RA=2.4,RB=1.3] ...
user avatar
  • 101
1 vote
1 answer
92 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 ...
user avatar
  • 121
0 votes
1 answer
85 views

How to draw the following picture on tikz?

Is there any way to do this without drawing every single circles?
user avatar
  • 43
1 vote
1 answer
64 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 ...
user avatar
  • 185
1 vote
1 answer
33 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} \...
user avatar
  • 41
1 vote
1 answer
183 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 \...
user avatar
  • 194
2 votes
1 answer
54 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. ...
user avatar
  • 33
3 votes
1 answer
61 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 (...
user avatar
  • 160
1 vote
2 answers
72 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 ...
user avatar
  • 33
2 votes
2 answers
136 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{...
user avatar
0 votes
1 answer
55 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} \...
user avatar
  • 195
0 votes
1 answer
86 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 ...
user avatar
1 vote
3 answers
91 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 ...
user avatar
1 vote
1 answer
61 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 ...
user avatar
  • 279
0 votes
2 answers
89 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
user avatar
1 vote
1 answer
55 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{...
user avatar
3 votes
3 answers
145 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} \...
user avatar
  • 1,163
1 vote
1 answer
53 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]{...
user avatar
-1 votes
1 answer
111 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
user avatar
  • 173
3 votes
1 answer
133 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, ...
user avatar
0 votes
1 answer
114 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} \...
user avatar
  • 699
2 votes
2 answers
96 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 ...
user avatar
  • 33
-1 votes
1 answer
61 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!
user avatar
  • 111
2 votes
0 answers
123 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 ...
user avatar
2 votes
2 answers
235 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-...
user avatar
  • 501
2 votes
2 answers
309 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 ...
user avatar
  • 501
12 votes
4 answers
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 ...
user avatar
  • 5,305
1 vote
3 answers
107 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,...
user avatar
2 votes
1 answer
31 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}...
user avatar
0 votes
2 answers
217 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}] {...
user avatar
  • 3
2 votes
1 answer
151 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 ...
user avatar
1 vote
3 answers
88 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={...
user avatar
1 vote
1 answer
60 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} ...
user avatar
3 votes
1 answer
148 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,...
user avatar
9 votes
2 answers
899 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....
user avatar
2 votes
0 answers
129 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 ...
user avatar
4 votes
2 answers
148 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} ...
user avatar
2 votes
1 answer
190 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/....
user avatar
  • 123
1 vote
0 answers
147 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 ...
user avatar
  • 757
0 votes
0 answers
53 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} \...
user avatar
0 votes
2 answers
138 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 ...
user avatar
2 votes
2 answers
454 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} \...
user avatar
-2 votes
1 answer
181 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?
user avatar
  • 79
0 votes
2 answers
238 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!
user avatar
  • 95