TikZ is a higher-level drawing language built on top of the PGF graphics framework. For questions specifically about the PGF layer use {pgf-core} instead. Both tags are possible on the same question. The tag {diagrams} is also compatible with this tag.

learn more… | top users | synonyms (3)

5
votes
1answer
581 views

Multiply defined label warnings when using Subcaption in a Tikz picture

In an earlier question, I asked how to create zoomed highlights of a larger image automatically. User Jake provided an excellent solution using TikZ. However, when subcaptions and hyperref are added ...
10
votes
1answer
7k views

Adding underbrace in tikz

I have this code to draw a mass on a spring and now I want to have a curly brace below the spring to denote the distance: x_0. How do I do this? \begin{tikzpicture} ...
4
votes
2answers
3k views

Attempting to export tikz to eps

So, after having read the below thread: Attempt to export eps figures from TikZ fails I am able to generate .dvi versions of my figures. However, I need .eps, and it seems that the question above ...
13
votes
2answers
423 views

Is there a TikZ equivalent to the PSTricks \ncdiag command?

The pst-node package provides the \ncdiag command, which allows you to connect two nodes with a diagonal line, but with an extra arm parameter which puts a bend in the line and allows the connections ...
78
votes
4answers
7k views

How to create magnified subfigures and corresponding boxes for portions of a large image

Updated Below I hope the title gets at what I'm trying to do. I have a large image for a thesis on an image processing topic, and I want show the large image, with zoomed in boxes (typically with the ...
20
votes
2answers
3k views

Arc between arrows in TikZ (automata library)

Here's what I have for now: \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3.5cm, semithick, bend angle=35] \tikzstyle{every ...
4
votes
1answer
530 views

How to animate a path or how to draw starting fraction of a complex but linear path?

I would like to reproduce something similar to Animating Protocols but with a compound path and not a straight one. \documentclass{standalone} \usepackage{tikz} \usepackage{animate} ...
10
votes
3answers
3k views

How to draw orthogonal vectors using TikZ

I have the problem, that I want to draw a vector that is decomposed into two orthogonal parts. A short example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} ...
1
vote
0answers
215 views

How to use tikz matrix in a LaTeX command? [duplicate]

Possible Duplicate: Problem with defining shortcuts for TikZ matrices. I tried to use a tikz Matrix in a LaTeX document as the following: \documentclass{article} \usepackage{tikz} ...
6
votes
1answer
1k views

Combining TikZ foreach and let operation

I'm not having any luck using the TikZ let operation inside a foreach loop. Is there anything I'm missing? Sample code (that doesn't work): \begin{tikzpicture} \foreach \y in {1,2,3} {\draw ...
3
votes
1answer
2k views

draw two different arrows (from arrows library)

I did'n find a way to draw two different arrows (from the arrows tikz library) between two nodes ... For example, -triangle 45 at one extremity and -open triangle 90 at the other extremity. Any idea ...
4
votes
1answer
4k views

Change line spacing inside a node in TikZ

Inside a TikZ node, one can force line breaks using \\ providing the align option of the node is set. I would like to increase the line spacing inside a node. This can be done in the usual way with ...
5
votes
2answers
5k views

Get default colored plots with “no markers” command in pgfplots

I want to plot several curves with a \foreach command in pgfplots. I don't want any markers, and I can't find a way to get colored plots without markers in a \foreach loop. Using no markers gets rid ...
1
vote
1answer
635 views

use the coordinates of an axis tip with pgf plot

here's a drawing I just made (the sine function are replaced by external datas) \documentclass[12pt]{article} \usepackage{pgfplots} \usepackage{tikz} ...
21
votes
2answers
7k views

How to combine fill and pattern in a pgfplot bar plot?

Is it possible to combine a TikZ pattern with a background of a chosen color? \addplot[black,fill=yellow,pattern=north east lines] ... yields bars which have black stripes on white (transparent?) ...
21
votes
1answer
1k views

Clipping support in XeTeX

In pdflatex I'm used to clip graphics using something like this: \includegraphics[trim=14mm 0mm 14mm 0mm,clip,width=1.2cm]{image.jpg} When I attempt this in XeLaTeX, no clipping occurs and I get a ...
5
votes
1answer
514 views

Repeating preactions

I'm trying to use multiple similar preactions. Since I would prefer to automatise that I tried to use foreach with preactions. But it appears that's not working. Let's see an example ...
2
votes
2answers
736 views

How to use preview and animate packages together?

I'm used to prepare tikz graphics with preview or standalone packages to crop them. Now I've started to experiment with animations and wanted to do the same. My first test was with Alexander Grahn's ...
4
votes
1answer
950 views

Find a extremal value in external data file with pgfplot

Basically I'm plotting many curves stacked one after the other in pseudo 3D to show transient behaviors. I need every x axis to be at the same place so I use a ymin and ymax optional entry for the ...
2
votes
1answer
181 views

Use a tikz variable outside tikz environment… or something that could do that whatsoever?

I want to use a variable that could be used in TikZ code to get an external data file, and outside this code to define a legend associated. TikZ won't let me use \caption inside its environment, and ...
4
votes
3answers
786 views

Negative vphantom

The following minimal code \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \newcommand*\mycircb[1]{% \tikz[baseline=-1.5pt]\node[draw,circle,inner sep=0.8pt, scale=0.8] ...
3
votes
1answer
909 views

UML Sequence Diagram with PGF and Tikz produces “No shape named inst1 is known”

I've recently started using LaTeX for all my documentation and can't believe I didn't do this sooner! It's so quick to get good-quality documentation produced, and the LaTeX format serves brilliantly ...
6
votes
1answer
957 views

tick removal with pfgplots

To remove the ticks of a figure (and not the tick labels), I could only find the opacity trick, that I find odd. Is there any better way? \documentclass[12pt]{book} \usepackage{tikz,pgfplots} ...
9
votes
2answers
1k views

Painting an ellipse that fits a row of node but is not narrow and long

I want to draw a Tikz diagram, in which an ellipse contains a row of smaller ellipses. I tried doing so using the fitting library: \begin{tikzpicture}[ every node/.style={inner sep=1pt}, ...
6
votes
1answer
510 views

External images displayed in circle

I'd like to have several external images organized in a circular shape, with TikZ drawing on top of it. I tried the scope option in TikZ with \includegraphics command, the whole thing being included ...
6
votes
1answer
1k views

How can I use \foreach in an axis environment of pgfplots?

I'm having a pretty weird issue with TikZ and pgfplots. I want to have a legend driven by a \foreach variable, but TikZ won't let me do that. I tried a couple of different stuff and realized that ...
5
votes
1answer
867 views

In PGFplots, how can I have arrows as markers for plots in order to have them appear in the legend?

In my plot, I want to indicate the direction of a graph with arrows. Usually, I would just create something like this: \begin{tikzpicture} \begin{axis}[ axis x line=center, axis ...
10
votes
1answer
2k views

TikZ edges to/from center of nodes

Normally a edge drawn between two nodes starts and stops and the boundary of the nodes. How can one draw an edge to the center of a node? \documentclass[12pt]{article} \usepackage{tikz} ...
2
votes
1answer
471 views

Place symbols/nodes at intersection between an arc and some horizontal lines with \foreach in TikZ

I'd like to place an symbol I've defined at all the intersection point between an arc and some horizontal lines: I know how to use \foreach for other cases, but I'm really not sure how to setup the ...
34
votes
3answers
36k views

How to specify a fill color in RGB format in a node in tikzpicture?

I am just trying to get a rounded corner box with some text in it. The text color will be white and the box will be filled with a particular color. The preamble includes: \usepackage{tikz} ...
34
votes
3answers
15k views

How to add newline within node using TikZ?

I want to break the input of a path in order to draw Pushdown Automaton,so I try to use the break line symbol \\ and even $$ $$, it still doesnt break the lines. For example, the input should be 0, ...
5
votes
1answer
871 views

Vertical spacing problem related to the mdframed environment

I use the mdframed package with option style=1, which means that TikZ is responsible for drawing frames: \documentclass{article} \usepackage[style=1]{mdframed} \begin{document} \noindent Text ...
8
votes
2answers
451 views

TikZ/PGF: Create a saved length as part of a shape definition

When I create a new shape using pgfdeclareshape, I want to be able to store a length for later reference. I might want to do simple arithmetic on this length later on. Here's a basic attempt: ...
4
votes
1answer
1k views

Some problems drawing linked lists with TikZ's matrix library

Some time ago I found the question Draw an adjacency-list representation of a graph with tikz and wanted to solve it. I could but with some problems which still remain and How should I draw a ...
54
votes
6answers
18k views

What You See is What You Get (WYSIWYG) for PGF/TikZ?

Are there any WYSIWYG editors for PGF/TikZ? Perhaps something similar to LyX but for PGF/TikZ? If there is no WYSIWYG editor for this tandem, is there one perhaps that allows the user to easily ...
14
votes
2answers
5k views

Installing background and foreground page layers with TikZ

Several times I discovered the need to draw TikZ material behind and on top of the page text (How to draw text-anchored tikz line below text instead of above?, Test if a paragraph has a page break in ...
2
votes
1answer
1k views

In tikz \node's text, how to use \multiinclude to include several pictures?

This code tries to use \multiinclude from xmpmulti inside a tikz node text to include for example a series of files pic-0.pdf, pic-1.pdf,..., etc. and doesn't compile and throws out error listed ...
3
votes
2answers
2k views

TeX memory size error when using TikZ foreach children in trees

Nearly Identical: How to expand TeX's “main memory size”? (pgfplots memory overload) I'm getting the same error as the other question, but the answer there is not handling my issue. I believe the ...
2
votes
2answers
273 views

Ghostscript questions [related: preview package to print standalone PDFs]

Using the preview package to generate individual PDFs of images within your document has been covered, for example, in this thread. However, I am trying to understand how you can use Ghostscript to ...
10
votes
2answers
283 views

Place TikZ coordinate or \zlabel at every (base)line

I'm currently adjusting the code shown in Test if a paragraph has a page break in it? to support underlining and highlighting using TikZ similar as shown in Cool Text Highlighting in LaTeX, but ...
6
votes
1answer
239 views

How do I create a loop based on a series of points in TikZ as in the Graph style?

I am currently working on a project to create a translator from Frank Drewes' graph style into TikZ. As an example, I am trying to recreate the following diagram from the graph style manual into a ...
1
vote
0answers
413 views

Question regarding add node with text within TkiZ package? [closed]

I followed an example from TikZ manual, and modify mine to add an extra node with text below a given node. This is the example from TiKZ manual, And here is the code, So I modified my code to fit ...
5
votes
3answers
3k views

How to draw two Tikz pictures that are parallel to each other?

I want to draw two automaton figures next to each other; however I can't put them in one \begin{} \end{} tag because the node distance can be changed, further the distance between two pictures is also ...
26
votes
2answers
30k views

How to add caption for a TikZ picture?

I'm drawing a automaton figure, and I want to name it says 'M1' below the figure? A minimal example would be greatly appreciated. Thank you. \begin{tikzpicture}[shorten >=1pt,node distance=2cm,on ...
2
votes
1answer
522 views

I do not know the key '/tikz/insert path'

Trying to compile this example: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[remember picture,overlay] % A path that follows the edges of the current page ...
4
votes
1answer
323 views

More: Generalised: Accessing the logic values of a TikZ coordinate

This is a follow-up question to: Generalised: Accessing the logic values of a TikZ coordinate. In that question a PGFplot answer was suggested by jake. I took that answer and modified it to the ...
5
votes
3answers
2k views

A problem with “Tikz + Gnuplot”, set terminal table

When I use Tikz to plot a function. I followed the instruction to use gnuplot to do so. I did that half year before. But now when I recompile, the gnuplot has problem with the first line of its ...
3
votes
3answers
688 views

How to add a tikz/pgf command to section command

I need to draw a simple symbol with tikz/pgf to a chapter command, for example: \documentclass{book} \usepackage{tikz} \begin{document} \chapter{hello tikz\tikz\node{pgf};} \end{document} but ...
2
votes
1answer
1k views

How to correct for a xshift in the pgfplot legend?

Using the following example code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$x$, ...
7
votes
4answers
553 views

How to create a triangle of dots in TikZ using the foreach command?

How to create a triangle of dots in TikZ using the foreach command? I need this.