{nodes} is about nodes in {diagrams}.

learn more… | top users | synonyms (1)

12
votes
1answer
4k views

TikZ Styles that set Nodepart Styles

In the following, I'm using user-defined macros to set the type style for the nodeparts for class nodes (\texttt{\textbf{#1}}), interfaces (\texttt{\textit{#1}}). Using the \tikzset command I also ...
12
votes
1answer
462 views

Nested node class with pictogram decoration

I'm wondering how can I define custom TikZ node class mynode thats allows my to use following syntax: \node [mynode,fill=yellow!40] {component} \child{ \node [mynode,fill=yellow!40] ...
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
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. ...
11
votes
2answers
179 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
3answers
697 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
687 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
167 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
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} ...
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
447 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} ...
11
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
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
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
4answers
932 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
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
424 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
369 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
1k 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
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 ...
10
votes
3answers
661 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
129 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
6k 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 ...
10
votes
3answers
6k 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
593 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
294 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
530 views

Label automatically positioned so that it doesn't overlap anything

I produce automatically generated LaTeX-files with nodes and links. Is it possible to put the label of the node outside of the node and it is automatically positioned somewhere, such that there is no ...
10
votes
1answer
309 views

Create custom node to draw this

I'm very very new to tikz, I've already done this: With this code: \documentclass{article} \usepackage[spanish,es-noquoting]{babel} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} ...
10
votes
1answer
373 views

TikZ- best practice for line starting on a circle's edge?

I'd like to know how I can achieve the best seamless crossover between a node (in this case, a circle) and a line starting on that node. I would like the line to only touch the circle's edge. So far I ...
10
votes
1answer
520 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
207 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
319 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
1answer
1k views

Cloud with lines as filling in TikZ

I am trying to draw specific portions of a Petri Net with TikZ. For parts of the subnet where the structure does not matter to me I'd like to use a cloud node filled with parallel lines (inspired by ...
9
votes
2answers
284 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

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
3answers
207 views

How can I move a single node in a tikz plot?

I can't find an answer online, please help me. The following plot shows the percentage of 3 groups. The red line is the average (and needs to stay at 13.8). How can I move ONLY the node "2.9" a ...
9
votes
3answers
1k views

How to align text in TikZ nodes by baseline?

I need to draw a graph where some nodes have the same y-coordinate. I want the text within the nodes on the same y-coordinate to be baseline-aligned. However, the text seems to be aligned by the ...
9
votes
2answers
575 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
325 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
2k 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
768 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 ...