Questions tagged [tikz-node]
{tikz-node} is about nodes in {diagrams} created using TikZ. A node typically consists of a shape which may or may not have a border and a filling, as well as some (text) content but it may also be empty. It can be connected with other nodes or parts of the diagram via edges.
540 questions
3
votes
4
answers
214
views
How to get a structure of this nodes tower with proper coordinates?
What I want to achieve is something as below(sorry for drawing in a hurry):
The only requirements is vertical alignment(shown as the red dashed lines), the spacing of each nodes could be design, ...
2
votes
1
answer
60
views
How to color the circle line of Tikz nodes with radial gradient using the node definition \node[...] with the built-in option "color"?
This is my code:
\documentclass[margin=1mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[C/.style = {circle, draw, inner sep=5pt, node contents={}}]
\node[shading = ...
2
votes
1
answer
107
views
Tikz - Is it possible to adjust the distance between Tikz nodes so that it changes dynamically with fixed length depending on the text content?
I adapted cfr's solution from my previous question for the adjustment of dimensions from Tikz nodes and changed the text content of some nodes:
\documentclass{standalone}
\usepackage{tikz}
\...
2
votes
1
answer
77
views
Tikz - How to adjust the dimension of Tikz nodes and nested nodes so that each node is scaled perfectly regardless of the text content?
This is my code:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes, positioning, arrows.meta, fit, calc}
\usepackage{standalone}
\begin{document}
\begin{tikzpicture}[every ...
2
votes
3
answers
166
views
Tikz - How to draw/create a branching structure using Tikz nodes and Tikz paths with directed edges?
This is my code:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes, positioning, arrows.meta, fit}
\usepackage{standalone}
\begin{document}
\begin{tikzpicture}[every node/....
1
vote
1
answer
89
views
TikZ: How to find the TeX vertical distance between two nodes?
So, we can use tcolorbox's remember as key to remember the frame node of any tcolorbox, which we can subsequently use:
\documentclass[a4paper, 11pt]{book}
\usepackage[skins, breakable]{tcolorbox}
\...
2
votes
1
answer
98
views
Tikz & Boxes/Frames - How can I draw boxes/frames around word(s) inside Tikz nodes without defining new nodes?
This is my code:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes, positioning, arrows.meta, fit}
\usepackage{standalone}
\begin{document}
\begin{tikzpicture}[every node/.style={...
2
votes
2
answers
116
views
TCBListing overlay: testing whether segmentation nodes have been defined
We can define a command
\long\def\ifnodedefinednTF#1#2#3{%
\@ifundefined{pgf@sh@ns@#1}{#3}{#2}%
}
to check whether a TikZ node is defined, and execute code accordingly.
This MWE works as intended:...
3
votes
5
answers
214
views
shift option doesn't work with tikz-matrix's nodes?
I have the following code:
\documentclass[tikz,border=4pt]{standalone}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix (P) [
matrix of nodes,
nodes={circle,draw},
...
5
votes
1
answer
136
views
How to create flat-octagon nodes for \tcolorbox?
This message serves as a continuation of my previous two questions — № 1 & № 2.
In the latter, the suggested solution was to create nodes that could be anchored directly to the box itself.
I would ...
5
votes
3
answers
404
views
Tikz - How to draw multiple arrows between nodes and position them perfectly without the usage of angles?
This is my code:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, positioning, fit, arrows.meta, quotes}
\begin{document}
\begin{tikzpicture}[every node/.style={draw,...
0
votes
1
answer
80
views
Tikz - How can I set a title for each nested rectangle and place it in the center above the middle position of a rectangle?
This is my code:
\documentclass{standalone}
\usepackage{amssymb, amsfonts, dsfont}
\usepackage{tcolorbox}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, positioning, fit, arrows.meta, quotes}
\...
1
vote
1
answer
84
views
Tikz - Is there a much better and faster way to adjust the distance between rectangles instead of hard-coding them manually?
This is my code:
\documentclass{standalone}
\usepackage{amssymb, amsfonts, dsfont}
\usepackage{tcolorbox}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, positioning, fit, arrows.meta, quotes}
\...
0
votes
1
answer
71
views
Tikz - How can I insert curved arrows later in a complex workflow diagram without changing the distance between rectangles?
This is my code:
\documentclass{standalone}
\usepackage{amssymb, amsfonts, dsfont}
\usepackage{tcolorbox}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, positioning, fit, arrows.meta, quotes}
\...
1
vote
1
answer
92
views
Tikz: How to group multiple nodes to one node functionally for better control in terms of positioning and scaling sizes?
This is my code:
\documentclass{standalone}
\usepackage{amssymb, amsfonts, dsfont}
\usepackage{tikz}
\usetikzlibrary{positioning, shapes, arrows.meta, fit}
\begin{document}
\begin{tikzpicture}[...
0
votes
1
answer
78
views
Tikz: How to better control nested nodes in terms of their distance, shape size and position?
This is my code so far:
\documentclass{standalone}
\usepackage{amssymb, amsfonts, dsfont}
\usepackage{tikz}
\usetikzlibrary{positioning, shapes, arrows.meta, fit}
\pgfdeclarelayer{background}
\...
2
votes
2
answers
126
views
Tikz: How to draw vertical lines in the middle of circle nodes and how to control the lengths of lines simultaneously in a general way?
This is my code so far:
\documentclass{standalone}
\usepackage{graphicx}
\usepackage{amssymb, amsfonts, dsfont}
\usepackage{tikz}
\usetikzlibrary{positioning, shapes, arrows.meta}
\begin{document}
...
3
votes
2
answers
116
views
Tikz double angled arrow with rounded corners too wide
TL;DR: How do I remove the ugly little thing under the red arrow?
I would like to link an input to n outputs and have rounded S/Z arrows link them. However when the y coordinate of the output is to ...
4
votes
0
answers
100
views
Scale, transform shape, and the anchor border
When a node is scaled with transform shape and scale, the anchor border no longer lines up with the background path. At first I thought this was a bug in my own code, but I now realize that "...
4
votes
1
answer
126
views
Adding inner sep to nodes with tikzmark
I have a tikz picture and some tikzmark nodes that are connected by lines. I want the lines not to touch the node content. Like this:
But the code below produces this:
I tried various things, which ...
3
votes
1
answer
134
views
Tikz: shaping the arrow pointing to another arrow
I have a MWE, but I'm not satisfied with the shape of the two arrows originating from C.
I've looked through these examples (tikz-cd drawing arrow to another arrow, Arrow pointing at the middle of ...
2
votes
1
answer
100
views
Tikz: arrow pointing to another arrow with text
My MWE has two arrows each pointing to a different arrow. I've found two ways of doing this, but I don't understand the difference. The arrow pointing towards some words actually points towards the ...
1
vote
0
answers
56
views
Strict page definitions
I recently posted the question:
Adjusting formatting on second page only
I've actually been able to figure it out to the point of the below code:
\documentclass[11pt]{article}
\usepackage[utf8]{...
0
votes
2
answers
85
views
connect the extreme points in an arc of a circle
I need to connect the extreme points in an arc of a circle. The "node" notation doesn't work right. There is a small gap between the arc and line
\begin{figure}[hbt]
\begin{tikzpicture}
\...
2
votes
2
answers
357
views
Building a diagram of a deep learning architecture with tikz
I have been facing issues to fit some nodes like perceiver to encapsulate local group nodes and botthleneck node. I have the same problem with the recurrent node which I would like to be the ...
2
votes
1
answer
196
views
Dynamic Text Width in TikZ Nodes
One of my publishing products involves creating a fairly large number (21,000) of diagrams, consisting of about 14,000 unique nodes. This is all machine-generated, drawing dependency graphs of game ...
0
votes
2
answers
102
views
Positioning the Minipage in a Node
I have a Minipage in a node because this is a template and will have a variable number of lines which lists characteristics of the image that the arrow is pointing to. The image is not shown since ...
0
votes
1
answer
67
views
Fixed width of cells in a table inside a tikzpicture
Im trying to have a table inside a node, I can insert a table inside the tikzpice, but I can not define a width of each cell.
So what i want, is something similar to this, so each cell has the same ...
3
votes
2
answers
175
views
Using sqrt(n) both in tikz coordinate and node label
I have the following piece of code and I would like to use the same variables for coordinates and labels, but the thing is that this variables contain values like sqrt(n) and as labels they apear just ...
8
votes
2
answers
285
views
Using pgfmathresult within a node
I'm trying to color the vertices (circles) of the grid one of three colors. I've figured out how to color the label, but not the circle itself. I would like something like
\node[circle, fill=\...
0
votes
1
answer
113
views
Adjusting the y-intercept of a line segment from an empty node
I'm trying to draw two lines from an empty node, but the point where the lines meet at the node is slightly below the line segment from the parent node to the empty node. In the picture below, there ...
2
votes
1
answer
68
views
How to break line to write text on top? (in TiKz)
Consider following example: I have a colourful background, and a line that goes across. I want to label the line with text that is right on top, but I want the line to disappear when it passes the ...
3
votes
1
answer
144
views
tikz: scaling nodes using scope versus scaling them using options. I.e., \node[scale=<>] versus \scoped[scale=<>]\node is different
Why does using scale on a node using the scope environment cause its coordinate to scale, but when I use scale on a node using its options, only the contents are scaled?
In the following code, the ...
3
votes
1
answer
90
views
Setting node font size from within
In the following example, I would like to set the font size of a node from "inside" the node's contents, i.e. without changing the node's font attribute:
\documentclass{standalone}
\...
1
vote
0
answers
70
views
How to inserting drawing commands between a node's path and its text
This is inspired by How to mark nodes in tikzpicture node using tikzmarknode. Stripping away the positioning stuff, a neat solution would involve inserting a drawing command between a node's ...
0
votes
1
answer
77
views
How to position pgfplots axis relative to another axis using node's notation
In pgfplots, I want to place the x^2 below the cos(x), as in the figure below.
I am trying to replicate the example from the manual, §4.19.3, but for some reason it seems that the syntax for node's ...
0
votes
0
answers
56
views
Automate highlighting each node one at a time using argument
I have an outline slide in a beamer I want to highlight each box in, one by one. I am currently moving the fill=blue!20 argument around between nodes every time I start a new section but would prefer ...
4
votes
2
answers
225
views
TikZ: Placing a Node Relative to Specific Points on a Curve
I have drawn a simple curve in the MWE below. How can I place a node relative to a specific point on this curve, such as 2cm southwest of the "near start" point?
\documentclass{article}
\...
5
votes
2
answers
231
views
CircuiTikZ distance between ground symbol and the assosciated label
For the life of it I can't get any space in front of the label name "ground". Now it is stuck to the wire connected to the ground symbol.
I have tried [sground, label distance=1 cm], but ...
1
vote
2
answers
183
views
How to vertically stack a node above another fitted node?
I have made a fitted node around Node1, and I'd like to add another node directly on top of fittedNode with the same width as the fittedNode.
This is what I have so far:
\documentclass{article}
\...
7
votes
3
answers
339
views
How to align the math symbol with regular text in tikz figure in a rectangular node?
I want to draw the figure whose code is produced below in TiKz. As you can see, the eta symbol is not properly aligned with the text "ADD." Please help me to align the text correctly. Also, ...
5
votes
4
answers
464
views
Ugly node connecting in nested nodes
I drew the below picture to illustrate the backtracking tree on the k-queen problem with k = 4.
It's a bit ugly... and I don't know how to solve the problem : the connecting lines from the child ...
2
votes
1
answer
172
views
Package tikz: Giving up on this path. Did you forget a semicolon?
I'm implementing a Red Black Tree in LaTeX using tikz, and have been stuck on the error message Package tikz: Giving up on this path. Did you forget a semicolon?.
Here's my code thus far
\...
2
votes
1
answer
77
views
Reset text depth (or text height)
Here Align line with caption in Tikz pgfplot legend the legend alignment are wrong because of an entry that goes below the preset text depth=0.15em - see "default every axis legend style" on ...
3
votes
1
answer
113
views
How to change the background opacity without making the characters transparent?
I want to change the background opacity of a node without making the characters more transparent.
\documentclass[border=0cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\...
1
vote
1
answer
118
views
Pgfplots: set plot node style
When using pgfplots, is there a way to set the style for every node on a plot for a particular axis? I'm currently setting the style for each plot, but I've been unable to do the same for each node ...
0
votes
1
answer
68
views
Connect a triangular child node with its north corner
I'm drawing part of a tree, and I want child sub-tree to be drawn as a large triangle.
Here's a MWE
\documentclass{standalone}
\usepackage{tikz}
\usepackage{calc}
\usetikzlibrary{trees}
\...
0
votes
1
answer
73
views
How to align image size with node size
I want to display a colored box below an image in a tikzpicture within a beamer presentation. But I am failing to align the sizes correctly, possibly due to the node border.
But adjusting the border ...
3
votes
3
answers
221
views
Referencing an other tikzpicture without overlay
In an effort to understand @Qrrbrbirlbel answer here: https://tex.stackexchange.com/a/725849/8650
I made this code:
\documentclass{article}
\usepackage{tikz}
\begin{document}
~\\
A text line\\
%
\...
2
votes
1
answer
110
views
Tikz figure arrowstyle for Schematic energy band representation of a semiconductor
I'm trying to replicate the arrow style from one TikZ figure in another. Specifically, I want to change the arrows in the first image to match those in the second image.
\begin{figure}[H]
\centering
\...