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)

13
votes
2answers
502 views

How to turn off an environment (e.g. tikzpicture) for faster draft compiling

I'm currently writing my thesis and have been looking for ways to speed up compile time. I can shave off a lot of time by using draft mode so that images aren't processed, but I have several TikZ ...
13
votes
3answers
618 views

Repeated division - Converting from base 10 to another base

I am teaching how to convert from one base to another base, however, I can't find a way to do something like this: I know little about Tikz, the only thing I have been able to produce is a simple ...
11
votes
5answers
5k views

Commutative Diagrams and TikZ

I wish I knew how to draw the this commutative diagram with the TikZ package. I would also like to know how to put subtitles in the diagram.
16
votes
2answers
2k views

How to align a series of TikZ pictures at the baseline

I am trying to align a series of pictures made up of letters, using TikZ. Having tried almost all combinations of the baseline key it is obvious I am missing something. Here is a MWE (currently ...
14
votes
2answers
7k views

Easiest way to plot a function with PGF/TikZ

I am new to TikZ and/or PGF (whatever the difference is :/), as you can see. Anyway, I need to draw the graph of the equation x^(2/3) + y^(2/3) = a^(2/3), where a = 2. Any suggestions? Here is what I ...
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 ...
11
votes
2answers
2k views

Coordinates of intersections

In axis environment I have a curve and a line intersecting it. How can I get components of intersection-1, intersection-2 etc. in axis units? \documentclass{minimal} \usepackage{pgfplots} ...
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 ...
17
votes
3answers
1k views

Using opacity in TikZ makes the entire page become “more coarse” when printed

In my document, some of the figures uses opacity. In the PDF viewer, everything looks fine, but when I print the document, the pages in which these figures appear become more "coarse"; the text looks ...
11
votes
2answers
488 views

List of Underlining Packages - Pros and Cons

The \underline macro built into LaTeX is pretty much not useable per Why does underlined text not get wrapped once it hits the end of a line ? I have been attempting to use the soul package to ...
9
votes
1answer
348 views

How to vertically center the \vdots in this node?

I'd like the \vdots in this chain to have the same distance to both of the arrows. I know that I could manually shift the node so that it looks right, but there must be a better solution. How? ...
8
votes
1answer
907 views

Computing value using pgfmath for use in coordinates?

Why can't I use the outcome of using pgfmath in a TikZ coordinate? Here is a (minimal) example that does not work: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} ...
8
votes
1answer
1k views

Dependent node size in TikZ

I'm producing some control theory flow sheets in TikZ where I have specified the node box size. Since I'm making a lot of these flow sheets, I have set global styles for them, for instance the box ...
8
votes
2answers
421 views

How to draw multiple Rectangles from input data file

I want to draw set of rectangles on axis based on input file. My .tex file should be some thing like that \documentclass{article} \usepackage{tikz,pgf} \usetikzlibrary{plotmarks} ...
8
votes
2answers
296 views

Writing specific versions of an operator for display and inline modes

I'm busy answering a question by constructing a new math operator that uses the sum symbol and some TikZ placed on top. My answer as it stands can be found here. It looks (I think) pretty good in ...
7
votes
2answers
366 views

Odd behaviour with arrows and multipart rectangles

I recently posted a question Display issues drawing DNA sequences with TikZ. The issues I described were for the most part resolved, but one remains. I managed to simplify my example down to show the ...
6
votes
2answers
585 views

Where in the world is tikzlibraryhobby.code.tex?

I was trying to reproduce Claudio Fiandrino's answer to How can we draw a Hannukah Menorah with decorations, using TikZ?. However, I do not have the hobby package by Andrew Stacey in my local ...
6
votes
1answer
878 views

meta arrow tips

Page 316 of the tikz-pfg manual describes meta arrow tips and says that usually we do not want to have the tip scaled the same way as the supporting line. Is there a way to keep this feature, ie, when ...
3
votes
2answers
243 views

Using htlatex with tikz-dependency

I am trying to generate an html file from a tex file using htlatex. The htlatex works well with simple tikz pictures, but it has problem with the pictures (trees) drawn with tikz-dependency package. ...
11
votes
2answers
616 views

Unexpected clash between babel and pgf spy

The following example taken from the pgfplots manual (p. 121) works fine only if the line loading babel is commented \documentclass{article} \usepackage[frenchb]{babel} % this is the troubelsome ...
5
votes
2answers
560 views

TikZ: Make node height span several others

How can I make the Z node span the total height of the ABCD column? My current code is: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,positioning} \begin{document} ...
5
votes
2answers
2k views

Drawing network protocols

I want to produce network protocols, a very simplified example of which is depicted below: The protocol has two parties, each of which does some computation and then communicated with the other. I ...
58
votes
2answers
2k views

Summary of Tikz commands

Many times, when I'm coding a tikz-picture, I don't remember the command syntax or the name of one option, and I have to look in pgf-manual is not very short. Does anybody has a summary of Tikz ...
75
votes
2answers
2k views

What are the new features in TikZ/pgf 3.0?

Since the December 20, 2013, we have new major release of the wonderful TikZ/pgf package: version 3.0.0! 1 Unfortunately, I was not able to find a nice human readable list of changes, that goes to ...
73
votes
11answers
8k views

What are the advantages of TikZ/PGF over PSTricks?

The first time I saw the PSTricks' 3D Galleries, I immediately felt in love with it. I have spent much time to learn and use it. In this forum, I see many people using TikZ. I have not used TikZ yet. ...
44
votes
3answers
6k views

Outsourcing TikZ code

My Tex files get very confusing since I have multiple long TikZ code in them. How do you organize your files when it comes to TikZ?
34
votes
1answer
14k 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 ...
27
votes
4answers
6k views

Script to automate externalizing TikZ graphics

Is there a script to automate externalizing TikZ graphics? (As suggested by Scott here)
34
votes
2answers
994 views

How to make a diagram composed of superimposed layers where the viewer can make each layer visible or invisible independently of the other layers?

This question led to a new package: ocgx (I have edited the question as ocgtools looks like it is the right package to use, rather than animate.) I am trying to use LaTeX with the TikZ package ...
12
votes
1answer
2k views

Headers and page numbers in external borders

I am trying to recreate in *TeX the same aspect that you can see in the following picture showing a document that I created a while ago with MS Publisher. As you can see, page numbers are rendered ...
27
votes
4answers
9k views

Node shapes in TikZ

I want to draw a block diagram for a software app and I need two shapes which I couldn't find on the Internet. The shapes are a parallelogram and a rectangle with double side margins. One is for data ...
22
votes
5answers
2k views

Lower and upper Riemann sums

I am trying to create a few images for educational purposes. Therefore I need to be able to illustrate the area under various functions, using lower and upper riemann sums (rectangles) Reason for not ...
15
votes
1answer
384 views

Is there a listings configuration for TikZ as used in PGF/TikZ manual?

I want to create a tutorial how to use TikZ now. Is there a listings configuration for TikZ as used in PGF/TikZ manual? For example, I want to make \ as an integral part of tikz in \tikz, relevant ...
24
votes
2answers
4k views

Rounded corners only at one side of a TikZ node

How can I make rounded corners at one side (only right, only left)? \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node [fill=gray, rounded corners=10pt]{ ...
15
votes
7answers
6k 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 ...
31
votes
4answers
2k views

tikz: Distribute evenly and randomly circles

I want to fill a part of a picture with more or less evenly and randomly distributed circles which should not overlap. It would be okay if circles are only partly inside the shape. The density should ...
31
votes
4answers
5k views

How to draw a shaded sphere?

Andrew Stacey pointed out that the Rosetta Code entry "Draw a Sphere" doesn't have a TikZ entry yet. Is there a way to draw a "properly" shaded sphere using TikZ? The ball shading would seem an ...
30
votes
2answers
6k views

How to diagonally divide a table cell … properly?

There have been many threads discussing solutions to the task of drawing a diagonal line in a table cell. There are also two packages to do this, slashbox and the better looking makecell with its ...
28
votes
2answers
2k views

How to draw Brownian motions in tikz/pgf

Here I want to draw some Brownian motions in tikz, like this: Furthermore, I want to truncate the trajectory of Brownian motion, like this: I have tried many times with random functions in tikz, ...
27
votes
1answer
890 views

How to add a regression line to randomly generated points using pgfplots in Tikz?

\documentclass{article} \usepackage{tikz} \usepackage{color} \usepackage[active,pdftex,tightpage]{preview} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} \begin{tikzpicture} ...
10
votes
2answers
546 views

Intersection of 2 lines not really connected in TikZ

In the code below I repeat one line (one with opacity=0 and other without it) in order to draw the intersection of 2 lines that are not connected. I am seeking a better way to achieve the same result. ...
18
votes
2answers
706 views

Modifying `*` and `o` style tikz arrows so that they are centered at the end of line

I would like to use tikz * and o arrows to indicate included/excluded endpoints in plots of piecewise functions, like for example the following one: However, it seems that tikz always aligns the ...
13
votes
1answer
854 views

Tikz: Shading a path without any filling

How can I shade a path witout filling? In particular, I wand to draw a curved arrow that starts colored blue and ends colored green, where in between it gradually changes its color. I can't find a way ...
13
votes
2answers
4k views

Automatically draw and labels angles of a triangle in TikZ

I'm using LaTeX with TikZ to create a (right-angle) triangle. Now I would like to label each angle by adding a half circle and a text label. Unfortunately I only managed to create a label for the ...
24
votes
1answer
4k views

Creating node shapes

I am currently learning how to use TikZ/PGF to make some figures for a project report, and so I have a question: Is there is a practical way of making a particular object into a node? The object ...
20
votes
2answers
973 views

How can I put a coloured outline around fraction lines?

I use the contour package to put thick white outlines around labels in graphs, so they remain readable above the grid lines without taking up too much space. Unfortunately, the package is not able to ...
18
votes
1answer
438 views

What are most important variables set at the beginning of a tikzpicture? of a scope?

I asked a lot of questions about nested tikzpicture environments and if I agree with Andrew and Martin that nesting TikZ pictures isn't a good idea, it's interesting to know why. I gave some examples ...
16
votes
2answers
1k views

Proper nesting of tikzpicture environments: Reset all PGF values to their defaults

Sometimes, nesting tikzpicture environments seems inevitable, e.g., if you want a node to contain a TikZ picture on its own. (Is it?) However, nesting tikzpicture environments is problematic, also ...
12
votes
1answer
2k views

plot within a plot: zoom into a plot so that the magnified part is framed by axis with ticks and tick labels

I want to zoom into a plot much like it is possible by using the spy library but I want the spy-in node to contain its own ticks and tick labels with a finer grid than the original plot. To clarify ...
12
votes
3answers
2k views

Use macro as coordinate in pgfplots plot

I'm trying to come up with a solution to the question How to maintain consistency with TikZ and Pgfplots?. Essentially, what is needed is a way to save a coordinate as a macro (or a global key, ...