{nodes} is about nodes in {diagrams}.

learn more… | top users | synonyms (1)

11
votes
3answers
2k views

positioning a child node between two parents

\begin{tikzpicture}[node distance=1.5cm] \node[state] (A) {A}; \node[state] (C) [right of=A] {C}; \node[state] (B) [below in the middle of=A and C] {B} \end{tikzpicture} Something like this: A ...
11
votes
2answers
175 views

How to define an environment that begins with a node?

Please see the following definition: \tikzstyle{boxStyle} = [draw=blue!80, fill=blue!9, very thick, rectangle, rounded corners=3mm, inner sep=10pt, inner ysep=15pt] ...
11
votes
2answers
4k 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 ...
11
votes
1answer
6k views

Increase the thickness of node border in TikZ

Suppose I have a node in the shape of a circle. How can I make its border thicker? \node[circle, draw=blue!80, inner sep=0pt, minimum size=12pt] (1) at (0,0) {1};
11
votes
3answers
643 views

pgfplots - Add offset to pins

I'm trying to make a bar plot for an optimization parameter in quantum physics. To be more informative, the graph should display the values of these parameters above the bars. So far I did ...
11
votes
2answers
4k 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 ...
11
votes
3answers
633 views

Anchors/coordinates inside a node's text

The plot Using tikz, I have a main node containing several (three) lines of text, and three "legend" nodes that point to them. If I use a rectangle node, then I can't access the positions of the ...
11
votes
2answers
1k views

How two connect any arbitrary nodes of tree in tikz

I need to be able to connect any arbitrary nodes in a tree to each other. I am using the tree package in tikz to create my tree. I cannot figure out though how to connect to nodes by let say a draw ...
11
votes
1answer
153 views

Given four nodes forming a quadrilateral, how do I find the node at the intersection of the diagonals [duplicate]

I'm trying to find and name a node at the intersection of the diagonals of a quadrilateral formed by four other nodes. However, I'm not drawing a path. All I can seem to find in the tikz manual are ...
11
votes
2answers
3k views

Tikz - How to connect nodes

\documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \begin{tikzpicture} \draw (0,2.5) node[minimum height=1cm,minimum width=3cm,draw] (A) {A}; \draw (5,0) ...
11
votes
1answer
383 views

Organigram in Latex. Vertical distance between nodes

I want to draw a organizational structure in form of an organigram. I found this solution and tried to adapt it. The code: \documentclass{article} \usepackage{tikz} ...
10
votes
3answers
2k views

Table with TikZ

I should create a table like the one here as example. I think that the best way to do a table like this one is generate some labels and use them to colorize the nodes in order to make it more ...
10
votes
2answers
3k views

How to position nodes around another node in TiKZ?

I'd like to position some nodes in TiKZ around a given node. I could do that manually, by setting each node position, but why not looking for an easier way that looks better? I thought about using a ...
10
votes
4answers
910 views

How create circle node in Tikz with T from lines inside? T made split node to 3 sectors

I woud like create 3 sector circle node. See the following figure sectors are bounded by lines
10
votes
3answers
2k views

Put a node behind another in a TikZ diagram

I want to place a node, that is kind of a note, behind another node. However, I need to put the reference node before the note, so I can place the note in a relative position to the reference node. ...
10
votes
2answers
2k views

Package PGF Math Error: Unknown operator `o' or `of'

I am getting a weird error while trying to place a node above another node using the below= syntax. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[] (node1) at ...
10
votes
3answers
1k views

Drawing a proper shadow for overlapping objects

I draw images that are composed of several overlapping nodes. If I add a drop shadow to each node, the shadow of the second node is drawn over the first node, as seen in the picture below (which ...
10
votes
3answers
407 views

parametric naming of nodes in Tikz

I would like to generate a graph with nodes and edges names by their coordinates in the graph, something like: \foreach \x in {0,1,...,6} \foreach \y in {1,...,4} \draw (1.5*\x,2.5*\y) circle ...
10
votes
2answers
347 views

Why are just-created TikZ shapes “unknown”?

I'm using TikZ's \foreach iterator to create a series of nodes and then draw edges between them. First I iterate to create the nodes; then I iterate through the nodes to link them to each other. ...
10
votes
2answers
909 views

Problem with custom width of nodes in TikZ

I'm in trouble with some nodes, I'd like to get your help. I'm trying to set the text width of a node, but when I declare this parameter, there is something wrong. Maybe there's something missing in ...
10
votes
3answers
655 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, ...
10
votes
2answers
125 views

If I have two nodes defined at the end points of a diagonal of a rectangle, how can I define nodes for the other two corners?

I have two nodes which I want to define to be opposite corners of a rectangle. I would like to be able to define nodes at the other pair of opposite corners. I tried the following, but it gives me ...
10
votes
1answer
3k views

How to introduce a line break in a TikZ node label?

I need to introduce line breaks into the label of a node. This is what I've tried so far, but none of it worked: 1: \node[node, label={[split parts = 4]alpha \nodepart{two} bravo \nodepart{three} ...
10
votes
3answers
5k views

How to draw a node as a filled circle (dot) to indicate a connection using TikZ and LaTeX?

I have some trouble drawing a control system block diagram using TikZ. I want a certain node to be shown as a dot, indicating a connection. However, the dot is not positioned at the center of the node ...
10
votes
1answer
1k views

macro for empty nodes in tikz-qtree

I'm trying to define a macro for writing empty nodes in a binary tree using tikz-qtree. Referring to the code below, I want the string \missing in my code to be replaced by \edge[draw=none]; {} as-is ...
10
votes
2answers
572 views

Hyperlinked nodes in TikZ mindmap

I am trying to make a small mindmap such that some of the child nodes are hyperlinked. I tried to follow the advice given here, about the new node style hyperlink node, but the following MWE compiles ...
10
votes
1answer
280 views

Can I calculate the difference between two relatively positioned nodes with TikZ using calc?

I have a chart with relatively positioned nodes. How do I calculate the horizontal distance x, between node "sub3" and node "key" and multiply that value by 2 and use it for the positioning of node ...
10
votes
1answer
3k views

How to rotate a node and text independently in Tikz

How can I rotate the text inside a node independent of the node in tikz? Right now I am using the rotatebox. The other option I tried was to have two overlapping nodes. Is there a better way to do ...
10
votes
1answer
5k views

tikz nodes: centering with small font

I am trying to create tikz nodes with centered text, but changing fontsize. Unfortunately, while normally-sized text is nicely centered inside the nodes, the smaller text is not centered, but shifted ...
10
votes
1answer
1k views

TikZ: connecting nodeparts

I'm new to TikZ. Last couple of hours in fact. I was wondering if there was a way of connecting nodeparts from different nodes. Here's an example \documentclass{article} \usepackage{tikz} ...
10
votes
1answer
2k views

pgfplots - Placing Nodes on x Coordinates of a Plot

I want to plot some graphs in pgfplots and want to place nodes on the exact same x coordinate of the plot. The position of the note has to be set in x direction but free in y direction. Here is one ...
10
votes
1answer
484 views

TikZ path labels and --cycle

\draw (0,0) -- node{a} (2,0) -- node{b} (2,1) -- node{c} (0,1) -- cycle; I can't find a simple way to make a label on the last edge. What I want is something like \draw (0,0) -- node{a} (2,0) ...
9
votes
3answers
4k views

TikZ: Using Loop to Draw Grid of Nodes

I am trying to draw an Ising model (in my case, a grid of nodes with an undirected edge between adjacent nodes on the same row or column) using TikZ. I have the grid of nodes working nicely using a ...
9
votes
3answers
180 views

Sloped Tikz node with rotation and scale

There should be an easy way to place a sloped node along a path. Using sloped works great (as in the black text). However, if there is a rotate= applied then the text is no longer along the path (as ...
9
votes
4answers
295 views

Highlighting equation with arrow

I want to create an equation with highlighting as shown bellow. But using following code: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} ...
9
votes
2answers
282 views

Rounded corners as a tangent in the right direction

I want to split a path into two branches as in the following MWE. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node (A) [rectangle] ...
9
votes
2answers
2k views

How to nest a graph within a node in TikZ and draw edges between the graphs?

I'm trying to draw a graph and have a separate graph within one of the outer nodes. I seen this question, but I don't understand how the matrix nodes will help me. I would also like to draw edges ...
9
votes
1answer
5k views

TikZ: text along path as node

I'm using the decorations library to put bended text along a path. That works fine. However, I'd like to have the bended text as a node, so that I can later use it as a reference (for instance to draw ...
9
votes
2answers
2k views

Increase the bending distance of a ``to`` path in TikZ

I have problem with an small graph. The path between the node J and B should to the right of node I. Is there a way to do this? \documentclass[11pt]{article} \pagestyle{empty} \usepackage{tikz} ...
9
votes
2answers
558 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}) -- ...
9
votes
1answer
310 views

Connecting nodes with brace in TikZ

How would be possible to put a brace instead of a "line" connecting nodes and add some text above it with TikZ?
9
votes
1answer
1k views

Difference between \newcommand and \pgfmathsetmacro used in TikZ \coordinate

Consider the following code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \newcommand{\MA}{4} \pgfmathsetmacro{\MB}{4}; \coordinate (V11) at (0,0); ...
9
votes
2answers
713 views

Calculating a common height for nodes with different amounts of text in Tikz

When using labelled nodes (e.g. for a flow chart), their sizes are automatically chosen. One can enforce the same size, which must be known a priori, for multiple nodes by using "large enough" values ...
9
votes
1answer
4k views

Change node distance for particular nodes

How do you change the node distance to the left for a \node[state] (q4) [below left of=q3] {$homing$}; Ok, it's a little bit on the left, but I want it to move it more to the left. How ...
9
votes
1answer
203 views

Perfect overlapping of dotted nodes in matrices

If you have a TikZ matrix of nodes, where every node is dotted, the dots do not overlap properly. Please see the attached code: \documentclass[margin=1cm]{standalone} \usepackage{tikz} ...
9
votes
1answer
164 views

Checking whether or not a node has been previously defined

I use the following code to draw a line to connect two nodes in my graphic: \draw ( p-\prow-\col) -- (p-\row-\col); At the edge of the figure, however, not every node will have a predecessor from ...
9
votes
2answers
1k views

Node positioning relative to 2 other nodes

I'm wanting to align/position a node relative to 2 others. Basically I'd like everything to be in rows and columns (whose is determined by the largest member). In this specific instance, I'd like node ...
9
votes
1answer
1k views

TikZ: Omit {} after \node declaration for unlabelled node?

This may seem a bit trivial, but I am writing TikZ code with an enormous number of unlabelled nodes. It frustrates me that I have to type {} at the end of every node declaration. Is there some ...
9
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} ...
9
votes
1answer
326 views

TikZ - flowchart nodes alignment

I'm trying to code a flowchart and I'm almost there, but I can't get the nodes properly aligned. Lets say my flowchart has 3 columns: the nodes of the first are ok, but I need the nodes from 2nd and ...