Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tikz-node]

The tag has no usage guidance.

2
votes
1answer
21 views

How to vertically center nodes' text for nodes positioned via above

I have 2 nodes of different height. They are positioned relative to the nodes below them, b1 and b2, which are the same height and have the same y value. I want b1, b2 to have the same horizontal ...
3
votes
3answers
82 views

How to line up adjacent nodes in tikz that share a border

Here is how I'm drawing it currently: \documentclass{article} \usepackage{tikz} \usepackage[paperwidth=15cm]{geometry} \begin{document} \noindent \begin{tikzpicture} \node[draw,rectangle,text width=...
4
votes
2answers
165 views

Having arrows entering and leaving at different points on a single node

I wish to essentially remake the below image using TikZ, but with more colors and using a different language inside the boxes. I've tried the following: \documentclass[tikz]{standalone} \...
9
votes
3answers
214 views

How to fill a split node with two different colors?

I have that issue when try to fill a split node with two different colors. After using rectangle split part fill={red,blue} as an node argument the drop shadow overlap the node because I don't use the ...
6
votes
1answer
59 views

How to add title at custom position in Latex pgfplot?

I tried to add title at custom position of a pgfplot from a CSV (https://drive.google.com/file/d/1xnF8rG9J50ZIxl9K04k6nksvjWoWrfHe/view?usp=sharing) file, but nothing came out. I tried several ways, ...
7
votes
5answers
305 views

TikZ: Alligning two Tikz pictures and align parentheses to nodes

I tried to draw two graphs with Tikz. How can I align them vertically to each other? I want the knots to form the center, such that all six nodes align vertically. Furthermore I want to align the ...
5
votes
2answers
100 views

How to add a white background to an angle label in Tikz?

I'm drawing a diagram for a project, but with the n vector going through the angle label it isn't very clear, I'd like to add a white background to the alpha label so it's easier to see. Thanks, see ...
1
vote
1answer
25 views

Position matrix horizontally in the center

I would like to position tree in the north-center of the page, but for some reason advancing x coordinate of the node-0 doesn't change anything. Using relative positioning to draw the node-0 in the ...
4
votes
2answers
73 views

Locating north west corner of text area

I would like to locate the exact position of the north west corner of the text area. Using \layout (see image in Notes section), it seems that the required offset from current page.north west is ...
7
votes
2answers
94 views

How to represent discontinuous data (Interrupted Plots) with pgfplots?

I want to plot a large set of data points generated from a numerical experiment. The plot looks like a step function, that is, for an interval in x-axis, it takes a constant value. The code is (for ...
3
votes
1answer
41 views

Line from Origin to Nodes at circles centers

I want to produce a figure like this: with this code: \begin{tikzpicture} \draw (0,0) circle [radius=10.75cm]; \draw (0,0) circle [radius=4.2cm]; \begin{scope}[even odd rule] \draw[fill=gray!20,...
2
votes
2answers
48 views

Align two rectangle split horizontal nodes vertically

I'd like to be able to align vertically two or more rectangle split horizontal nodes such that the central vertical lines align. As far as I can make out, the coordinates for those lines aren't known ...
3
votes
1answer
50 views

How to justify the text in tikz node?

The text in the node in left-aligned. How can I make it justified? \documentclass[20pt]{extarticle} \usepackage[utf8]{inputenc} \usepackage{geometry} \geometry{paperheight=50cm,paperwidth=50cm,margin=...
0
votes
0answers
37 views

Use tikz node `pos`-key on later reference to node

I want to use e.g. \node[pos=0.8]{MYNODE}; after the node has been defined inside e.g. \draw: Consider the following \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{...
4
votes
1answer
27 views

Lines not correctly aligned with nodes

my custom draw lines are not pointing to the nodes but to somewhere else, I don't know why and how to fix it: \documentclass{standalone} \usepackage{tikz} \tikzset{ every label/.style={ ...
2
votes
1answer
27 views

Method to quickly place text at specific locations on figure

I slightly modified the code written for a second order step response found here. I wanted to add extra text around the figure. I have to through many iterations before I get the placement right. I ...
1
vote
1answer
13 views

Fine tune node text placement in Block Diagram

In the code below, how do I go about fine-tuning the placement of the text: CODE \documentclass{article} \usepackage[landscape]{geometry} \usepackage[table]{xcolor} \usepackage{url} \usepackage{...
1
vote
1answer
69 views

How do I draw an optionally colored circle/square/ellipse around a symbol

In this thread, @HenriMenke showed how to put a circle around a symbol. It's easy to modify his code to color the circle, see below, but I don't understand how to make the color an optional ...
3
votes
1answer
46 views

Why does the node style newcommand not work in tikz-qtree?

To reuse the labeled node style in tikz-qtree, I have defined \newcommand{\lnode}[3]{\node [label = {#1} : {$#2$}] {#3};}. However, \lnode does not work as in \Tree [.\lnode{above}{[1,5]}{$x$} .... ...
2
votes
1answer
34 views

Reduce length of arrow from block diagram

In the code below, the arrows going into and out of the block diagram box are too long. How do I go about reducing the length of the arrows? CODE: \documentclass{article} \usepackage[landscape]{...
2
votes
1answer
34 views

Centralize with includegraphics

I'm having trouble with the beamer. I want to put a background image. The image is not too large, so I can not put the size of the page so it is not distorted. The problem is that using scale=1, I ...
3
votes
1answer
62 views

Make tikz nodes touch bottom to top edge

I have two tikz nodes like this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows,positioning} \usepackage{amsmath,bm,times} \newcommand{\mx}[1]{\mathbf{\bm{#1}}} % Matrix ...
3
votes
2answers
98 views

Edge coordinates of a regular polygon shaped node

I want to have two inverse triangle side by side. In between, there shall be horizontal arrows in between. Which coordinates do I have to specify in order to address the edges of the shape instead of ...
1
vote
1answer
34 views

Size calculation of node not as expected

I'm trying to place two similar shapes side by side and something exactly in between both. But instead the two shapes (A and B) overlap. minimum sizes seem to be ignored here (was just for testing). I ...
3
votes
1answer
139 views

Tikz Node Text Formatting Problems

I have encountered a strange problem with text formatting within Nodes in Tikz. I want to use nodes to create information boxes within Tikz diagrams, for example as in the TikZ & PGF Manual v3.0....
1
vote
1answer
29 views

How to draw a brace after a node of variable size in tikz

I have a way to denote functors in my articles. To do so I use the following piece of code: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \...
0
votes
1answer
44 views

How do I decouple child nodes in tikz trees into separate node elements?

Assume I have a tree of the following form: \node (r) {Root} child { node (c1) {Left Child} } child { node (c2) {Right Child} } ; Now, I want to put this into a beamer frame and apply \only ...
7
votes
3answers
215 views

Dyck paths behaving as nodes

I am sort of having two main issues with Dyck paths. I'm trying to get to the image on the left (which I edited it with Paint), and what I currently have is the image on the right. I believe that what ...
3
votes
2answers
423 views

How set TikZ circle radius in \node[circle]?

I know that with TikZ, we can specify the radius of a circle when a \draw command is used, as in: \draw[fill] (1,2) circle (3pt); But how does one indicate the radius when you draw the circle by ...
5
votes
2answers
113 views

TikZ: redefine/update node label

I need to draw many nodes with labels that I can calculate from their indices. However, a small amount of them do not follow the rule, thus I need to assign their labels manually. Can I do that ...
1
vote
1answer
70 views

How to conditionally rotate a label in TikZ?

I want to create a macro that puts a label in a TikZ \draw environment; that rotates with the law: alfa<180, then rotate=alfa, else rotate=alfa-180. My code (where #7 is the angle, and #6 is the ...
4
votes
1answer
48 views

Prevent tikz node intersection

I'm making a macro to generate a tikzpicture depending on the arguments passed into the macro. I want to be able to draw a \node only if it won't intersect with a specified x coordinate. So say my ...
0
votes
1answer
108 views

Positioning of Node Labels

\documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[circle,draw=black] (t) at (0,0) {}; \foreach \i in {0,1,...,359}{ \node[label={\i:$\circ$}] at (...
1
vote
1answer
64 views

Positioning Graphic within Tikzpicture

I'm making a LaTeX presentation for the first time, and I'm trying to make a flowchart including a graphic, but for some reason the positioning of the graphic is above and to the right of where it ...
3
votes
1answer
67 views

From tree, I cannot make arrows from each node and give the color for each floor and give a layer to that

I want to draw a tree like the below. \documentclass[article] \usepackage{tikz} \usetikzlibrary{shapes,arrows,trees} \begin{document} \begin{tikzpicture}[level distance=2cm, level 1/.style={sibling ...
1
vote
1answer
121 views

How to make the design of this path in TikZ (Critical Path Method design)?

Please consider the following picture: I would like to create those nodes using the tikzpicture environment. Each must have a dividing line in the middle so that the node is divided into three ...
6
votes
2answers
238 views

Fill a triangle with nodes on the corners

I'm drawing three nodes and connecting them to a triangle: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node [ circle, draw ] (A) at ( 1, 0) {A}; ...
2
votes
1answer
83 views

Problem with node shape (diamond)

I am drawing a flow chart. Diamond-shaped nodes don't come out right. My minimal working example is below. There are no problems with ShareLaTeX, but it doesn't work on my computer. \usepackage{tikz} ...
0
votes
2answers
82 views

TIKZ: Layering Text over Text

I'd like to create a box in tikz that contains regular text, and underneath that text, another layer of text. I can create the first layer of regular text, but I'm stumped on how to put the lower ...
5
votes
1answer
188 views

Adding nodes through a TikZ style, using double dash lines ``--``

I'm basically asking this question, because the answer there is not working for the case with -- lines. Say you have a line like so: \draw (0,0) -- (3,3) node[sloped, midway,above]{Hey!}; Then is ...
0
votes
2answers
109 views

TikZ Arrow ignores rotation

I want to illustrate several arrows, each pointing to the previous arrow, except at some point, two arrows should point to the previous arrow and therefore their angle should be +/-45°. Now the ...
1
vote
1answer
43 views

Position a node in line does inside a xshift scope

I would like to position a node at a certain position of a line I drawn. Such line is drawn inside a scope environment with an xshift, that does not affect nodes! A work around is to use the option ...
5
votes
2answers
179 views

Rotate text in TikZ

How do one rotate text inside a diagram as shown below. Below is my MWE modified from here \documentclass[tikz,12pt]{standalone} \usetikzlibrary{calc,positioning,backgrounds,arrows.meta} \usepackage{...
1
vote
2answers
152 views

Two hidden layers with different neoron numbers each layer in neural network diagram with tikz

I am trying with following code. I want to replace Hidden layer 2 with 9 nodes. And want to add text1, text2, and text3 like the following figure. And Finally, I want to replace Input #1 to Input #9 ...
4
votes
1answer
58 views

tikz node does not fit as expected when yscale used in geometry

I am trying to make a rectangular node fit around two other nodes. This works fine as long as I do not set xslantand yscale in the enclosing scope. In the example below, the enclosing node does not ...
1
vote
1answer
44 views

About some tikz styles

I have the following code \documentclass{article} \usepackage[left=0in,top=2in]{geometry} \usepackage{tikz,amsmath} \usetikzlibrary{arrows,shapes} \newcommand{\tikzmarkC}[1]{\tikz[overlay,remember ...
4
votes
2answers
68 views

Tikz Figure with Adjusted Bounding Box Does Not have Correct Spacing

The \DrawBoundingBox macro draws bounding box around a figure with a 1pt border. In the first figure, produced with \MyNode\MyNode, no tweaks are done to tikz's bounding box. Due to the control ...
5
votes
1answer
100 views

Anchor at the baseline of the last line for a tikz node

I'd like to place a node with multi-line text using as anchor the eastmost point at the baseline of the last line, without having to manually break the lines. Specifying the node text width breaks ...
4
votes
2answers
72 views

Tikz - how can I remove the short vertical lines in a tree

I have the following codes. \documentclass[12pt]{article} \usepackage{qtree} \setlength\parindent{0pt} \usepackage{tikz} \usepackage{tikz-qtree} \usepackage[bottom]{footmisc} \usepackage{times} \...
4
votes
1answer
305 views

Tikz: Placing node midway right or left relative to path

I'd like to place a node at some position along a path, e.g. \tikz (a)node[pos=0.5,left]{x}{b}; But instead of shifting it 'left', 'right', 'above' or 'below' in absolute coordinates, I would like ...