{nodes} is about nodes in {diagrams}.

learn more… | top users | synonyms (1)

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
447 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
412 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
9k 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
545 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
751 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
160 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 ...
19
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
925 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
444 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
285 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} ...
6
votes
1answer
1k views

tikz parabola node position

I am trying to position nodes on a parabola curve. However, it seems tikz cannot calculate the midway positions. Neither of the following examples works: \begin{tikzpicture} \draw (-1,0) ...
3
votes
1answer
721 views

Parts (node) with the same height Tikz

How do I keep the two parties with the same height of 53mm? \documentclass[a4paper,10pt]{book} \usepackage{tikz} \usetikzlibrary{positioning,shapes} \begin{document} %Tikz styles ...
5
votes
1answer
1k views

How can I create a rectangle that is split vertically in tikz?

In tikz, a rectangle split node is split horizontally. According to a comment by Mark Wibrow on 2008-04-21, it is possible to create rectangle nodes that are split vertically. However, I can't find ...
8
votes
2answers
8k views

How to turn off drawing node border in PGF?

I'm trying to create a picture for Instant Insanity problem. Here is my following code: \begin{tikzpicture} \matrix[nodes=draw] { ; & \node{\LARGE R}; & ; & ;\\ \node{\LARGE R}; & ...
4
votes
1answer
2k views

TikZ: How to rotate a matrix (of nodes)?

Please consider the following TikZ code: % aligning text in node: node[align=left] only in latest 2010 tikz: % http://compgroups.net/comp.text.tex/-tikz-option-for-ragged-left-text-in-node % or use ...
24
votes
2answers
2k views

Defining a new environment whose contents go in a TikZ node

I would like to define an environment which typesets the contents in a box, and I'd like to use TikZ (I'm aware of alternatives like fancybox). So I would like something like \newenvironment{abox}% ...
6
votes
3answers
3k views

How to create custom Tikz nodes?

I don't want to change style only. I want to create node that takes 3 numbers and display them with appropriate decorations. For instance: \mynode{5,6,7} Should display node with "a=5", "b=6" and ...
11
votes
2answers
5k views

Path From and To Same Node in tikz Flowchart

I'm working on creating flowcharts directly inside LaTeX documents using tikz. I am admittedly an extreme novice with tikz, although I have quite a bit of experience using LaTeX. My problem is when ...