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.
183
votes
2answers
19k views
Create xkcd style diagram in TeX
The unique style of the diagrams at xkcd has an informative but nice hand-drawn touch. I guess they are actually drawn by hand but just recently on our partner site for Mathematica someone asked how ...
124
votes
3answers
14k views
Drawing on an image with TikZ
Recently I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on a image. Instead of pasting a image in Illustrator and adding some ...
120
votes
9answers
12k views
How can we draw a Christmas tree with decorations, using TikZ?
I would like to use TikZ for drawing a christmas tree. Here's a start, I used the lindenmayersystems library for drawing a tree:
\documentclass{article}
\usepackage{tikz}
...
87
votes
6answers
18k views
Is it possible to change the size of an arrowhead in TikZ/PGF?
I'm trying to draw an arrow with a bigger head than normal. Is it possible without changing the style of the line itself?
69
votes
6answers
3k views
How productive are you with TikZ?
First, I must say I have very limited knowledge about PGF/TikZ. Most things I do are blind copy-pastes of examples I find on the Internet with lots of trial-and-error and googling around.
After ...
68
votes
8answers
5k views
Simulating hand-drawn lines
I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar tool). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear too ...
67
votes
10answers
4k views
How can I draw an egg using TikZ?
I would like to draw an egg-format element, but I have only found ways of drawing ellipses.
66
votes
5answers
5k views
How can we display fireworks?
Soon we can celebrate the New Year. How can we use TikZ for drawing fireworks? For example like this, photographed by Kurume-Shimin, found on Wikipedia:
Click on Image search for getting further ...
64
votes
8answers
3k views
Sieve of Eratosthenes in tikz
I am writing notes for my students under the topic of prime factorization and I needed to illustrate the Sieve of Eratosthenes and this is what I came up with in tikz:
\documentclass{article}
...
62
votes
1answer
1k views
pgf-Tikz QR code generator
I am looking for a Tikz QR code generator. I am aware of pst-barcode as well as several "local" programs, a luatex solution and web services to do this. Nevertheless, if at all possible, I would much ...
59
votes
3answers
2k views
Fundamental differences : PSTricks, TikZ/PGF and others
OK, since this is a pretty vague and subjective question. I need to set up some borders around the discussion that I intend to benefit from. But before anything, I certainly do NOT want to excite the ...
59
votes
1answer
2k views
PowerPoint's “Smart Art” for TikZ?
This question led to a new package:
smartdiagram
I haven't been using PowerPoint for years, but today I immediately fell in love with its "Smart Art" feature (2010 version of PowerPoint). The ...
58
votes
6answers
2k views
Curve through a sequence of points with Metapost and TikZ
This question led to a new package:
hobby
I found Metapost best for drawing complex smooth curves (i.e., Bezier, splines), since you do not have to directly specify Bezier control points. ...
55
votes
6answers
2k views
What is the minimum one needs to know to use TikZ?
I am fed up with the poor quality of the pictures in the papers written by my graduate students and am trying to convince them to use TikZ. I know of three ways to begin learning TikZ:
The TikZ ...
53
votes
4answers
3k views
How to create magnified subfigures and corresponding boxes for portions of a large image
Updated Below
I hope the title gets at what I'm trying to do. I have a large image for a thesis on an image processing topic, and I want show the large image, with zoomed in boxes (typically with the ...
52
votes
5answers
8k views
Cool Text Highlighting in LaTeX
LaTeX has soul. ConTeXt, of course, has beautifully marked up "sharpie" highlighting, where you can put sweet hightligher under your text for free!
In the pictured example, you can see highlights ...
50
votes
3answers
2k views
How to draw a Sankey Diagram using TikZ
I would like to draw something similar to this (not exactly):
using TikZ. Ideally I would be able to set the width by variables and rejoin two flows into one again. Is there a good way to do this?
...
49
votes
10answers
4k 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. ...
49
votes
3answers
5k views
Putting a timeline for dates in moderncv
This question led to a new package:
moderntimeline
I just had the idea of using a timeline to specify dates in my CV. I've made a mockup in Inkscape:
The idea, as you see it, is to display ...
47
votes
2answers
850 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 ...
46
votes
10answers
8k views
List of available TikZ libraries with a short introduction
Quick links:
Summary
❧ Intersections library
❧ Arrow tips library
❧ Calc library
❧ Mindmap Library
❧ Shapes library
❧ Paper Folding Library
❧ Chains Library
❧ Shapes library
Very often I ...
46
votes
2answers
933 views
Torn paper: matching up the torn edges
I recently asked a question on creating a torn paper effect. JLdiaz provided an absolutely beautiful answer, which I have used (with a very minor modification) to indicate the way in which a document ...
45
votes
10answers
14k views
Good way to make \textcircled numbers?
I'm trying to make some good-looking numbers in a circle, using the simple command:
\textcircled{1}
However, the circle is misaligned vertically with the number, and look a bit sloppy:
Any ...
31
votes
3answers
11k 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 ...
26
votes
3answers
2k views
3D helix torus with hidden lines
How can I generate the above image using TikZ (possibly other methods will work if they produce better looking results)?
I would like to have a nicely shaded (not so dark image) without gridlines ...
19
votes
3answers
655 views
todonotes and tikzexternalize
In my document I use todonotes and TikZ/pgfplots. After activating the externalization in TikZ I realized that todonotes are all exported as well (because they are based on TikZ).
This behaviour is ...
19
votes
1answer
1k 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 ...
18
votes
2answers
2k views
TikZ: Line with large dots
Is there a simple way to draw a line like with \draw[dotted] (0,0) -- (1,0); but with larger (radius about 1mm) and more distant (about 4mm) dots?
I've looked in the TikZ & PGF manual, section ...
18
votes
1answer
6k views
Export eps figures from TikZ
Section 32 Externalization Library of the pgfmanual (v2.10) explains how to generate PDF figures and EPS figures. I successfully tried it with PDF output (there is an example with a full explanation ...
17
votes
3answers
2k views
Rounded corners in TikZ trees.
When I use TikZ tree with nodes with rounded corners, the connecting lines do not touch the nodes (near corners) but end where would rectangle end. Is there an easy way around it?
...
16
votes
3answers
194 views
Strange behaviour with PGF/TikZ and Plain TeX output routine
I noticed a strange behavior when running PGF/tikZ with pdfTeX on my Debian box :
a simple session without tikz:
pdftex
**\relax
*Hello World
*\bye
do output the page number on the page footer.
On ...
15
votes
4answers
255 views
How to normalize a vector in pgf/tikz?
I'm drawing a picture in pgf/tikz in which I define some vectors (coordinates) at the start. The picture changes depending on these initial coordinate positions. eg:\coordinate (A) at (3,4);
During ...
14
votes
5answers
718 views
Design of an asteroid belt in TikZ
How can I construct an asteroid belt in TikZ? That is my question: I get everything right, but I do not know how to make the asteroid belt.
I have no code to add besides the preamble with TikZ ...
13
votes
4answers
2k views
Override TikZ externalize “up-to-date” flag
I am currently using the TikZ external package in order to avoid recompiling all figures in my thesis. There are more than 50 figures, relying on large data, and a full build without externalizing ...
12
votes
4answers
1k views
Vertical and horizontal lines in pgf-tikz
It is easy to produce a path between two nodes consisting of a single horizontal and a single vertical line (from the manual):
\begin{tikzpicture}
\draw (0,0) node(a) [draw] {A} (1,1) node(b) ...
10
votes
3answers
397 views
Drawing a 3D cone
I want to create some thing like this ,
but instead of a box, I use another object (a dog silhouette). Here is what I have so far
\begin{tikzpicture}
\begin{scope}[scale=0.25, xshift=70, ...
10
votes
2answers
130 views
MATLAB like command box
hello i am trying to set up style for script box.
so far i got
\begin{script*} >> help \end{script*}
working and displaying
i want final version to look some what similar to this picture
and ...
9
votes
2answers
102 views
How to add legend to contour plots?
The following does not work:
\documentclass{standalone}
\usepackage{tikz,pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[view={0}{90},legend entries={foo,bar}] % 'legend entries' causes ...
9
votes
1answer
383 views
How to highlight specific entries in a tocloft-formatted ToC
I am writing a document using the book class, and I use tocloft in order to customize the appearance of my ToC. So far, the package did a great job for most customizations, except for one thing: I am ...
8
votes
3answers
3k views
TikZ manual newest version online?
Is there a definite place where TikZ manual can be found online?
I am only finding version 2.00, while I keep loosing the link to 2.10.
Does the official site host the manual somewhere, or is it ...
8
votes
2answers
5k views
Weird tikz/pgfkeys error while trying example from the tikz manual.
I am still learning to use tikz from the manual. I got an error for this code:
\documentclass[twocolumn,english]{article}
\usepackage{tikz}
\begin{document}
\begin{figure}
\centering
...
7
votes
1answer
122 views
Help creating solid cylinders along a path in Tikz for crystal lattice diagram
I am trying to draw a diagram using Tikz that will show the crystalline lattice structure of diamond. It should look like the following illustration (reference).
I have managed to figure out the ...
7
votes
1answer
60 views
pdflatex nonstopmode with TikZ stops compiling
I compiled a TikZ code using pdflatex -interaction=nonstopmode. Depending on code errors, compiling stops. I want to know what went wrong. Let me show you two cases, both of which involve a code error ...
6
votes
1answer
2k views
simple arithmetic on index of foreach statement in tikz
Is foreach really a tikz statement or is derived from some other package?
I would like to draw a horizontal axis with 7 ticks spaced 1 cm apart.
I'd like to place a label under each tick that is the ...
6
votes
0answers
156 views
+50
Strange error when combining Beamer, Animate, Tikz and Listings
I'm working on some slides where I show how code is actually executed in Java. Therefore I'm working with the animate package to generate animations.
Without going into details, I've written a macro ...
5
votes
1answer
1k views
tikz and beamer: shape rectangle split example from manual
The pgf manual has an example using the shape rectangle split on page 450 that is not working with the beamer class:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}
...
5
votes
1answer
111 views
Filling the arrow tip and not the path using two different colors
I have a small problem with some arrows but I can't seem to find a solution. Please note that this question is different from Setting fill color for TikZ arrow tips only (and not the path itself), ...
4
votes
1answer
33 views
pgfplots: Splitting xlabel on two lines
I want to split xlabel into lines. My MWE is below:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
% xlabel ...
4
votes
1answer
123 views
Constructing dag-like diagrams
I want to draw diagrams that look a bit like this. Mathematically, you could describe them as directed acyclic graphs with dangling arcs. They're somewhat reminiscent of route diagrams.
Desired ...
3
votes
3answers
195 views
Drawing system architecture in Latex
I want to draw a system architecture as in the picture below
Can you help me?


