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)

10
votes
1answer
3k views

Controlling the amplitude of the snake function in TikZ

I have been using TikZ with some success, but I can't figure out why the following code doesn't produce anything: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} ...
23
votes
2answers
1k views

naming paths inside a TikZ foreach loop

Is it possible to create named paths inside a foreach loop with the name depending on the counter? I want to write something like \documentclass{article} \usepackage{tikz} ...
2
votes
2answers
209 views

How can I make RHEL server libraries compatible with tex/Rnw documents created on my Ubuntu desktop, re: pgf, tikz, expl3

I want to compile tex and Sweave documents written on a server that is redhat, but I get errors linked to pgf/tikz. The documents compile fine on my I have already used wget to download the expl3 ...
11
votes
2answers
5k views

Path From and To Same Node in tikz Flowchart

I'm working on creating flowcharts directly inside LaTeX documents using tikz. I am admittedly an extreme novice with tikz, although I have quite a bit of experience using LaTeX. My problem is when ...
7
votes
1answer
1k views

Fading a path in TikZ

I want to draw a path/plot in TikZ whose shade depends on the coordinate. For example, I want say something like \draw[color=black!\x] plot coordinates{ coord1 ... coord100}; i.e. the shade of the ...
17
votes
3answers
1k views

TikZ: “skipping” levels when drawing trees

I'm interested in using TikZ to draw rooted trees whose leaves should all be on the same level, pretty much like this: Please don't pay attention to the fancy style and colours, I'm only interested ...
12
votes
4answers
2k views

Aligning an enumeration item to the top of a tikzpicture

I've drawn a tree using pgf/tikz and am trying to place it in an enumerated list. A snippet of my complete code is as follows: \subsection*{Problem 2} \begin{enumerate}[1)] \item Max heap \item ...
15
votes
2answers
2k views

Placement of arrowtips with TikZ’s markings

With the decoration library it is possible to place arrow tips at arbitrary positions along a path. TikZ places the front end of the arrow at the specified position, which is often exactly what one ...
16
votes
4answers
1k views

Tikzpicture on every page

How can I include a tikzpicture on every page? I would like to create a complicated document template (page should be framed, and have a table to hold document information both in the header and ...
18
votes
1answer
997 views

Is it possible to clear tikz/pgf options?

According to the pgfmanual, setting options on a clipping path is Not Allowed, so \clip[fill=red] (0,0) circle (1); doesn't work. That's all very well, and the above is certainly avoidable. ...
9
votes
2answers
5k views

PGF/TikZ and Sans Serif Fonts

I have a TikZ/PGF file created directly by a graphing package of the form \begin{tikzpicture}{dimensions} ... \end{tikzpicture}. The file uses \pgftext[...]{\selectfont{Some text here or ...
12
votes
6answers
6k views

A good tool to make electronic schematics and export them vectorially?

I have to make a relative simple diagram and import it to latex vectorially. What would you recommend me to do this? This question might not be best asked here, but I suspect a lot of you have ...
2
votes
1answer
279 views

Does \pgflowlevel{\pgftransformscale{}} do the same as normal tikz scale?

I am wondering the following. Somebody made a complicated tikz figure (our university logo). Now I am having troubles, because the width and height latex is reporting are not the 'real' width and ...
11
votes
4answers
3k views

Fitting a list of points with TikZ and its \foreach

I have a list of N points (e.g. {(0,0),(42,7),...,(0,1)}). I want to use them as coordinates in TikZ, to draw some things. And I would like to fit them into a node (using TikZ's fit module (cf. ...
9
votes
2answers
980 views

How to use the results of `raw output` to create a smooth plot

As by my previous question on plotting an implicit curve I've got some output. But as you can see it is not quite what it should be (apart from your browser's downscaling by a factor 2 of course. ...
14
votes
3answers
3k views

Plotting an implicit function using TikZ

How could one plot an implicit function, like (x^2+y^2)^3-4x^2y^2 using TikZ? I know gnuplot supports them, but they are drawn using a surface built from the function and intersecting the result with ...
7
votes
3answers
674 views

Why do I have so much free space on the left-hand side of my tikz diagram?

Inspired by http://tex.stackexchange.com/questions/3892/ I created my own snake like diagram (see below). The entries are rather large and the figure thus too wide. My question is: Why does the ...
11
votes
2answers
8k views

Tikz/Pgf if statements

I'm having trouble writing if statements, I can find next to no documentation on them and what I want to do seems quite simple. I'm using the orbitals pgf/tikz example from here, and I'd like to ...
6
votes
2answers
3k views

How can I upgrade to pgf 2.10

http://sourceforge.net/projects/pgf/ shows that 2 days ago (25 Oct 2010) version 2.10 of PGF (Tikz) is released. I am currently using texlive 2010. Will pgf 2.10 come in texlive 2010, or do I have to ...
6
votes
1answer
610 views

What is new in pgf 2.10

http://sourceforge.net/projects/pgf/ shows that 2 days ago (25 Oct 2010) version 2.10 of PGF (Tikz) is released. What are new functionalities in this version? (not bugfixes, but features)
18
votes
5answers
3k views

Is it possible to reuse a part of a tikz image

I have a part of my plot that I want to repeat several times. To be exact, the part I want to replicate is: \draw[yscale=2.0,yshift=-3,xscale=0.1,domain=0:10] plot[id=gauss1] ...
3
votes
1answer
783 views

Why does my loop not show?

I have a big picture made, but I can't get my nodes to get a loop (an arrow to itself). My code: \begin{tikzpicture} \matrix (mat) [matrix of nodes] { |[draw,circle]|$(0)$ &[10mm] ...
21
votes
2answers
2k views

TikZ: multiple decorations on a path.

I would like to draw a squiggly line with an arrow somewhere in the middle of it. TikZ has a pathmorphing decoration that draws a squiggly line and a markings decoration to place an arrow tip. So a ...
81
votes
3answers
39k views

Correctly scaling a tikzpicture

I was wondering which is the correct way to scale a tikzpicture. I tried with \begin{tikzpicture}[scale=0.50] but what I obtain is that distances between elements are scaled but not their sizes or ...
23
votes
2answers
2k views

Getting a tikz picture to have an equation number

I make a lot of commutative diagrams and am trying to switch to Tikz from amcd,diagrams, etc. I often have to refer to these diagrams in the text and would rather have them as equations (i.e. with and ...
3
votes
1answer
573 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 ...
12
votes
5answers
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. ...
15
votes
1answer
17k 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
5k 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 ...
14
votes
1answer
3k 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
921 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 ...
4
votes
1answer
215 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, ...
40
votes
4answers
6k 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 ...
8
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
894 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
435 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
873 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
9k 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$}; ...
17
votes
8answers
7k 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
594 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 ...
19
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
308 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
3k 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} ...
18
votes
2answers
4k 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
507 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 ...
47
votes
6answers
18k 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
631 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
670 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 ...