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)

237
votes
2answers
27k 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 ...
2
votes
1answer
19 views

How to vertically center the cells of one column in a TikZ matrix?

Is it possible to vertically center the cells of one column in a TikZ matrix? Adding nodes = {anchor = center} vertically centers all of the cells, but I would like to retain the bottom alignment of ...
0
votes
0answers
15 views

Improve flow chart template with rectangle split

I'm try to build a flow chart template: \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath,amsfonts,amssymb,graphicx} \usepackage[left=2.00cm, right=2.00cm, ...
3
votes
2answers
86 views

How to save the current color in PGF/TikZ?

In TikZ/PGF, we can obtain the current line width using \pgflinewidth. Unfortunatelly there is no (as far as I know) \pgfstrokecolor, \pgffillcolor, \pgfstrokeopacity and \pgffillopacity. My main ...
1
vote
0answers
44 views

help with subplot tikzpicture please

I want to plot these two stacked bar plots as a subplot in one figure next to each other here is the code and my current output \begin{figure}[htbp] \centering \subfigure[Weight ...
0
votes
1answer
99 views

how can I draw a functional graph in tikz?

Let X is a finite set and $f:X \rightarrow X$ is a function. how can i draw the graph with vertex V=X and edges (x,f(x)) with x in V?
2
votes
1answer
83 views

Tikz library math

Following the answer of this question I tried to run the code proposed by Mark in the third "code window". What I obtain is: I can't find file `tikzlibrarymath.code.tex' Runninig the terminal ...
1
vote
1answer
50 views

How to center the subfigure

I use the subfigure to put two figures together, however they are not centered. Below is my code: \documentclass[10pt]{IEEEtran} \usepackage{tikz} \usetikzlibrary{ shapes.geometric, ...
12
votes
1answer
730 views

using pattern inside tikz shapes with dropped shadows

Please, consider the mwe below. Question: why does the fill of the second node become transparent? Subquestion: why are lines in the pattern which are thicker than 1pt not smooth? ...
7
votes
2answers
130 views

TikZ/TeX: Minimum line width/maximum resolution

I would like to employ TikZ for some constructive work, namely, programming a FabLab laser cutter. This nifty device gets a 2d drawing (as PDF) and cuts along all hairlines in the PDF. A harline is ...
5
votes
2answers
80 views

Option in usetikzlibrary

Is it possible to have an option to an \usetikzlibrary command? I would like to define different styles when an option is activate. For example: \usetikzlibrary[blue]{something} ...
22
votes
8answers
2k views

Draw with TikZ a Pythagorean triangle with the squares of its sides and labels

I've made this checking the old questions and the TikZ manual and I want to draw the squares of the sides of my Pythagorean triangle. So far I have \documentclass{article} \usepackage{tikz} ...
1
vote
1answer
72 views

TikZ: Draw angle with label between lines

How do I draw an angle with a label between two lines when the lines are not necessarily drawn in the same \draw call? I need to draw an angle with a label, theta, between the y-axis and the pendulum ...
2
votes
2answers
47 views

Add axis label to bar chart using tikz

I'm creating a bar chart using the following code: \documentclass[tikz]{standalone} \usepackage[english]{babel} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=newest} ...
6
votes
1answer
126 views

Recursion of unknown origin: TeX capacity exceeded, sorry [input stack size=10000]

For some reason, there's a recursive definition in this MWE. Who can find where it goes wrong? \documentclass{article} \usepackage{xcolor} \usepackage{titlesec} \usepackage{tcolorbox} ...
3
votes
2answers
62 views

Tikz \draw as part of style (Drawing something inside each node of certain type)

I'm currently learning how to use Tikz and was looking into drawing automata (specifically Simulink-like state models). Currently, I'm making a style that should reduce my efforts to a minimum when ...
0
votes
1answer
73 views

How to make an HTA looking thing?

I am try achieve something along the lines of this: I cannot however figure out how to make these arrows. I have some code that gives me something that is almost right but it is messed up in some ...
4
votes
1answer
30 views

How can I label forest nodes automatically, adding labels as prefixes to nodes' content exactly once?

I was trying to figure out how you might get forest to label the nodes in a diagram such as the one featured in this question automatically. So, the idea is that: level 0: content of node should be ...
3
votes
0answers
66 views

Draw geodesic acceleration

Hi I want to draw some geodesics accelerating towards one another using TikZ. I've stolen some code from an online example to set up two planes one on top of the other (top one invisible - I'm just ...
3
votes
3answers
165 views

How to reproduce these images with Tikz/ pgfplots?

I'm completely new to latex and Tikz, and I'm trying to reproduce these two images: Here's all I've got so far: \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} ...
4
votes
1answer
47 views

Smooth out drop shadow at the edge of the graph in pgf-blur

I'd like to smooth out a drop shadow about some specific places below my graph. I can't figure out how to do it, there's no key in the pgf-blur library that allows me to customize the the shadow ...
0
votes
0answers
35 views

Including tikz causes error

I want to include a diagram drawn in Dia using tikz, however when I include the tikz package i get the following error ! Package pgfsys Error: Driver file ``pgfsys-dvipdf.def'' not found... I'm using ...
2
votes
2answers
71 views

TikZ ER Diagram - stopping relations from drawing across cells

I've adapted code from this post The problem that I'm having is that the relations (lines) between tables are crossing over tables rather than going around them. The MWE is quite long but here it ...
1
vote
1answer
59 views

How to position a TikZ picture?

I have a problem with positioning a TikZ picture. I want to position a half circle, but I don't know how I should do it. \begin{tikzpicture} \draw [domain=0:180] plot ({cos(\x)}, {sin(\x)}); ...
74
votes
11answers
36k 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 ...
0
votes
0answers
75 views
+50

custom table of contents using tikz and tocloft

I have using tocloft and tikz for creating custom table of contents. Please find the my MWE below: \documentclass{book} \usepackage{tocloft,refcount} \usepackage[colorlinks,linkcolor=black]{hyperref} ...
16
votes
2answers
13k views

Drawing a TikZ arc specifying the center

The TiKz command for an arc: \draw (0,0) arc (-30:30:2) ; Draws an arc that starts at (0,0), and would be the part of the circle from -30 degrees to +30 degrees of radius 2. It is very hard to ...
3
votes
1answer
85 views

In TikZ, what are the coordinates “node” uses to “draw”? (the effects of the difference between “inner sep” and “outer sep”)

I'm trying to duplicate as best as possible a particular flow chart design from a textbook. The following code almost achieves what I want: \documentclass{article} ...
15
votes
2answers
518 views

How to use OGDF library with TikZ 3.0?

I try to compile (via lualatex) the following MWE without success. \documentclass[tikz]{standalone} \usetikzlibrary{graphdrawing} \usegdlibrary{ogdf} \begin{document} \begin{tikzpicture} \graph ...
3
votes
1answer
48 views

Tikz: Curved parallel arrow around a circle [duplicate]

I have a simple following code: \begin{tikzpicture} \draw[thick] (2,0) circle (1.5cm); \end{tikzpicture}` I would like to create a curved parallel naming arrow around this circle as shown in the ...
4
votes
1answer
132 views

how to draw plate indices in graphical model by tikz

I made my Hierarchical model with tikz by following code: ‎‎\documentclass[10pt,a4paper]{article}‎ ‎\usepackage[utf8]{inputenc}‎ ‎\usepackage{amsmath}‎ ‎\usepackage{amsfonts}‎ ‎\usepackage{amssymb}‎ ...
84
votes
5answers
7k views
+200

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 ...
3
votes
1answer
49 views

Label distance and other issues in a TikZ diagramm

The following figure computed with tikz includes three imperfectnesses: The math operators plus "+" and minus "-" are defined as labels of the corresponding sum nodes. The signs are drawn too far ...
0
votes
0answers
33 views

Are tickz and pstricks in conflict? [duplicate]

I do not know why, but it seem that the tikz and pstriks packages are in conflict. Using both \usepackage{tikz} \uspepackage[usenames,dvipsnames]{pstricks} When compiling, it returns me the ...
165
votes
12answers
25k 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} ...
5
votes
1answer
51 views

Add text on arrow in flowchart

Followup-question of Drawing arrows from different edges of node/decision box The problem I have seems pretty simple, but I wasn't able to find a solution in the archives or elsewhere. The output ...
6
votes
1answer
69 views

Style with 'transparency group'

Can we define a style telling "put all arrows on the same transparency group as the path" ? In the following example, I would like to redefine ephemeral style such that the blue and the red arrows ...
2
votes
1answer
217 views

Externalize TikZ with TeXstudio and MikTeX

I have the same problem as written here before, but the externalization doesn't work. I always get the following message: tikz: Sorry, the system call 'pdflatex -halt-on-error -interact I try to ...
1
vote
1answer
60 views

2 histograms with common x-axis are not aligned

I have to following latex code: \usepackage{tikz} \usepackage{pgfopts} \usepackage{pgfplotstable} \begin{document} \begin{tikzpicture}[scale=1] \begin{axis}[minor tick num=1, scale only ...
2
votes
1answer
41 views

Drawing arrows from different edges of node/decision box

I'm new to tikz and don't understand how to draw lines originating from all edges of a decision box to other nodes. In the diagram below , how can I specify the originating point of an arrow? For e.g ...
5
votes
3answers
122 views

Define stretchable shading

I would like to define horizontal shading, that could be stretched depending on needs. What I did to far is this \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
65 views

TikZ: ordinary arrow tip on double line

I like the ordinary arrow tip that you get in TikZ from \draw [->] (a) to (b);. In my document I have lots of ordinary lines like this, and also lots of doubled lines like \draw [double,->] (c) ...
3
votes
2answers
154 views

Ideas for high-level data structure visualization?

I want to create a (graphical) representation for a custom HL7 v2 message structure. In this scenario, I'm only concerned with the high-level message structure - the arrangement and usage of the ...
1
vote
2answers
73 views

Replacing tree-dvips, connect nodes in a tabular environment

I want to get rid of tree-dvips since it is not compatible with xelatex and ps-tricks since it does not compile efficiently with xelatex. I have the following figures: They were typeset by using ...
1
vote
2answers
112 views

Keepaspectratio option for tikz picture

In my current document I have both pictures from file and tikz pictures. For the output I use both, landscape (for screen reading) and portrait (for print). For pictures loaded from file i use the ...
3
votes
1answer
104 views

Arithmetic in tikz coordinates (parentheses)

I want to use parentheses in coordinate calculation in tikz. There should be a simple way, but I couldn't find it. For example, \def\x{10}; \draw (0,0) -- (1+1/\x,0); this works fine. But, ...
5
votes
1answer
69 views

pgf path decoration with corners awareness

I try to create pgf decoration that will be able to tell in each segment whether the its start is a sharp corner on the input path, but I can't figure how to do this. Take for example the following ...
95
votes
9answers
9k views

Simulating hand-drawn lines

I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar package). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear ...
-1
votes
0answers
102 views

How to create this type of logo in latex? [on hold]

Dear friends, How to create this type of logo in latex kindly help me. (Inside hexagons put images or letters)
2
votes
3answers
141 views

Random non erratic domain in tikz

Is there a way to draw something like this In tikz, without being overly erratic like Drawing random paths in TikZ ?