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)

2
votes
1answer
737 views

Excess whitespace around edges with distance style attribute

When using the distance style attribute on edges, for example, \tikzstyle{flowloop} = [out=-150, in=-30, looseness=0.8, loop, distance=7*\limw] or \tikzstyle{flowloop} = ...
1
vote
1answer
1k views

Split node padding when using `align` in TikZ

Consider the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,positioning,fit} \begin{document} \begin{tikzpicture} \node[draw, rectangle split, rectangle split ...
9
votes
2answers
599 views

automatic resizing of edges with long labels

I would like to know if there is a way to automatically resize edges when they have long labels. For example, the following code \documentclass[10pt]{article} \usepackage{tikz} ...
7
votes
3answers
563 views

Define Macros depending on argument

I'd like to draw some linear Systems with tikz. The problem is the orientation of the Systems. Some have input on left - output on right input on right - output on left input above - output below ...
12
votes
5answers
5k views

Diagonal strikeout starting too low and ending too high

I want to strikeout an equation with diagonal line but I've not managed to get the diagonal line to draw as I want. The closest I've gotten is via the first example in Frédéric's answer of \cancel ...
4
votes
0answers
880 views

Drawing tri-axial ellipsoid and intersecting it with a sphere [closed]

I would like to draw a tri-axial ellipsoid (that is, an ellipsoid with three different main axes). I'd also like to draw a sphere in the same picture, showing the curves of intersection between the ...
3
votes
1answer
189 views

Linking text nodes in a page

I'd like to know what package can link nodes in different parts of a page. To simplify my question I uploaded an example extracted of tkz-linknodes manual (AlterMundus). Please note that the page ...
12
votes
3answers
3k views

Horizontal row separation line in tikz matrix (like \hline in tabular)

In this question tikz-matrix-as-a-replacement-for-tabular a nice solution was given to let the matrix in tikz behave like tabular. In this solution cell/.style={rectangle} was used to draw lines ...
9
votes
4answers
3k views

beamer & TikZ: gradually unveil trees

Imagine a simple tree: \begin{tikzpicture} \node {Selbstregulation} [edge from parent fork down] child {node {Kognition}} child {node {Metakognition} child {node {Planung}} ...
5
votes
1answer
880 views

Line with transparence changing with TikZ

I'd like to have a colored line that starts with transparent 100 and ends with trasparent, let's say, 30. I tried this code: \documentclass{standalone} \usepackage{tikz} ...
5
votes
3answers
906 views

Non-vertically-centered TikZ matrix of nodes cell content

How can you make the matrix cell contents aligned to the top? I am using plain format with XeTeX. \input tikz \usetikzlibrary{matrix} $$\hbox{I'd like for the cells to be top-aligned}\cases{ ...
4
votes
2answers
815 views

TikZ: arrange trees block by block

I use TikZ to create trees. Now I've to arrange four trees in a matrix like this: Tree A Tree B Tree C Tree D I already tried the \matrix command. This works, but it leaves absolutely no space ...
3
votes
1answer
1k views

PGF/TikZ error when using chains

I'm trying to learn how to use PGF/TikZ to draw pictures, in particular a chain of nodes. I have the following picture: \begin{tikzpicture}[start chain, node distance=5mm] \node [on chain,join] ...
16
votes
3answers
2k views

Drawing different tikz shapes parameterized by data from a file

I have a file with three columns of data, x, y, r. # x y r 1 1 0.1 2 2 0.5 3 3 1.2 and so on. I'd like to loop over the rows, and draw a circle at x,y with radius r for each row. I first thought ...
1
vote
4answers
973 views

Help with figures in TikZ

How can we make Figures 1 and 2 below with TikZ and LaTeX? In Figure 2, I want to give different colors to different quadrants.
7
votes
2answers
1k views

Draw a longitudinal wave in TikZ

I'm trying to obtain this longitudinal wave with TikZ: Here's my code \documentclass{article} \usepackage{tikz} \begin{document} \usetikzlibrary{decorations.pathmorphing} ...
7
votes
1answer
2k views

Abbreviated month names as tick labels in PGFplots

How can I modify the following example from PGFplots package to have the x-axis represent months and labelled as JAN, FEB, MAR etc.? \begin{tikzpicture} \begin{axis}[ smooth, ...
31
votes
2answers
4k views

“Z-level” in TikZ

This is an idle question, but neverthless, I think it's interesting. Does TikZ have a simple way to implement a "z-level" specification. By this, I don't mean 3D drawing, I mean specifying which ...
6
votes
2answers
1k views

xyz coordinates rotation

is it possible to set a different orthonormal base for the xyz coordinate space? for example, the default one is x=(1,0,0) y=(0,1,0) and z=(0,0,1). I would want to set this base: x=(1,0,0) y=(0,0,1) ...
2
votes
1answer
480 views

Conflict between mindmap and tikz-qtree

I have some trouble trying to put a mindmap graph and a tikz-qtree graph together in the same document. With the example below, the mindmap is all scrunched up. But if you comment out the ...
6
votes
3answers
3k views

Using TikZ, how do I draw a box having an adjustable width?

I want to box text using TikZ and adjust the box width such that the text is appropriately put on different lines within the box. I also want the text on each to be centered within the box. As this is ...
5
votes
2answers
1k views

Looking for an example of an OLAP cube with dimensions drawn in TikZ

I am looking for an example of a TikZ picture of an OLAP cube with dimension hierarchy. More-less something like this cube: I know how to draw a cube based on What is the easiest way to draw 3D ...
6
votes
1answer
2k views

newcommand containing tikz node

I am using tikz-qtree to draw a binary tree. As I need to have them labeled I wanted to ues the following macro which work in ordinary tikz: \newcommand{\A}[1]{\node(a#1){Activity #1};} However, ...
4
votes
1answer
488 views

pgfmath expansion - call a command from within a pgfmath environment

I am trying to define a newcommand using pgfmath. This commands calls a previously defined command but it fails. It propably has to do something with expansion. I've read this question about ...
10
votes
1answer
2k views

How do I put loops at an angle in TikZ?

I'm trying to draw a graph in TikZ that has self-loops, and I'd like to be able to specify their position not only as "right" or "above", but something like "above right", i.e. at a 45° angle. How do ...
5
votes
1answer
265 views

Unit-free ratios in \path let

I want to compute pure ratios of distances in a \path let construction; for example, in the document fragment \path let \p1 = (1cm, 2cm), \n1 = {\y1 / \x1} in ... I would like \n1 to be the number ...
13
votes
2answers
2k views

Using brackets as delimiters for matrix in TikZ-PGF Matrix Library

The TikZ-PGF manual is clear that for the matrix library, the delimiters are parentheses and braces: Delimiters are parentheses or braces to the left and right of a formula or a matrix. I ...
3
votes
1answer
192 views

Create B-Lymphocyte picture

I would like to create B-Lymphocyte picture (antigen) and i would like to know if someone could give me a start point (e.g. online examples, etc.). Here are some examples of what i would like to ...
2
votes
0answers
130 views

Is there an easy way to make bifurcating/converging edges in TikZ? [duplicate]

Possible Duplicate: Using relative coordinates in TikZ to draw joined curves The problem This problem is thematically related to this question, in fact, I was going to ask roughly the same ...
2
votes
3answers
655 views

Length, surface, and coordinates of a tikz-pgf path

I need to perform computations on the points that belong to a tikz-pgf path. More specifically, I want to know how many points have a y coordinate exceeding a given value, and I want to calculate ...
2
votes
3answers
1k views

pgf macro that returns a node

How can I write a macro that returns a coordinate (or a node). The node must be usable within a tikzpicture environment and preferably inside a path declaration. I need something like the following ...
6
votes
1answer
629 views

What one CANNOT do with TikZ?

I am about to give a short introduction to TikZ, and I was asked to add a slide of what cannot be achieved with TikZ. So, are there certain types/categories of graphics where one should use something ...
7
votes
1answer
2k views

How to make (1,1) mean (1cm,1cm) in TikZ? (Setting the units of coordinates)

I have a picture in TikZ and I'd like to change the basic units of the coordinates I specify. I know I could just scale the picture, but I don't want to do that. For any given coordinate, I can write ...
2
votes
4answers
371 views

Debugging pgf-math

Just learned about pgfmath, but how can I debug it? \pgfmathparse{..} \pgfmathresult doesn't print anything inside a tikzpicture environment. How can I simply print the result of an expression to ...
15
votes
3answers
3k views

TikZ Drawing a changing vector field in a grid

So far I succeeded in drawing a simple grid along with it's centres using grid and nodes. \draw[step=1] (0, 0) grid (4, 3); \coordinate (a) at (0.4, 0.3); \coordinate (b) at (3.8, 0.8); ...
0
votes
3answers
321 views

Help drawing a figure with pgf

Here's an image of what I am trying to draw:
5
votes
1answer
1k views

Drawing a bijective map with TiKz

I am trying to produce a diagram similar to the following (from Wikipedia) in TiKz. Now, I thought this would be relatively simple, however, I am having trouble getting the elements (the dots) to ...
5
votes
1answer
3k views

Draw a plane in space and a coordinate system using tikz

Suppose I have a plane $E: a*x_1 + b*x_2 + c*x_3 = d$ (a,..,d should be concrete numbers) in space and a point P. Is there a way to draw a 3-d coordinate system, E, P and perpendicular line to E ...
9
votes
2answers
11k views

Missing number, treated as zero

A follow-up question to this one Aligning subcaptions with tikz pictures vertically This is the code I am using, worked to a pretty minimal scenario: \documentclass{article} \usepackage{float, ...
3
votes
1answer
2k views

Example of system architecture picture in TikZ

I am looking for an example of a system architecture diagram in TikZ. I would like to draw a picture similar to this one: Therefore I search for existing shapes for: cloud (Current State), database ...
8
votes
3answers
2k views

Is there any easy way to draw a ruled surface like a hyperbolic paraboloid in TikZ?

At the risk of asking YET ANOTHER TIKZ question on a general TeX forum :), I was wondering if there was any easy way to draw a ruled surface like a hyperbolic paraboloid in TikZ? I'm not particular ...
12
votes
2answers
2k views

Optimising TikZ pictures for greyscale printing

I often use colours in my TikZ pictures. Are there simple ways to make versions of these that will come out looking good if I print them on a B&W printer? For example, say I have some filled ...
4
votes
1answer
1k views

Draw shifted plots from the same data

I need to draw a shifted plot from a data table (or a external file) without edit table coordinates. Using the shift={(x,y)} option works but x and y are not related to the axis coordinates s and f. ...
47
votes
1answer
3k views

AucTeX extension for TikZ

Is there an AucTeX extension which supports the TikZ syntax and that one of the tkz-collection as well? In particular I want thinks like: syntax highlighting proper indentation that ...
5
votes
3answers
1k views

Probability tree using TikZ for Bernoulli experiments?

Consider the tree below. Is there an easy way to label every left edge q, every right edge p, every left node f and every right node r, without doing it manually for every level? Second question: Is ...
8
votes
1answer
468 views

How to make multiple lines precisely converge in one point on an axis?

I am trying to produce a sequence/time diagram showing the synchronisation process of a master and slave in the Precision Time Protocol using TikZ. Being very new to TikZ I don't know much more than ...
6
votes
1answer
838 views

Aligning subcaptions with tikz pictures vertically

A simple follow-up question to this one How to place and scale TikZ pictures in subfigure? I shamelessly copied the same code that was presented in the answer there because it fits my needs exactly as ...
25
votes
1answer
4k views

How to customize the table of contents using TikZ?

Are you aware of tentatives to customize the table of contents with TikZ? I am thinking of fancy graphical objects (coloured ovals, squares, rectangles...) coming with "chapter" or the numbering, for ...
8
votes
1answer
821 views

Parameters for newly-defined shapes

I want to declare a new shape in TikZ using \pgfdeclareshape. This shape will be formed from several parts, but often, when invoking the shape, I won't want all of the parts displayed. It would be ...
10
votes
3answers
7k views

Problem with TikZ and vertical alignment of text inside nodes

I have a problem in TikZ with the vertical alignment of text inside nodes. With a very minimal example like this: \usetikzlibrary{arrows,positioning,shapes.geometric} \begin{tikzpicture}[% ->, ...