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 [edge]

The tag has no usage guidance.

0
votes
0answers
9 views

Draw lines without arrows between nodes

The answer referenced is https://tex.stackexchange.com/a/45735/180050 and is essential for this question. In the given answer, it shows how you can easily make directed edges between specified nodes. ...
1
vote
2answers
36 views

Draw sloped and above path text between two edge-connected nodes with “circle connection bar option”

I wish to draw the text "USA" on path_1 using options as it was drawn "USA" in path_2, but draw without using nodes,only using edge in path_1. \documentclass{article} \usepackage{tikz} \...
0
votes
0answers
27 views

Draw a path through some specified points

I want to write a small program to draw an automata using tikz, but when I finish, it seems like this: Actually, I use the way of converting Graghviz to tikz. So I would like to draw a path from (_0) ...
1
vote
1answer
21 views

Compiling problem, connecting nodes thru edges is not working

I am having an issue when trying to connect the edges of some nodes (I am doing this on overleaf). If I only choose one of the nodes at the top and connect the edges with the nodes I intend to use on ...
2
votes
1answer
20 views

Positioning edge label

I'm trying to position two edge labels over and below their respective edges. I'd like them to be center aligned in relation to the edge. This is my current code: \documentclass[tikz,border=9]{...
2
votes
1answer
88 views

Strange white outline around vertices in graphs made by TikZ [closed]

In Metapost I was able to make a graph where there's no gap between the edges and vertices: But in Tikz there is a gap between the two: Making a black "border" around the vertex did not help. No ...
0
votes
1answer
39 views

After page-break my node does not exist anymore

After page-break my node (string) gets lost. Only at the first page my node "100" is shown. This code contains parts from @skillmon @ulrike fischer @saso Thank you at this point. I know i should post ...
3
votes
1answer
42 views

How to connect to the north anchors of triangular (leaf) nodes in tikz-qtree?

How to make the edges from x (resp. y) to connect to the north anchors of the triangular leaf nodes A and B (resp. C)? Note that this should not change the edge style between x and y. Therefore, the ...
2
votes
1answer
108 views

Aligning text on edge

I cannot figure out why the text on the edge is not entered. What am I doing wrong? \documentclass[margin=1mm]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{...
3
votes
2answers
83 views

How to place a Parabola/Distribution on top of a node in Tikz?

I'm trying right now to place a distribution (preferably a Gaussian curve) on top of a node within TikzPicture. The distribution should ideally be slightly offset vertically from the node, although ...
5
votes
1answer
172 views

Tikz, graphdrawing: How to use \foreach variables to set edge node labels?

I wanna create and label edges using a \foreach loop to avoid having to write every single node/edge when creating large graphs. It works fine when I use it to create nodes, but when I try to label ...
4
votes
2answers
149 views

tikz `postaction` using `edge`

Problem I want to add a tikz style which affects only some arrows in a large diagram, and adds a postaction. I also need to bend and label these arrows, so many are created using the edge command. ...
4
votes
2answers
64 views

Shifted edge labels in tikzpictures in nodes side by side with arrow between

I have two nodes in tikzpicture and in both nodes there is a graph in nested tikzpicture. Now, I would like an arrow to be pointing from one graph to the other - from the center of one graph to the ...
1
vote
1answer
121 views

Shifted edge labels in tikzpictures in nodes side by side

I'm trying to make two graphs and place them side by side and place edge labels over edges in the two graphs (as can be seen in the picture), but I am not successful in the second graph. My approach ...
14
votes
5answers
1k views

How to improve TikZ diagram with a lot of edges?

I have a diagram with 5 nodes and edges to each other, which leads to clumpy corners: \documentclass[parskip=half]{scrreprt} \usepackage[svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{...
10
votes
1answer
174 views

how to convince edge labels to be above/below edge, when they are slanted?

with the \documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{quotes} \begin{document} \begin{tikzpicture}[auto] \draw (0,0) to ["AA" '] + (2,0); \draw (0,0) to ["BB"] + (0,2); % \...
5
votes
4answers
826 views

How to draw edges with a bend?

I want to draw a diagram given below. Till now I am able to this much. \documentclass{beamer} \usepackage[most]{tcolorbox} \usepackage{multirow} \usetikzlibrary{matrix, arrows.meta, calc, positioning}...
0
votes
2answers
162 views

Drawing graph with Tikz: Link it with main text without overlapping with text

I'm trying to draw a graph in LaTeX with Tikz. Unfortunately, it is my first time using this package and I'm not to familiar with it. I've used the example from this website: http://www.texample.net/...
5
votes
2answers
427 views

How do I turn a draw edge twice

I want to connect two nodes with one edge so that it bends twice. For instance, \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node (A) {A}; ...
2
votes
1answer
561 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 ...
1
vote
1answer
146 views

Decision tree formatting

How can I make the following decision tree legible? The code is below: \begin{forest} for tree={l sep+=.8cm,s sep+=.5cm,shape=rectangle, rounded corners, draw, align=center, top color=white, ...
4
votes
3answers
180 views

How to make a line edge slanted?

I have a code that draws two lines \documentclass[border=5mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path[draw=red,line width=3mm](0,0)--(2,0); \path[draw=red,line ...
2
votes
2answers
636 views

Label of edges in a forest - labels are not visible

I decided to use tikz forest in my book which I prepare to make the figures more attractive... but I realized that it is not so funny without any previous experience with it. After hours of googling I ...
4
votes
1answer
413 views

How to put an arrow at midway of a loop

I am trying to reproduce the following figure: So far, my problem is to put the arrow of c_{1} at midway of the loop. That is what I've already done: \documentclass{article} \usepackage{tikz} \...
4
votes
3answers
280 views

Draw 2 edge connect to 2 side of the (circle) shape (1 each)

I want to draw each to connect to side of the circle. The circle is quite small. Here is what I am doing \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{...
0
votes
1answer
192 views

The start of an edge when this start is a node

The description of the edge operation \path ... edge[<options>] <nodes> (<coordinate>) ... opens with the following explanation (p. 246, chapter 17 'Nodes and Edges' in the TikZ ...
3
votes
1answer
223 views

Is it possible to add names to edge quotes?

The following MWE works as expected: \documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{quotes} \begin{document} \begin{tikzpicture} \path (0,0) edge node[auto] (label) {label} (1,1); \...
9
votes
1answer
695 views

Tikzpicture: How to make an edge not cross a node in a graph?

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,% main node/.style={draw,circle,minimum size=20pt, inner sep =1pt},node distance=0.5cm] % the vertices \node[draw,circle,inner sep=3pt,...
3
votes
1answer
372 views

Center arrowhead in a path

How can I place the arrowhead in the center of an edge? \documentclass{article} \usepackage{tikz} \usetikzlibrary{automata,positioning} \usepackage{tkz-graph} \usetikzlibrary{decorations.markings} \...
2
votes
1answer
887 views

edge from parent[dashed] makes nodes themselves dashed?

I have a similar question, as asked here: How to set style of a single edge in the tree (TikZ) ? I have a tree, built with tikz. I want to style some single edges dashed, instead of solid. So i did ...
2
votes
1answer
146 views

Encode edge style parameters with variable argument count in \foreach list

In TikZ there is the \foreach construct which one can use to iterate over a list of items and draw them as desired. Is it possible to encode, say, edge style parameters in the list like so (which ...
5
votes
2answers
1k views

Set style on all nodes on top of edges in tikz

I have some edges with a node 'on top of it' defined as \path (source) edge node {some text} (target); But now it just prints some text directly on top of the node, which makes it difficult to read. ...
2
votes
2answers
658 views

Arrow not showing consistently in tikz \draw

I would like to have a figure, where every edge has an arrow. When I \draw edges with tikz, something strange happens: The "same" code yields different results. Code \begin{tikzpicture}[->,>=...
3
votes
1answer
365 views

Genealogytree sandclock marriage placement

I have tried to insert marriage dates on edges in a sandclock familytree, but the proband parents and grandparents dates are placed on the wrong side. \documentclass[12pt,danish]{article} \usepackage[...
3
votes
1answer
440 views

an edge connecting multiple nodes

I want to draw an edge that connects multiple nodes. I am able to achieve this using the ''to'' feature as shown in example below: \documentclass[convert={density=300,size=1080x800,outext=.png}]{ ...
1
vote
1answer
459 views

edge label spacing

I'm having difficulties with edge labels in a graph. The edges labels are overlapping in the nodes. I'd just like a little more separation between the edge and the label for avoid this. Here is a ...
3
votes
2answers
74 views

There are three polygons in the figure below. I need to label below the first polygon as “Layer 1” and below the second polygon as “Layer 2”

This is the code I used: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \newcommand{\LD}{\langle} \newcommand{\RD}{\rangle} \begin{document} \begin{tikzpicture} [scale=0.4] \...
0
votes
1answer
44 views

How to draw a figure which looks like this

The figure is basically three cycles on 'n' vertices which are adjacent to each other as shown in the figure
1
vote
2answers
377 views

Cartesian Product of two complete graphs on 6 vertices

This is what I was able to do based on the knowledge I have.I need edges between the nodes 3 and 3', 4 and 4'. etc. Also I need dashed edges between each and every node in the first hexagon. The ...
1
vote
1answer
161 views

Tikz graphs, how to get radial edges connecting the centers of my nodes

I'm trying to get graphs looking like the following example: But all I can get is this: The problem is that the edges don't connect the centers of the nodes. On the white node on the top I tried ...
1
vote
1answer
649 views

Tikz mix of undirected and directed edges

I want to have a graph with mixed of undirected and directed edges. I am using the following code. \begin{tikzpicture}[main_node/.style={shape = rectangle, ...
0
votes
1answer
369 views

Vertical space from the edge of the page

How make vertical space from the edge of the page or the top margin, eg. second paragraph lipsum \documentclass{article} \usepackage{lipsum} \begin{document} \lipsum[1] \vspace{100pt} %<-...
5
votes
2answers
2k views

Specify where and how edge connects to child (tikz)

I have the following tikz tree: I'd like to change where the edge meets the child to where I placed the red dotes. Also, I'd like to have bend edges. I've tried [bend left] but it didn't change ...
2
votes
1answer
613 views

Positioning nodes and calculate edges coordinate

I am trying to draw a flowchart with tikz, but I have 2 problems. The first one is about the positioning of (action5). I want that node to be left (action4) and below (test1). In my code, the node is ...
2
votes
1answer
839 views

tikz trees : how to modify some edges style

I want to draw a flowchart using tikz trees. I would like to change the style of some of my edges. I want the edges from W to GI2 and GI4 to be curved. I try to use child from parent path={... but ...
1
vote
2answers
4k views

Labelling Tikz Directed Edges

I am struggling to label my edges in my Tikz directed graph. I have tried using the tikz library quotes in my preamble by no success. I currently have the code \begin{tikzpicture} \tikzset{vertex/....
2
votes
1answer
259 views

How do I keep edges away from forest nodes?

\documentclass[convert={size=640}]{standalone} \usepackage{forest} \newcommand{\difference}{ \begin{tabular}{c|c|c|c|c} \hline 0&1&0&1&\ldots\\ \hline \end{tabular}} \newcommand{\...
2
votes
1answer
290 views

How can I bend an edge into a self-referencing circle?

I want to model the behaviour described by something like the following arrow using draw: \draw[->] (zero.north) .. controls +(left:7mm) and +(up:15mm) .. (zero.north); But since I need to ...
3
votes
1answer
547 views

Reproducing a directed graph with labeled edges

I am trying to implement the following graph : . I came up with a MWE, but I am unable to draw the curved edges. The code is shown below: \documentclass[11pt]{scrartcl} \...
0
votes
1answer
295 views

Longer edges with tikz package

is there a way to make an edge (E) like this with tikz package. I know I can bend them to some degree, but I would like to make them as big as I require. Thank you for any help.