{labels} is about customizing the labels of {diagrams} and mathematical constructs like {matrices}. For questions about \label or similar commands, use {cross-referencing} instead.

learn more… | top users | synonyms (1)

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 ...
18
votes
2answers
935 views

High level digital design in TikZ

I am very new to TikZ and I have trouble making a diagram similar to the one here: My problems are specifically making MUX to get to inputs which would be on 1/3 and 2/3 of the width. Taking sigma ...
39
votes
5answers
7k views

How do I label different rows or columns of a matrix using braces?

I have a matrix enclosed in brackets [ ] (or (), or {}, or |'s, or ||'s): - a b c d - | e f g h | | i j k l | - m n o p - which I want to label like so: R |---| -- - a b c d ...
8
votes
1answer
658 views

Two level labels in bar plot

I need to group the labels in the x axis by putting a second level label. I need to separate the nodes that are grouped from the other ones or marked them somehow. For example, if I have the labels ...
20
votes
3answers
1k views

Draw dimension of a line as a decoration in TikZ

Is it possible to define in TikZ a new decoration or something like that, such that it is possible to write something like: \draw[dim={text,above}] (A) -- (B); \draw[dim={text,below}] (C) -- (D); ...
12
votes
5answers
1k views

How do I draw a little red square to label my right triangle?

The sample code: \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw ( 0 , 0 ) coordinate (A) -- ( 4 , 0 ) coordinate (C) -- ( 0 , 3 ) coordinate (B) ...
12
votes
1answer
3k views

pgfplots using strings *from data table* as x axis labels in bar chart

I've seen some of the other threads on using strings as x axis labels, but nothing that fits my situation. I'm trying to create a bar chart from a CSV file. I can do it so long as everything in the ...
6
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 ...
3
votes
1answer
103 views

How to correctly label an included PDF?

I have this: \label{appendix:b} \includepdf[scale=0.8,pages=1,pagecommand=\chapter{interview}]{interview/interview} \includepdf[scale=0.8,pages=2-,pagecommand={}]{interview/interview} ...
32
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 ...
37
votes
5answers
34k 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 ...
12
votes
1answer
2k views

Stacked barplots/groupplots with text labels in x-coordinate

I was trying to stack a groupplot, or was it grouping a stacked plot? However I was trying to get something like: The ybar stacked option works quite nice here. But when I try to adapt it to a ...
7
votes
1answer
3k views

Putting LaTeX table legend in a “x\y” style [duplicate]

Possible Duplicate: Tables of numbers Is it possible to put a "x\y" style legend in one cell (maybe be made up of several cells) of a table? It would be great to make the 'x' slightly lower ...
13
votes
3answers
86 views

What to consider when naming labels to prevent errors?

This question is inspired by Umlauts in label and a quote from an answer to How to automatically add \! in subscripts? However the best is to avoid _ in labels. I already name all my labels with ...
10
votes
2answers
448 views

How to generate n points over a circumference and choose label and color

I would like to place n points over a circumference like Figure 3 of this file. I'd choose the label to be assigned to each vertex and color and I'd like to have the code in TikZ-pgf.
8
votes
1answer
3k 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
1k views

Different color for individual bar in bar chart & adding bar labels

Please consider the following MWE. There are three things I would like to do: Individual colouring For the last element ("not rejected") I would like to fill the bar with another color (e.g. ...
6
votes
1answer
866 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 ...
4
votes
2answers
2k views

How to make an xbar plot, with pgfplots, having different y tick labels on the left and right side y axis?

I am making an xbar plot with pgfplots. I want this plot to show the results from a test, where people in different age classes are given scores. For each of these age classes a single person is the ...
3
votes
2answers
854 views

XeLaTeX and EPS figure with consistent fonts

I'm using Miktex 2.9 and XeLaTeX plus some EPS figures. For consistent fonts along the document, I used to play with psfrag or directly use pstricks. I'm facing the situation where none of the above ...
2
votes
1answer
52 views

Change entry label to [Jones,82]

I'm trying to set a bibliography this way: \documentclass[12pt,french]{report} \usepackage[backend=bibtex, style=alphabetic ]{biblatex} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} ...
8
votes
1answer
281 views

Label equations arbitrarily

When I have equations, as in \begin{equation} ... \end{equation} Can I arbitrarily assign the numbers to the equations? Instead of the usual order (1), (2), (3), ..., I'd like something like (1), ...
6
votes
1answer
373 views

Equation tag in twoside-mode outer

At the moment I thinking about the following think. When I use the twoside mode to write a book I want to print the number of the equation outer. I can modify it manually with these two commands: ...
5
votes
1answer
2k views

Date plot using pgfplots with odd tick label

How do I make the time label in the following image appear as "10:00" (i.e. 10 o'clock) rather than the unexpected and unwelcome "09:60"? Here's the code that I am using: \documentclass{beamer} ...
4
votes
2answers
3k views

Bar plot labels and grids

\documentclass[a4paper,11pt]{report} \usepackage{tikz} \usepackage{verbatim} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ title = {Optimalization based upon co-occurences}, ...
3
votes
1answer
445 views

Circuitikz place text above and below component

Lets say I create a component like this (0,0) to [R, l^=$R1$] (0,2) How can I make it so that the value, R1, is say, on the right hand side, and the resistance, say, 1kohm is on the left hand side? ...
1
vote
1answer
256 views

How to fix showing table labels in TeXstudio when using ctable package?

In TeXstudio editor one can easily choose which labels to reference as soon as you type the cross-referencing-macro you intended to use, for instance, \cref{} of the cleveref package (see image ...
20
votes
3answers
270 views

Chart showing the relative number of pages in the document

I'm playing with the idea of adding a chart in the begining of my thesis, showing the relative dimension of each chapter (or section, maybe). This is something that I would want to generate ...
19
votes
1answer
6k 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 ...
12
votes
1answer
5k views

Place label in middle of line with TikZ

What is the best way to place a label in the middle of a line with TikZ? I mean smack dab in the middle of the line, not above or below it. The following is close \begin{tikzpicture} \draw[|->, ...
4
votes
2answers
641 views

Adding labels to a formula

I have a diagram like this, explaining a formula: \documentclass{article} \usepackage{stackrel} \begin{document} $\stackrel[e+f+g+h^i]{a^b}{c d}$ \end{document} For this example, I have removed ...
10
votes
2answers
4k views

Positioning of Pgfplot axis labels

I'm trying to adjust the position of my axes labels and I'm having some trouble: \documentclass{article} \usepackage{float} \usepackage{pgfplots} \usepackage{graphicx} \begin{document} ...
9
votes
2answers
312 views

Label variables of equation using tikz without using itemize

I'm trying to use tikz to label the variables of an equation. I know of a similar question (Itemized Equation) but the answer uses itemize to label the variables. I would like to do something similar ...
6
votes
3answers
204 views

Make a polygon with automatically labelled nodes according to their coordinates

The goal: Make a polygon (and a circle containing that polygon at the nodes of the polygon, without the polygon's lines) with automatically numbered nodes according to their coordinates (x,y) [which ...
5
votes
1answer
785 views

Including package to create MATLAB labels using LaTeX

When using LaTeX as the interpreter to typeset labels in MATLAB it would be great to be able to include packages to customize appearance. Is this possible? As of now I know no method to create non ...
7
votes
1answer
449 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 ...
4
votes
1answer
98 views

Labeling several out/incoming lines collectively in Feynmp?

Suppose I have two outgoing lines in Feynmp, o1 and o2. I know how to label each and one of them. But suppose I want to draw a huge curly bracket going from o1 to o2 and then label that bracket. Is it ...
4
votes
1answer
365 views

Labeling Edges in a Weighted Digraph

I would like to have the labels of the edges of a weighted digraph positioned "beside" (north, south, east, west, etc.) the arrows. I have already created the digraph with: \documentclass{article} ...
4
votes
1answer
202 views

Aligning marginal notes with center of line rather than baseline

I would like to have all references in my document (to equations, figures, lemmas, random locations in text, etc.) be numbered in the same series, and I would like these numbers to appear in the ...
3
votes
1answer
88 views

Labels with \psplot

Consider the following example: \documentclass{article} \usepackage{pst-plot} \begin{document} \begin{figure} \def\dx{2.5} \def\dy{1} \makeatletter ...
3
votes
1answer
716 views

pgfplots - Number above one of the bars in the bar chart

I want to put a number above only one of the bars in the bar chart. For example, above the bar A, I want to put a number say 200. Other bars will not have any number at the top. This is my code. ...
2
votes
2answers
1k views

How to label an optimization problem with a label such as (P)?

I am trying to write an optimization problem in my document, and for convenience, to define a label to refer to it. I don't want to refer to it as equation (3), which I know how to do, I want to ...
10
votes
1answer
306 views

How do I put a label inside a Feynman diagram circle?

I have this simple Feynman diagram with a circle: I would like to put the number "1" in the middle of that circle. I've tried these: \fmfiv{lab=1}{c} \fmfiv{lab=1}{.5[nw,se]) ...
10
votes
1answer
526 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 ...
9
votes
1answer
171 views

Using xy-pic, how do you label an arrow with a curly brace that spans the length of the arrow, and can be offset arbitrary distances?

I'm trying to figure out how to label the arrows with curly braces that span the length of the arrow, and to make it all very pretty. More specifically, I'm trying to make ...
7
votes
1answer
116 views

Can I give a function to a label?

I try to create a dynamic way to give labels to my slides in Beamer. \documentclass{beamer} \newcommand{\partName}{blank} \newcommand {\defPartName}[1]{\renewcommand{\partName}{#1}} ...
6
votes
2answers
155 views

Putting labels inside section headings

I usually work with LyX, and when I want to label a section (in order to reference it later), I put the label inside the section heading. This usually works, but recently I tried to create an article ...
5
votes
1answer
391 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 ...
5
votes
2answers
751 views

PgfPlots with labeled plots extend outside the graph box

Sorry for the confusing title. The MWE \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[scale=0.75] \begin{axis}[ylabel=Y-Axis, xlabel=X-Axis, ...
5
votes
1answer
444 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 ...