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
2answers
1k views

PGF doesn't work under Ubuntu 11.10

I updated my Ubuntu to the newest version 11.10 recently. Today when I use PGF again, i find many of my old examples cannot compile. It always give the error information as: ! Package PGF Math Error: ...
5
votes
3answers
2k views

Pascal's triangle in LaTeX, with pointing arrows [duplicate]

Possible Duplicate: Pascal's triangle in tikz I tried making this in a tabular, and it sort of worked. But I was not able to insert any arrows. Is there any simple way to make the image ...
7
votes
3answers
1k views

Write inside divided circle

At this address Label Points in a circle in tikz you can see the code to divide a circle into x cells. How to write a phrase into each cell of the divided circle?
3
votes
1answer
1k views

Undefined Control Sequence due to TikZ-Tokens

I have a question concerning this minimal example: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{petri} \begin{document} \begin{tikzpicture} \node[place, tokens=2] (p) {}; ...
3
votes
1answer
573 views

Natural deduction (or similar) as TikZ tree

I'm wondering if it's possible to make TikZ trees render in a way similar to natural deduction (proof) trees. Specifically I would like a tree which, rather than edges from parent to child, has lines ...
3
votes
2answers
1k views

Combine shorten and bend option in TikZ

Is there a way to combine the bend left and shorten option to make an arc shorter while keeping its shape otherwise? i.e., when I do \begin{tikzpicture} \node[] (n1) at (0,0) {1}; \node[] (n2) at ...
14
votes
1answer
3k views

Dynamic radius for rounded corners

When using rounded corners, I sometimes specify a radius that looks great for most corners in the path, but a couple of points are too close together, so that I get ugly artifacts. I'd like to be able ...
6
votes
1answer
2k views

Externalising TikZ pictures using XeTeX

I'm trying to use TikZ's external library with XeTeX, for example, and I'm running into some issues. Having set external/system call={xelatex \tikzexternalcheckshellescape -halt-on-error ...
8
votes
3answers
3k views

Print integer without fraction part

In a Tikz Figure, I'm doing some computation and want to print results as label of nodes. The problem is that I only need the integer part of the number to print. I tried with round() function. It ...
5
votes
1answer
813 views

Bounding box vs. xshift

The xshift in the following figure breaks the bounding box: \documentclass{article} \usepackage{tikz} \usetikzlibrary{scopes} \usetikzlibrary{chains} \usetikzlibrary{backgrounds} % used only for ...
23
votes
1answer
956 views

Chinese checkers board using TikZ

A question regarding drawing checkers pieces and boards using TikZ has been asked here previously and I'm aware of the chessboard package. However I want to draw a Chinese checkers board: I want ...
25
votes
3answers
2k views

Modify TikZ coil decoration

Can I modify the existing tikz coil decoration, so that the downstrokes are not drawn in a certain interval, to produce a picture like this? Edit: Previous attempts, code and MWE has been moved to ...
1
vote
1answer
710 views

tikz color changing path

I have tried to answer the question from TikZ: changing colour of a path half way along with decorations - unsuccessfully. Maybe it is not possible!? Can someone tell me why scoped path color change ...
8
votes
1answer
609 views

tikz/eso-pic watermark isn't transparent on the first page

I'm seeing odd behavior when trying to use a watermark with tikz and eso-pic. Here is my example document: \documentclass[10pt]{article} \usepackage{eso-pic} \usepackage{tikz} ...
6
votes
1answer
2k views

How do I make a figure that spans a spread of two pages? [duplicate]

Possible Duplicate: How to include a picture over two pages, left part on left side, right on right (for books)? I have a huge TikZ graphic inside a figure environment. I would like it to ...
5
votes
1answer
223 views

Scaling isn't affecting a diagram made with the tqft package

I'm trying to make a drawing, part of which will use Andrew Stacey's tqft package. However, everything his package produces seems to be immune from scaling. For example, the following code is my ...
12
votes
3answers
3k views

'Standalone' TikZ pictures

I want to create a TikZ picture in an external PDF file, which then can be included in my main document via \includegraphics. However, compiling a document with a TikZ picture in it produces a whole ...
21
votes
1answer
2k views

Braid diagrams in TikZ

This question led to a new package: spath3 (Technically, this question led to a subpackage of the spath3 package; the spath3 package provides some foundations on which a TikZ library knots ...
1
vote
1answer
315 views

Tkz-berge does not respond to node-distance specification

I'm having some issues with the latest version of the tkz-berge package: it seems to be ignoring node-distance specifications. If I compile this file (using example n. 39 from the tkz-berge ...
20
votes
2answers
5k views

Drawing a circle on a non xy-plane with TikZ

Say I'm drawing a 3D picture. Now I would like to draw a circle, perspectively correct, on the yz-plane, but TikZ does not seem to be capable of this. All one can do is drawing circles on the ...
8
votes
3answers
2k views

Label Points in a circle in tikz

Consider the slight modification of the construction from the solution to this question: Variables and basic arithmetics and tikz-euclide \documentclass{minimal} \usepackage{tkz-euclide} ...
1
vote
0answers
132 views

How to use trigonometric functions in tikz coordinates [duplicate]

Possible Duplicate: Problems with TikZ calculations I am trying to get the following arrows to get lengths defined by a trigonometric function, in this case cos. This was my attempt, but it ...
8
votes
2answers
2k views

Circuitikz doesn't recognize units

For example when I use \ohm or \micro it throws an error. For example, in the MWE: \documentclass{article} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw (0,0) to ...
1
vote
1answer
506 views

Math formula changes in tikz environment

I am trying to write a formula in a tikzpicture but it gets changed. The indices for the cumulative product is moved from under the \prod to after. See MWE: \documentclass{beamer} \usepackage{tikz} ...
5
votes
1answer
469 views

Keep column height in Beamer when replacing content

I have a frame in Beamer that consists of two columns. The content of one column remains the same, the content of the other column is replaced on the second slide. \begin{frame} \begin{columns} ...
7
votes
1answer
531 views

Tikz: redefinition of patterns

I save my TikZ figures in separate files containing all the necessary definitions, so it's easy to reuse them. In some cases I defined a new pattern, e.g. by \pgfdeclarepatternformonly{wide ...
17
votes
4answers
521 views

Conflict: onlyamsmath and TikZ

To force myself and collaborators to only use AMS-Math commands, I laod this package in the preamble: \usepackage[all,warning]{onlyamsmath} However, when this is combined with TikZ, I get into ...
23
votes
2answers
7k views

Problems with TikZ calculations

When can I use functions and do calculations in TikZ? How do I make this work: \draw (0,0) arc(0:90:sqrt(15)); %not ok why is this working: \draw (0,0) arc(0:asin(1):5); %ok with ...
3
votes
2answers
1k views

How to make two rectangles top adjusted horizontally in TiKZ?

I have 2 rectangles and an operator between them, the one on the right is longer than the one on the left: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} ...
19
votes
2answers
6k views

Is plotting exponential graphs a known source of bugs in TikZ?

I want to plot $y = 2^x$ over a small domain. Unfortunately, even though tikz (v 2.1) seems to be able to calculate 2^{negative numbers} it is not plotting them correctly. My minimal example is: ...
7
votes
1answer
1k views

Using \evaluate in nested \foreach loops with TikZ

I would like to draw two grids side by side using TikZ; the left one being a complete square grid, and the right one being a lower-triangular one. I tried writing the following code to make the ...
4
votes
1answer
2k views

How to add a condition in \tikzset?

I am trying to make some modification on the answer of Andrew Stacey of my previous question "A macro of drawing a rectangle with several parameters in TikZ". The current code is the following: ...
3
votes
1answer
4k views

How to install PGF 2.10 in Ubuntu? [duplicate]

Possible Duplicate: How to install a current version of TikZ? I have got PGF 2.00 installed, and I would like to upgrade it to 2.10. sudo apt-get install pgf still installs 2.00 under my ...
29
votes
2answers
5k views

Draw a bivariate normal distribution in TikZ

For a small class I want to draw a bivariate normal distribution and show where the means from the two variables meet in the space. Has anyone done this in TikZ?
6
votes
2answers
779 views

How to raise a generic curve. Problem with \pgfdeclaredecoration

The goal I want to obtain is to have a parallel curve to a generic curve defined in a \draw command trough TikZ. To achieve it, I used the TikZ decorations library and the command ...
9
votes
1answer
564 views

Using pgfplots with a0poster

I want to use tikz/pgf to plot some graphs in a poster done with a0poster. That is the code: \begin{tikzpicture} \begin{axis}[xlabel=lambda, ylabel=int] \addplot[blue] table [mark=none, col ...
1
vote
1answer
582 views

Inserting the \markangle on tkz-euclide 1.16c

How do i insert \markangle in tkz-euclid 1.16c? \documentclass{article} \usepackage{tikz} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{5pt} ...
10
votes
1answer
1k views

How to generate templates for charts

Most of us create charts that have to be repeated a number of times with only the data varying. Applying DRY (do not repeat yourself) programming principles to such problems is not an easy task. To ...
8
votes
2answers
3k views

Unable to create multiple timelines using chronology.sty

I wanted to create a document that contains multiple timelines on one page. I am using chronology.sty, which uses TikZ, to accomplish this. However, I get an error when I try to create more than one ...
48
votes
2answers
10k views

Drawing simple 3D cylinders in TikZ

I'm trying to draw some simple 3D objects in TikZ. I can do spheres and cuboids okay, but I'm struggling with circular cylinders: When rotating the scene (I use tikz-3dplot for this), the end faces ...
3
votes
2answers
565 views

includegraphics[page=\pageref… possible? how to set [page=] to a variable?

I'm currently writing a quite complex document with a lot of graphics created using TikZ. Hence I decided to put all graphics into one big file called tikz.tex creating a multiple page PDF with one ...
8
votes
2answers
1k views

How do I cancel/strike out a line?

I have drawn a long line with an arrow from one node to another. How do I strike out or cancel that line? What I want is something similar to how \not cancels \to in A \not\to B, e.g. Here's what I ...
13
votes
3answers
7k views

TikZ: Intersection of two lines

what is the easiest way to determine the intersection of two lines? I tried \usetikzlibrary{intersections} \begin{tikzpicture}[every node/.style={black,above right}] \draw[name path=line 1] (0,0) -- ...
6
votes
2answers
1k views

partially filled, tilted cylinder in TikZ [closed]

I have a diagram I'd like to reproduce in TikZ: Picture a can (cylinder of radius r and height L) that has liquid in it. In each diagram, the can is tilted so that the surface of the liquid just ...
4
votes
1answer
1k views

Different backgrounds for title and “normal” frames in beamer

I want to draw different backgrounds for the title frame and normal frames in beamer, using tikz. Doing this for the normal frames was straight forward, but that background now also shows up on the ...
7
votes
3answers
11k views

TikZ: position with different anchors

I would like to label lines at the same midway horizontal position (pos=0.5). But as the second line is tilted, the labels lower left corner should touch the line. Hence, I would need to manually ...
4
votes
2answers
1k views

Line break in datapoint label with pgfplot?

I have a bar chart, with labels for each column. I would like to break these labels over two lines. I'm not using nodes so the "align" trick doesn't seem to apply. Minimal example: (from Lyx) ...
6
votes
2answers
625 views

Wraparound of tikz pictures in twocolumn layout

I am currently typesetting a document in a two column layout. Many text blocks are put into colored boxes, currently implemented with TikZ. This works; however, I have to split the text blocks ...
8
votes
2answers
704 views

How to maintain the ratio between two axis in pgfplots

I have two axis environments both containing different plots. I do however want to maintain comparability between both, i.e. I want both plots to consume the same space on the paper for a coordinate ...
7
votes
1answer
926 views

Change TikZ's default coordinate system

In the TikZ manual I read that the default coordinate system's spacing is 1cm, so that (1,1) would be a vector going 1cm in x-direction and 1cm in y. In a diagram with a lot of nodes, that I am ...