2
votes
1answer
19 views

Illegal unit of measure (pt inserted) error when using \foreach with node[pos]

I am trying to draw a path and position nodes on it and fill them using this code and it works \documentclass[varwidth=20cm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw ...
3
votes
1answer
86 views

change position of TikZ node halfway

I am trying to move the node "H" to one of the two positions shown in red below: I am not sure how to position it at 'intermediate' positions such as I am suggesting. How could this be done? Is ...
5
votes
1answer
56 views

Understanding tikz inheritance with the positioning library

I have trouble understanding the tikz inheritance model while using the positioning library. Consider the following example: \documentclass[]{scrbook} \usepackage{tikz} \usetikzlibrary{positioning} ...
1
vote
1answer
27 views

\fill left of a node using the positioning library

How can I position a \fill relative to a node? I would position a node in the following way, using the positioning library: \node (mynode) at (2,4) {text}; \node [left=of mynode] {o}; But if I try ...
7
votes
4answers
236 views

How to label the curve of a function at any point along it in tikz?

In my example, I have to simple curves y = sqrt(x) and y = x. I would like to be able to attach a label along each curve, say at the middle of the curve. Right now, I am doing it by trial and error ...
4
votes
1answer
60 views

Fit node to another node in a seperate scope that has been shifted and canvas transformed

I want to fit a node to another node which is defined in a different scope which has been subject to the options "(x)shift and transform canvas" (see example code and image). Without any canvas or ...
12
votes
5answers
299 views

How to force nodes on different lines to have equal y-positioning

I have, hopefully, a very simple question. I use tikz to make a figure for confirmatory factor analysis (CFA). In the minimal example there a 6 arrows going from the circle to a fixed place. However, ...
5
votes
2answers
243 views

pgfplots: relative node positioning in axis cs

I have got a file to plot with pgfplots. For convenience I'd like to define a measure in the plot. Unfortunately the relative positioning seems to give weird results. If I define the node coordinates ...
2
votes
0answers
81 views

TikZ node positioning on edge parameter/label

I wonder if there exists a trick to position a graph node (relative), based on a parameter (label?) of an edge leading to it? I mean a kind of time diagram, i.e. for example I have a timed automat, ...
2
votes
1answer
85 views

How to place a node of a certain shape with one side on a line in TikZ

I would like to have an arrow shaped node to be positioned with its tail on the vertical axis of my reference frame. Here' were I got: \documentclass{article} \usepackage{tikz} ...
8
votes
4answers
299 views

Tikz labels are shifted dependent on the letters size

General description of the intrinsic behavior The labels in a tikz picture are shifted (e.g. by above) exactly to the extreme of the letters in the labels, i.e. it takes the descender (see ...
2
votes
0answers
166 views

TikZ: How to set a node on an exact position on a line?

to set a node on a line the usual way should be something like this: \begin{tikzpicture} % place nodes \node[draw] at (0, 0) (a) {A}; \node[draw] at (5, 0) (b) {B}; \node[draw] ...
8
votes
4answers
186 views

TikZ chain adjust positions of on-the-arrow node

\documentclass{article} \usepackage{tikz} \usetikzlibrary{chains} \begin{document} \begin{tikzpicture}[start chain=circle placed {at=(\tikzchaincount*30:1.5)},regular/.style={draw,circle,inner ...
1
vote
1answer
202 views

Different height in different split parts + arrow positioning

\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning,shapes.multipart} \begin{document} \tikzset{every loop/.style={min distance=1mm,in=110,out=70,looseness=2}} ...
5
votes
1answer
199 views

An overview of node positioning?

I've been making tikz pictures for a while now, and there seem to be a number of different ways to position nodes within a diagram. Absolute coordinates, east/west, left/right, the $ $ things, minimum ...
2
votes
1answer
2k views

TikZ: Label nodes on to path

I use the to syntax to set a node in the horizontal middle between to other nodes. My problem is, that a label does not fit well at this middle node. Compare the label of node 2 and node 3 in the ...
2
votes
1answer
169 views

How do I make my path node follow the path from a certain position?

I am trying to make a diagram with a curved arrow and I want its node to follow the arrow from about the "near end" point. I have been googling for hours now and I can't find the way to do it. I've ...
8
votes
2answers
242 views

TikZ: using the pos = x in a node

Why doesn't the pos = x option work when the node is used in the plot command? \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw plot[domain = 0:2, samples = 100] ({\x}, ...
2
votes
1answer
240 views

TikZ: node placement when using draw let in syntax

When using the \draw let ... in syntax to construct an arc between 2 lines, the arc is placed in the correct location even if the arc's focal point isn't the origin. However, this isn't the case with ...
2
votes
1answer
171 views

How can I use fork style edges with explicitely positioned TikZ tree nodes?

As part of a graphical export facility, I try to render a tree in TikZ were all the node positions are exactly given and were the edges are fork-style. Doing that without the trees package demands ...
2
votes
1answer
2k views

How to define the default vertical distance between nodes?

Use positioning can control the individual vertical position of nodes. But is there any way to control the default vertical spacing? \documentclass{article} \usepackage[utf8]{inputenc} ...
3
votes
1answer
215 views

Tikz vertical alignement text and shape

I want to vertically align sans serif font with a rectangle. The following code show the problem: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary[positioning] ...
4
votes
1answer
135 views

Tikz positionning on the baseline

I have the following piece of code \begin{tikzpicture} [mainbullet/.style={rectangle, minimum size=0.3cm,draw=orange!100, fill=orange!100,thick}, % maintitle/.style={rectangle,opacity= 0.5}, % ...
1
vote
1answer
273 views

Using Tikz Fit to draw a node covering a Tikz chains

A chain of nodes is drawn using tikz chains. I would like to draw a rectangle node covering the chain nodes (or, multiple rectangle nodes covering subsets of them). I am using tikz fit. ...
3
votes
2answers
299 views

anchor arrow start position

Attached below is the minimum working example. I would like the arrow to end at the west anchor of the node "operation". I tried anchor and few other possibilities but they don't seem to affect the ...
21
votes
3answers
4k views

How can I set the TikZ label anchor explicitly?

I want to add a label to a node, but "inside" the node. Something like this: The manual seems to indicate it might be possible, although no actual key is named. The ... anchor point for the ...
4
votes
1answer
198 views

Positioning node at end of line

The following code fails to do what I want: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric,calc} \begin{document} \tikz{% \draw (0,0) -- (\textwidth, 0) node[draw, inner ...
5
votes
2answers
2k views

Overriding node draw style inherited from every node style messes up positioning

I have been trying to draw a tree with TikZ. All nodes should be circles, so I use the every node style. There are some additional labels on some nodes, which have to be exceptions. I have tried this: ...
3
votes
1answer
307 views

TikZ node positioning in Beamer ignores x coordinate

I have the following frame in beamer: \begin{frame}{Language} \begin{block}{} \begin{align*} \onslide<1->{ &\text{Types} & T &::= B | T \to T \\ } ...
2
votes
1answer
141 views

positioning nodes according to their sizes in tikz?

I produced the following output using the tikz code shown below. What I want is for the arrow on the right to have a fixed length relative to the rightmost symbol, not relative to the center of the ...
5
votes
1answer
224 views

How to put node in an accurate place? How to use different style of font in TikZ?

I want to draw something like this: This is my code: \documentclass{article} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{tikz} %\usepackage[active,tightpage,floats]{preview} ...
11
votes
3answers
656 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 ...
6
votes
1answer
151 views

Simultanious use of relative positioning and “of” notation

A rather high node has a not so high node on its rigth side. I like the positioning and sizes, but i want both node to share the same Y-Axis of their north border. \tikzstyle{big} =[rectangle, ...
8
votes
2answers
412 views

Giving a `matrix` node an `alias`

This TeX.sx question asks if is it possible to use a TikZ matrix along a chain. The error that occurs when one tries to do so is Package pgf Error: No shape named chain-3 is known., and a way to ...
8
votes
1answer
1k views

Edge nodes, auto and node distance

Consider the following MWE \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0)--(1,1) node[auto,midway] {$A$} -- (2,0) node[auto,midway] {$B$}; ...
3
votes
1answer
184 views

Circling/framing and referring to a bunch of nodes

The end goal: drawing paths between nodes like in the example there but the difference is the nodes are inside a picture here and in particular, the other node is a bunch of nodes in the same picture. ...
10
votes
1answer
287 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 ...
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 ...
7
votes
2answers
936 views

How does the 'on grid' node positioning in TikZ actually work?

I thought I knew how the on grid option of TikZ (cf. version 2.10 manual section 16.5.3 pages 186-187) worked, but the results I get are different from what I expected. I have a minimal example: ...
6
votes
1answer
3k views

Position text next to rectangle in TikZ

Consider the following TikZ code: \filldraw[fill=black!40!white,thick] (0,1.5) node[above left] {start} rectangle (3.2,2) node[below right] {end} node [midway] {cp} ; It produces a rectangle at the ...
21
votes
3answers
916 views

TikZ Nodes not exactly centered

In my solution to draw a plot with point, it was pointed out that the nodes containing \textbullet and $\circ$ were not placed exactly centered at the specified point. I found this hard to believe ...
7
votes
2answers
1k views

Center a Node Vertically TikZ

I'm using TikZ to create the following drawing: So far so good, but now I'd like to center the node with the gray background vertically. Here's its code: \setlength{\arraycolsep}{2pt} ...
5
votes
1answer
569 views

multipart nodes anchors for dividers

How can a node be positioned at the center/edge of a part in a multipart node using relative positioning? \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.multipart} ...
3
votes
2answers
535 views

tikz positioning. How to place a node below of another only by y coordinate, leaving x alone

I have 2 chains in different columns of a table. I need to shift the second chain in a such way that the {mv r0 <- a} would be below the {br a = 0 $end}, as it is depicted : right below the red ...
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 ...
9
votes
1answer
522 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 ...
6
votes
1answer
514 views

Nodes won't position as they should in pgfplots

When I use the example of the pgfplots manual it looks different from what is shown in the manual: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
526 views

Making use of entire page in TikZ

I am using the TikZ package to create stacked timelines. See example below. Whenever I make some small modification to the timelines, I have to spend lots of time adjusting all the coordinates. If ...
5
votes
1answer
1k views

Define node at relative coordinates of \draw plot

I am not able to fix that simple plot. I think I missed something, but I can't point out what ! Could you tell me why (a) is not at midway of the red line ? \documentclass{article} ...
7
votes
3answers
8k 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 ...