3
votes
0answers
66 views

How to automate right node alignment for labels from table AND marker size AND marker color of scatter plot?

Problem: Labels from table are placed right, but overlap. Is there a way to automate alignment of the labels near nodes so that labels do not overlap? This is a small example but I have bigger table ...
2
votes
0answers
129 views

How should I read the current TikZ “label distance”?

I decided that I don't like the behaviour of the label functionality of TikZ. I want to get labels that are positioned using the anchor opposite the specified label angle. So for example if the label ...
5
votes
2answers
124 views

Labeling node values on the axes

I want to draw some curves and some special coordinates on the curves, then label the nodes on the axes. So far I have done it manually like this (it's a diagram for the Markowitz risk premium in case ...
2
votes
1answer
1k 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 ...
1
vote
1answer
215 views

Labelling tikz nodes AND edges

The following is a snippet of the original. It works.., \documentclass[12pt]{article} \usepackage{tikz} % drawing support \usetikzlibrary{trees,arrows,decorations.markings} ...
5
votes
1answer
316 views

Reduce white space above TikZ label

I'm new to TikZ, and have drawn the following picture, \documentclass[12pt,a4paper]{article} \usepackage{tikz} \usetikzlibrary{trees,arrows} \begin{document} \begin{tikzpicture}[every ...
3
votes
1answer
252 views

Adding labels to a node in a matrix and change the position of single matrix cell to create a flow chart

I want to add two labels next to the diamond shaped node. One to the right saying "Ja" above the path and the other one below saying "Nein" right next to the path. Currently it seems like that two new ...
1
vote
1answer
73 views

Change node distance using a macro and include a label to the background next to the nodes

the picture doesn't fit onto an A4 page. So what I would like to change/add is: the node distance the font size a vertical text which groups nodes together a number infront of each node as the ...
6
votes
1answer
360 views

Pgfplots: Drawing Arrows Along Contour Plots

I would like to draw "stealth" arrows in place of the "0" labels along the trajectory in the phase portrait pictured below. I decided to draw the trajectory using the contour functionality of ...
20
votes
3answers
3k 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
2k views

How to place label in middle of line (above and below) with TikZ

\fbox{ \begin{tikzpicture}[scale=1,auto=center] \node[circle,fill=gray!20] (n1) at (2,8) {Node A}; \node[circle,fill=gray!20] (n2) at (8,8) {Node B}; \foreach \from/\to in {n1/n2} \draw ...
8
votes
1answer
2k 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} ...
3
votes
1answer
469 views

How to place a textnode at the center of a drawed rectangle

A rectangle label does not appear inside the rectangle but on the corner of it. \tikzstyle{every node} = [align=center] \begin{tikzpicture} \draw (0, 0) rectangle (2, 2) node [center] ...
18
votes
1answer
4k views

Comprehensive list of TikZ style options?

I'm aware that one can use \tikzstyle{every label}=[...] to apply styles to every label within a tikzpicture; or \tikzset{mystyle/.style={...}} to apply style specs to a specific type of node mystyle ...
5
votes
2answers
211 views

Tikz: How do you label a circled node to the left without collisions?

I'm trying to label a circled node in Tikz with some text to the left. The problem is it is colliding with the circle. For example I have something like: \begin{tikzpicture} \node[draw,circle] at ...
13
votes
1answer
1k views

How to use “fit” to frame the nodes and labels

I'm using the fit TikZ library to fit a rectangle around two nodes which include labels. However, the rectangle is only fit around the actual nodes, not about their labels: \documentclass{article} ...
33
votes
5answers
27k views

TikZ set node label position more precisely

This seems like it should be really easy but I can't seem to find it anywhere... I'd like to be able to fine-tune the positioning of a node label. I'm aware of the ...
7
votes
1answer
846 views

Titles aligned horizontally above nodes in figure

I am trying to create a flow chart going left-right where each stage has a header aligned with it, at a certain height above the chart. I am trying to use the Hydrogen Splitting Example (see the ...
6
votes
1answer
777 views

How to make a pgfplots stacked xbar plot with bar-“explicit meta” labels computed from input table data

I am making a pgfplots stacked xbar plot where each bar has a distinct label, in addition to a numeric bar length. Each pair of bars also has a common label. I would like to mark each bar with its ...
8
votes
1answer
491 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 ...
5
votes
1answer
396 views

Is it possible to refer to node label and reuse it for labeling other nodes in tikz?

I would like to "reuse" some nodes' labels, as in example below \documentclass[a4paper,12pt,oneside,titlepage]{report} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{ label ...
4
votes
1answer
3k views

Using [midway] to label a curved path at its centre

I am trying to label two curved paths connecting two nodes with labels placed at their centres using the node[midway] option. This is something that should be very simple but I have not been able to ...
27
votes
3answers
5k views

TikZ: Bend text so that it follows a line

I have two arrows going from a node on the left to a node on the right. Both arrows are slightly bent. I want to label the arrows with text that is bent just like the arrows. This is as far as I've ...
3
votes
2answers
1k 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
1k views

Label sides of rectangles and triangles

What is the easiest way to label the sides of rectangles and triangles in TikZ?