{nodes} is about nodes in {diagrams}.

learn more… | top users | synonyms (1)

3
votes
2answers
1k views

How to make two rectangles top adjusted horizontally in TiKZ?

I have 2 rectangles and an operator between them, the one on the right is longer than the one on the left: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} ...
7
votes
3answers
12k views

TikZ: position with different anchors

I would like to label lines at the same midway horizontal position (pos=0.5). But as the second line is tilted, the labels lower left corner should touch the line. Hence, I would need to manually ...
4
votes
2answers
820 views

TikZ: arrange trees block by block

I use TikZ to create trees. Now I've to arrange four trees in a matrix like this: Tree A Tree B Tree C Tree D I already tried the \matrix command. This works, but it leaves absolutely no space ...
11
votes
3answers
713 views

How to rotate hyperlink with text

How can I rotate the link of a text in a node. Here is my MWE: \documentclass{article} \usepackage{tikz} \usepackage{hyperref} \begin{document} \begin{tikzpicture} \node (rect) [rectangle, ...
6
votes
1answer
3k views

Forcing TikZ minimum size for nodes

I have a tree structure consisting of many unlabelled nodes. However, for some reason the nodes are far larger than I would like and appear to have a minimum size below which the minimum size key is ...
6
votes
1answer
670 views

How to generate named nodes from the counter used in `foreach` in TikZ?

I'm trying to generate multiple nodes in TikZ using the foreach operator, but whatever I try I get compilation errors. I need all nodes to be named in order to draw edges between them. Having read ...
6
votes
3answers
3k views

Why doesn't relative coordinates in TikZ work with this example?

I was working on a figure, and for some reason relative coordinates have stopped working (it did before). I removed all code down to a bare minimum, and they still don't work. I don't know what I've ...
2
votes
1answer
2k views

Aligning nodes with TikZ

Consider this: There are several problems: The \exists operator is not horizontaly aligned with the following node (a,b). There is too little space between foobar and the node below it and ...
2
votes
1answer
358 views

How does one use \node[inner node]{}?

I'm trying to reproduce a TikZ tree from a Till Tantau presentation (see pg.33 of this .pdf) My code is as follows: \documentclass{article} \usepackage[latin1]{inputenc} ...
7
votes
2answers
1k views

Position a node a certain distance away from another node at a certain angle in TikZ?

Like the title says, is it possible to position a node a certain distance away from another node at a certain angle from that node?
9
votes
2answers
647 views

Is it possible to use a macro to name a TikZ node?

Is it possible to use a macro to name and reference TikZ nodes. For example: \begin{tikzpicture} \node (0) at (0,0) {X}; \node (\mymacro{2}{3}) at (1,2) {Y}; \draw (\mymacro{2}{3}) -- ...
6
votes
1answer
361 views

Drawing full nodes whose center is not clipped by some path

Goal I would like to draw full nodes whose center is not clipped by some path. How the solution would possibly work? To be better understood I would describe it in two steps: clip before drawing ...
4
votes
1answer
4k views

Change line spacing inside a node in TikZ

Inside a TikZ node, one can force line breaks using \\ providing the align option of the node is set. I would like to increase the line spacing inside a node. This can be done in the usual way with ...
10
votes
1answer
2k views

TikZ edges to/from center of nodes

Normally a edge drawn between two nodes starts and stops and the boundary of the nodes. How can one draw an edge to the center of a node? \documentclass[12pt]{article} \usepackage{tikz} ...
8
votes
2answers
453 views

TikZ/PGF: Create a saved length as part of a shape definition

When I create a new shape using pgfdeclareshape, I want to be able to store a length for later reference. I might want to do simple arithmetic on this length later on. Here's a basic attempt: ...
1
vote
0answers
413 views

Question regarding add node with text within TkiZ package? [closed]

I followed an example from TikZ manual, and modify mine to add an extra node with text below a given node. This is the example from TiKZ manual, And here is the code, So I modified my code to fit ...
3
votes
3answers
10k views

TikZ: How to connect nodes and specify line direction?

When drawing a line between two nodes in TikZ, you can specify the anchors on the beginning and end nodes in order to control how the line is drawn. I would like to specify the anchor on the ...
4
votes
1answer
2k views

TikZ: Background rectangles with equal width but 'fitting' height

I'm trying to make sort of a flow chart for a series of steps, but these steps are also grouped, and I'd like my diagram to reflect that. So I'm using the pgfonlayer/background environment to draw ...
3
votes
2answers
2k views

TikZ: position a node depending on width of text?

I need to use TikZ to draw two horizontally-spaced nodes, and an arrow between them, labelled by some text. But the arrow has to be exactly the right length to fit the text, and this will be part of a ...
3
votes
1answer
549 views

Placing a list of nodes in TikZ

I would like to define a macro, which would take a list of node definitions, like this \mymacro[boxes={{\node[rectangle] {foo};}, {\node[rectangle] {bar};}, ...
4
votes
1answer
2k views

Vertically center a node with the current line in TikZ

Consider the following: \documentclass{article} \usepackage{tikz} \begin{document} This is a \begin{tikzpicture} \node[draw, rectangle, align=left] {% And here \\[.3em] is ...
12
votes
3answers
3k views

Horizontal row separation line in tikz matrix (like \hline in tabular)

In this question tikz-matrix-as-a-replacement-for-tabular a nice solution was given to let the matrix in tikz behave like tabular. In this solution cell/.style={rectangle} was used to draw lines ...
1
vote
1answer
1k views

Split node padding when using `align` in TikZ

Consider the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,positioning,fit} \begin{document} \begin{tikzpicture} \node[draw, rectangle split, rectangle split ...
2
votes
0answers
130 views

Is there an easy way to make bifurcating/converging edges in TikZ? [duplicate]

Possible Duplicate: Using relative coordinates in TikZ to draw joined curves The problem This problem is thematically related to this question, in fact, I was going to ask roughly the same ...
2
votes
3answers
1k views

pgf macro that returns a node

How can I write a macro that returns a coordinate (or a node). The node must be usable within a tikzpicture environment and preferably inside a path declaration. I need something like the following ...
3
votes
1answer
2k views

Example of system architecture picture in TikZ

I am looking for an example of a system architecture diagram in TikZ. I would like to draw a picture similar to this one: Therefore I search for existing shapes for: cloud (Current State), database ...
4
votes
2answers
2k views

How to prevent a TikZ arrow from touching a node?

I am using TikZ to draw some trees in my thesis. This is a sample of what is being done: \documentclass{article} \usepackage{tikz-qtree} \newcommand{\Ta}{ \begin{tikzpicture}[level distance=30pt, ...
3
votes
1answer
2k views

What's wrong with the fading of this TikZ node's shadow?

I'm trying to add a shadow with a faded edge to nodes. With the following document I only get a grey circle, with a hard edge, slightly below right of the node. This is a snippet form my code. What ...
2
votes
1answer
759 views

using foreach to draw a chain with a branch

This is an extension to How to draw the border of a node using late options I'm drawing a chain of nodes with different colors using foreach from tikz. Now I want to add a branch, also using foreach. ...
8
votes
2answers
161 views

Are there any differences between a “newly defined” path and a path using predefined nodes?

I am not sure how I should phrase my question. consider the following example \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[inner sep=0] at (0,0) (a) {}; ...
7
votes
2answers
2k views

How to draw the border of a node using late options

I want to create a series of rectangles, each with a different shade. The shade varies from white to black. I want to make the white (first) rectangle visible by drawing its border. My first step is ...
20
votes
1answer
5k views

Draw edges and paths in the background of nodes in TikZ

Is it possible to draw edges or paths in the background of nodes independently of whether they are constructed before or after the nodes are defined? In the following example, the \draw instruction ...
4
votes
1answer
297 views

How can I pass the body of a TikZ node to a font-changing macro?

After looking around at some other answers on this site, I'm trying to typeset a tree using the tikz-qtree package. It works great, but by design it does not let you use macros in the tree nodes, ...
3
votes
2answers
1k views

Aligning multiple TikZ trees with other nodes

This question is directly related to Aligning TikZ trees with other nodes that I asked some time ago. By the time I asked the question I didn't realize that aligning multiple trees was not the same as ...
6
votes
2answers
1k views

TikZ: Track the bounding rectangle of created nodes (Storing values?)

In the main part of the tikzpicture I'd like to simply create blocks. So I need somewhere in theirs' style definition to perform tracking of their common bounding rectangle. I've tried to access ...
7
votes
2answers
942 views

Aligning TikZ trees with other nodes

I would like to align a TikZ tree with another node by considering the tree as a whole like as if it was a node with anchors. For the moment I am only able to align the root node of the tree, not the ...
5
votes
1answer
451 views

TikZ. Access node's name within a .code handler.

I'd like to place variable number of additional nodes on the border of the rectangle. I suggest it to look in a somewhat following way: \node[name=R, my rectangle=top:3 bottom:1 left:2 right:1] {Node ...
17
votes
3answers
5k views

How can I align two nodes to the left in TikZ?

I have two unaligned nodes |AAAAAAA| |B| and I want to have the node with the B aligned to the left of the node with AAAs and below it |AAAAAAA| |B| How can this be done?
3
votes
1answer
286 views

Place nodes on an A4 document similar to drawing on a graph sheet

As my figure keeps crossing the margins I end up rescaling it at the end using \begin{tikzpicture}[scale=5/10,transform shape]. This works most of the time but it seems to me like its a hackish way of ...
4
votes
3answers
2k views

How to get TikZ nodes not to change alignment?

I'm still working on rendering a nice block matrix. I've been using BMAT but it is irrelevant for the question at hand. I want to connect various entries in an array/matrix/BMAT by lines, and I'm ...
4
votes
1answer
1k views

TikZ: Creating stack with variable width

I am new to TikZ and want to draw a simple stack Diagram. The Diagram should look like: [a] [b] [c] [d] |-| |j| [f ] | | | | [g ] | | ...
8
votes
1answer
2k views

Drawing paths/nodes along a path in Tikz

I would like to draw a collection of nodes / paths. However, I'm too lazy to position them manually, I would like to specify their position along a given path. How can I do that? Here a picture of ...
5
votes
1answer
2k views

Label sides of rectangles and triangles

What is the easiest way to label the sides of rectangles and triangles in TikZ?
15
votes
1answer
3k views

Declare nodes in pgfplots as overlays

The Background In pgfplots, it is possible to make plot elements such as axis labels, ticks and legends overlay, which means they will not be considered when determining the bounding box of the plot. ...
7
votes
1answer
1k views

place a new TikZ node behind others

I would like to have a new TikZ node appear behind the previous one. For instance in beamer presentations for highlighting parts of code. I can do this if I place the \node before the new node and ...
4
votes
2answers
1k views

Add label to flowchart nodes

I need to add a "label" to nodes in a flowchart with tikz, preferably in the top left corner. See picture: the text in red is where I need it. This is because each block should have a "label" so I ...
11
votes
2answers
5k views

Cylinder shading with PGF/TikZ

I'm trying to create a cylinder with 3D shading effects. The cylinders in the picture are standing vertically, and have a body and an end. I'd like the body to be shaded so that it varies uniformly ...
5
votes
1answer
2k views

How to draw lines between nodes that point at the node center, but stop at the nodes edge

I'm drawing nodes on a circle and switched from drawing lines based on coordinates to drawing them based on named nodes. The problem now is, that with the following code the lines stop at the edges ...
3
votes
2answers
2k views

How to create a Node below a node

\documentclass{minimal} \usepackage[a4paper,margin=1cm,landscape]{geometry} \usepackage{tikz} \usetikzlibrary{positioning,shapes,shadows,arrows} \begin{document} \tikzstyle{abstract}=[rectangle, ...
6
votes
2answers
3k views

Putting a tabular in a node within a matrix

I have a picture in which each of the nodes looks something like this: \node (species1) [shape=rectangle,draw] { \begin{tabular}{c c c} \multicolumn{3}{c}{{Species 1}} \\ \colorbox{red}{G1a} ...