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)

3
votes
1answer
546 views

Help me upgrade to PGF 2.0?

I just installed MacTeX 2010 yesterday, so I'm running TeXLive 2010. I need to upgrade my installation of PGF to 2.0 from 1.18, which is what comes standard with the MacTeX distribution. Could someone ...
11
votes
4answers
3k views

Modular arithmetic on node names in TikZ?

Say I have a bunch of nodes I've already created in TikZ---maybe v0, v1, ..., vn-1. I'd like to connect certain of these nodes in a systematic way, by doing arithmetic on the indices, ideally mod n. ...
14
votes
1answer
14k views

How can I change the legend's location in a pgfplot?

For a report I am preparing several figures that I exported from Matlab using the matlab2tikz script. However, the location of the legend does not please me. Here is an example plot: I want to move ...
4
votes
1answer
3k views

TikZ failing to draw [closed]

I'm trying to use TikZ to make flow charts in my LaTeX files, but I'm getting an error. Here's the LaTeX I'm using: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} Some text ...
11
votes
1answer
2k views

Cycle option when drawing between nodes in TikZ

Cycle lets you close curves when drawing, and \coordinate (a) at (0,0); \coordinate (b) at (1,0); \coordinate (c) at (0.5, -1); \draw (a) -- (b) -- (c) -- cycle; works fine. Shouldn't also \node ...
2
votes
1answer
740 views

How do I use \pgfextractx, \setlength and so on together, to achieve a task using paths?

The following code attempts to absolutely position two nodes with rectangular outlines, then draw a line that goes from the right-hand side of one to the left-hand side of the other, along orthogonal ...
3
votes
1answer
202 views

Why do these two tikzpictures result in different output?

The following document has two tikzpictures in it, and they result in slightly different output. Why is this? I don't understand how the use of draw works in one but not the other. In the first one, ...
38
votes
4answers
5k views

How do you draw the “snake” arrow for the connecting homomorphism in the snake lemma?

How does one draw the "snake" arrow for the connecting homomorphism when using the snake lemma? I'd also be interested in drawing similar arrows act as "carriage returns" when considering a long ...
7
votes
1answer
1k views

chemical laboratory equipment

I want to include some drawings with Erlenmeyer flask, Bunsen burner and so on in LaTeX. I browsed the texample.net gallery. I found some examples for chemical structures, molecules and so. But I ...
9
votes
4answers
614 views

How can I turn off “fill” mode in TikZ within the one command?

I want to draw an ellipse and its centre point in the one command, like so: \draw (1,0) [fill] circle (1mm) node[below]{$1$} ellipse (5 and 2); I want the centre point filled but not the ellipse. ...
1
vote
1answer
428 views

How to get rid of vertical space above title from slide 2

Using this minimal example I get a vertical space above the title bar on slide 2. This seems to be an unfortunate interaction with CVS versions of pgf/TikZ (I am using the build from 28 September ...
4
votes
1answer
785 views

Lining up edges of a tree with TikZ

I'm drawing trees with TikZ and \begin{tikzpicture} \node {$C$} child[missing] child{node {$i$} child[missing] child{node {$j$}} }; \end{tikzpicture} produces edges that don't ...
4
votes
3answers
2k views

How to get TikZ nodes not to change alignment?

I'm still working on rendering a nice block matrix. I've been using BMAT but it is irrelevant for the question at hand. I want to connect various entries in an array/matrix/BMAT by lines, and I'm ...
5
votes
1answer
7k views

Tikz node labels more below than below

I am using the tikz package. Is there a typografical/semantic/other reason why \draw(2,0.6) node[\label=below:$b_1$]{}--(2,4); produces a label more below than \draw(2,0.6)node[below]{$b_1$}; ...
15
votes
7answers
5k views

Electric circuits in TeX, LaTeX, and Friends

What are some ways to draw electric circuits in TeX systems? I'm making this community wiki since I haven't found a question related to this. I was thinking along the lines of circuitikz. What do ...
3
votes
1answer
558 views

Beamer: how to convince “includeslide” to include the last slide of a frame

I'm using \includeslide to create copies of my Beamer presentation slides in handouts, but have hit a small snag. By default, it appears to choose the first slide in a frame unless I specify the page ...
15
votes
4answers
2k views

Draw only some segments of a path in TikZ?

Is there a good way to create a path in TikZ only some segments of which are stroked? I want to create the whole path in a single command so that it can be filled, but I also want to stroke some ...
2
votes
1answer
284 views

using easybmat and tikz packages together?

In continuation to this question, I was looking for a way to add nice diagonal lines inside a BMAT matrix to express a band structure of the matrix. However, a LaTeX file with both TikZ and easybmat ...
6
votes
1answer
2k views

TikZ `edge from parent` followed by a node.

The TikZ documentation gives the following example for adding a label on an edge in a tree: \begin{tikzpicture} \node {r} child {node {t} edge from parent node {label}}; \end{tikzpicture} ...
16
votes
2answers
3k views

to path + relative coordinates in TikZ?

The following gives an error with PGF 2.00: \begin{tikzpicture} \draw (0,0) to +(1,1); \end{tikzpicture} I could swear that this worked once with a different version, but I don't know which. The ...
4
votes
1answer
469 views

In TikZ, is it possible to nest matrices?

This is similar to this question, but not quite the same thing. I want to make a matrix of graphs that are all relatively the same, and I made the graphs using the matrix construct. [By the way, did ...
26
votes
3answers
2k views

Applying a postaction to every path in TikZ

Sometime, for example in a solution to a recent question, one wants to apply a postaction (like a decoration) to a group of paths. A naive solution is to use every path/.style={}. Unfortunately this ...
37
votes
6answers
12k views

TikZ: How to draw an arrow in the middle of the line?

Like this: .------<------. | | v ^ | | '------>------' I am currently using \begin{scope}[very thick,->] \draw (-4,1)--(-4,0)--(0.1,0); \draw ...
8
votes
3answers
578 views

How to speed up a large plot?

I have a large plot. It is a big file and it renders slowly. What is the best method to slim it down without loosing to much of its visual properties ? I know that PDF and PS support cubic splines. ...
4
votes
1answer
526 views

Very plain captions that can be placed in TikZ nodes?

I would like to define a very plain caption format that simply typesets the caption label and text as if it were normal inline text. Of course I would like to keep the the functionality of \caption ...
8
votes
2answers
957 views

L-Systems and TikZ [closed]

I'm trying to use L-Systems in LaTeX, but the following minimal example exits with an error: \documentclass[a4paper, pdftex]{book} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw ...
2
votes
2answers
3k views

How to use PDFlatex with Tikz package?

I have to make a presentation run by PDFlatex. But I want to draw a picture in it with the Tikz package. How can I manage this?
6
votes
1answer
1k views

Example on how to use pgfkeys and pgfopts for class or package

Is there a tutorial on how to create a package or class with pgfkeys/pgfopts that goes beyond this pdf? keyval.pdf In particular I would be interested on how I can create package/class options and ...
8
votes
5answers
1k views

Seamless background of subfigure bodies, but not captions

I have 3 sub-figures: \begin{figure} \subfloat[Apple]{ \includegraphics{apple} } \subfloat[Orange]{ \includegraphics{orange} } \subfloat[Cherry]{ ...
6
votes
1answer
2k views

Text in corner of tikz rectangle

How do I write some text in the bottom-right hand corner of a rectangle so that the text is as far to the right and down as possible without exceeding the bounds of the rectangle? The rectangle is ...
8
votes
2answers
2k views

PS-or-PDF to tikz converter?

It is often the case that a postscript or PDF image used in a math paper consists mainly of a few lines and bezier curves. If there were an easy way to extract this information and convert it into ...
11
votes
3answers
4k views

Using LaTeX to draw time series graphs and histograms

I have some graphs I drew in maple, some simple line plots and histograms. Now I'd like to redraw these graphs in LaTeX, so I can do fancy stuff in beamer like have one histogram appear, and then ...
15
votes
5answers
6k views

How to make a 3 level deep tree with tikz

I am busy making a full binary tree of three levels deep. The code I am having now is (using the trees library): \begin{tikzpicture} \node {root} child {node {left} child {node {lleft}} ...
13
votes
1answer
2k views

Add a legend title to the legend box with pgfplots?

I am using the awesome pgfplots package to draw some plots. I usually use \addlegendentry and get a nice default legend box. There are some options for legend box placement and layout (e.g. number of ...
4
votes
1answer
372 views

Placement of tokens in tikz/petri

Is there some easy trick to make \node[place,tokens=3]{} place 3 tokens in a row (and not in a triangle)?
7
votes
2answers
668 views

Tikz: Labeling objects and referencing them

According to the Tikz manual I can use "name=" to assign a label to the drawings, but when I do the following: \begin{tikzpicture} \draw [ blue, thick, name=e1] (10pt,10pt) ellipse (50pt and ...
7
votes
2answers
747 views

Animated scrolling marquee across an entire page.

I would like to have a scrolling marquee across the entire width of a page. I am intending this for a Beamer presentation, but the solution doesn't necessarily have anything to do with beamer. I ...
11
votes
4answers
3k views

Why is this let expression not working in TikZ (calculating a midpoint)?

I have a rectangle in TikZ and the top left and bottom right corners are called (topleft) and (bottomright) respectively. I wanted to have a label midway down the left hand side of the rectangle, so I ...
10
votes
1answer
551 views

Resulting document size when Including a graphics file multiple times - pgf vs. graphicx

In his answer to the question Tikz: using external images as building blocks. Stefan Kottwitz says: The pgf way may be preferred if the document size matters and graphics are multiply used or if ...
33
votes
1answer
12k views

Tikz: using external images as building blocks.

I would like to create a custom vector drawing in Inkscape and then use it many times in many tikz pictures. Is it possible? Should I use PDF or SVG or other output from Inkscape? How to use external ...
9
votes
2answers
4k views

Drawing a curve with TikZ

I want to draw something like this using TikZ: I can probably make the curve using controls but that wouldn't allow me to draw the points on it.
56
votes
5answers
32k views

How to install a current version of TikZ?

TikZ is undergoing lots of development with new features being added, but the versions distributed with standard TeX releases are often a little old. How do I get the latest version? If I want to be ...
4
votes
1answer
458 views

Tikz and enlarging part of the draw. [closed]

I plotted a number of curves on the same figure using tikzpicture. but i am having a problem with enlarging part of the curves on the same figure. I searched for that and i found something similar on ...
38
votes
4answers
2k views

Using TikZ in journal articles

I had not been aware of Tikz before joining this site, but am impressed with what it appears to be able to accomplish. Before I jump in and start learning all about it though, I wanted to see if ...
16
votes
3answers
3k views

Is there a way to tune ball shading in TikZ ?

I want to create a Go stone in TikZ. "ball color" option in node style is almost OK. Here is my result: But I don't like the stones, they are "too balish". The "reflection" should be less spot-on ...
24
votes
4answers
2k views

How to draw triangular grid in TikZ?

Is there an easy way to draw a triangular grid in TikZ, like this?
1
vote
1answer
669 views

Tikz: Strange color change. [duplicate]

Possible Duplicate: Using opacity in TikZ causes strange rendering in Acrobat. This is a nice pice of TikZ for typesetting Go boards (gobans). \documentclass{standalone} \usepackage{tikz} ...
11
votes
2answers
1k views

Undocumented useful commands in Tikz

\tikzstyle{...}=[...] This command seems to be extremely useful since it allows to re-use the same style in multiple TikZ pictures. Is is used in a few places in TikZ manual (pgfmanual.pdf), but ...
12
votes
4answers
2k views

Checkers board in TikZ.

What is the best way to draw checker board in tikz? I'm interested in what is the best way to draw many circular pieces on board. (the checker background is not important)
4
votes
1answer
2k views

Tikz: How to encapsulate shade in node?

I have this shaded circle: \shade [ball color=black!80!white] (0,0) circle (1); Is it possible to encapsulate it with node style? Including fixing circle radius?