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)

1
vote
3answers
136 views
1
vote
2answers
30 views

How to use \tikz\pic in \caption and “normal” Latex-text-environment

As an advancement to How to use a \pic in a node's text area {}?. What to do or avoid to let work the pic "lightning" in a caption and normal latex text? \documentclass[]{scrartcl} ...
5
votes
1answer
263 views

After MiKTeX update when using LuaLaTeX: Package pgf Error: Driver file ``pgfsys-luatex.def'' not found

I just updated my MiKTeX instance to the latest packages and am using the LuaLaTeX compiler. Whenever a document relies on pgf I get the following error: ! Package pgf Error: Driver file ...
0
votes
1answer
19 views

TikZ arrow displaces intersection point

I am trying to join a curved path to another (two bent edges) using an intersection point as joint, but when adding an arrow with style "-latex" to the second path, the curve is sightly displaced and ...
4
votes
1answer
104 views

Changing color in foreach using arrayjob

I am trying to change the color within a foreach statement. Here a way is described how to do it depending on the foreach variable. However, I want to use HTML color code, so I decided to use ...
6
votes
2answers
190 views

Why is there a green border around the annotation?

I wanted to have a blue annotation to explain one of the points, but it has a green outline, like the color of my mind map. How can I fix that \documentclass[12pt]{article} ...
2
votes
1answer
56 views

Tikz and text specific / dependent relationships

I have seen some people do some mind boggling things on this site using powerful packages (and standalone code) based on pgf and tikz. This question (How to get intersection point(s) of two glyphs?) ...
32
votes
6answers
5k views

What's the easiest way to draw the arc defined by three points in TikZ?

An ordered set of three points uniquely defines a circular arc, and I'd like to be able to draw that arc in TikZ. I know about the arc drawing command, which does the job given a radius, two angles, ...
0
votes
1answer
70 views

Image overlay generator - How to annotate sub-images in the center of each overlay box? (caption-diagram next to original image)

The LaTeX Overlay Generator is a great tool to annotate sub-images of an image in a LaTeX-caption way. It names itself "Visual Overlay Generator v0.0.1", as it creates a visual overlay: a diagram ...
0
votes
0answers
25 views

How to overlay (annotate) sub-images (rectangles; but not straight, maybe chopped off) an image

The LaTeX Overlay Generator is a great tool to annotate images which contain sub-images like this (where the sub-images are all rectangles and all "horizontal with the screen"): However, some ...
6
votes
4answers
911 views

Bessel function with pgfplots

I want to plot a vibrating membrane and therefor I need the bessel functions. As I'm using pgfplots, I wondered if there is anything pgf-related that can be used to create a corresponding output. I'm ...
2
votes
2answers
29 views

'minimum width' no effect on node with horizontal multipart

I have a multi-parts node N1, below it a node N2,I wish N1 to have same width as N2. I have set minimum width=3cm for every node but this did not have any impact on N1 node !? ...
1
vote
0answers
14 views

pgfplot connects first and last point of line in the surf plot [duplicate]

I'm plotting a surface from data file arranged in columns x,y and value. The result looks like this: As you can see, first and last point of every line is connected. Relevant code: ...
3
votes
1answer
38 views

How to use a \pic in a node's text area {}?

How can I achieve that the \pic "lightning" will appear in the node's text area? I cannot use it there, so I have commented it out. I know or think it's a completely different "environment" (a text ...
11
votes
2answers
560 views

Use Tikz to draw this beautiful symmetric tree

To illustrate a problem I need to make this figure. I can to do: \documentclass[12pt,fleqn]{article} \usepackage[portuguese,brazil]{babel} \usepackage[latin1]{inputenc} ...
5
votes
3answers
2k views

How to draw the cards of a deck?

How to draw the cards from a deck using a Latex package, as TikZ?
0
votes
0answers
33 views

Plotting connected oriented graphs in tikz?

Oriented graph is a digraph without symmetric pair of directed edges. The below contains the first graphs but I am interested in the next graphs: the number of connected oriented graphs increases ...
1
vote
2answers
69 views

How to draw a square and its diagonals with arrows?

I dno't know how to draw arrows as the above figure, and the code I wrote for the four points don't even show up on a result. Why my points don't appear? And what should be added for the arrows? ...
2
votes
0answers
34 views

Small corrections needed for game tree

I've drawn what I would like the result to be: The current game tree looks like this: With the current code: \documentclass[12pt,twoside]{book}%{book} \usepackage[a4paper, hmargin={2.5cm, ...
2
votes
1answer
48 views

How to color an semiplane delimited by one axis?

In my code below I made an complex plane with the real axis and imaginary axis CODE: \documentclass{article} \usepackage[brazilian]{babel} \usepackage{tikz} \begin{document} ...
3
votes
3answers
39 views

how do I put a line break among multiple tikzpictures?

If I do this: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=3,>=latex, font=\sffamily] \draw [->](0,0) -- (0,1) node[at end, above left, rotate=90] ...
2
votes
2answers
2k views

Convert TikZ to EPS using pdfLaTeX

I would like to convert my TikZ images to EPS format and save in a separate file while pdfLaTeX compiles my document, ideally. Note I am using MikTeX and TeXstudio. Otherwise, I would like to be able ...
3
votes
2answers
56 views

Row sep in Tikz for a single row of a legend

I'm using the legend-only solution from Using a pgfplots-style legend in a plain-old tikzpicture How can I get a style for a single row? I'm trying to have row sep = 5pt for example for all rows, but ...
3
votes
2answers
118 views

TikZ: Perpendicular bisector of a line

Given two coordinates A and B, I'd like to draw the perpendicular bisector (of any length) of the line joining A and B. I am not given any extra information, and A and B can be any two coordinates ...
2
votes
1answer
46 views

Spy glasses in a group plot

I have a group plot in which the graphs have common x axis and are stacked one over the other- like the one givenhere. Now, I want to have a spy glass on each of these plots in the group. But when I ...
2
votes
0answers
29 views

MATLAB generated Tikz not working

When trying to use a .tikz file generated from a MATLAB script, the .tex file errors and is not able to build. The .tex code is as follows: \documentclass{article} \usepackage{amsmath} ...
4
votes
2answers
59 views

Make a smoother plot of functions with pgfplots

The following code gives me a plot which is not very smooth. It looks like several points (with spacing 0.5 in the horizontal direction) are drawn first and then connected by straight lines. What ...
0
votes
1answer
23 views

Annotate row and column highlighted in one table with different color by Tikzmark in Beamer

I found example for row only here: Annotate the table row highlighted by Tikzmark in Beamer Also found example for column only here: Annotate the table column highlighted by Tikzmark in Beamer but ...
2
votes
1answer
24 views

Several arguments in tikzset pic

I want to pass more than one argument to a pic defined with \tikzset. I tried this and it works: \tikzset{ Piece/.pic={ \draw (0:1) -- (120:1) -- (240:1) -- cycle; \draw (0,0) ...
1
vote
1answer
68 views

Graph paper as an underlay

Is it possible to have graph paper as an underlay and then run the usual latex commands? For instance, instead of having a latex document written on a blank page, is it possible for the page to be ...
0
votes
0answers
20 views

Kill instance in pgf-umlsd

How would you terminate an instance in pgf-umlsd? So that it's lifeline ends on some point with a cross?
2
votes
1answer
79 views

TikZ — rolling logarithmic spiral

I've got almost no time for this image, so the code is just a mess and probably the best example for never-ever-do-it-this-way-code in TikZ, but it works: \documentclass[12pt, ...
0
votes
1answer
28 views

How to enhance a figure region using a second image (no digital zoom) [on hold]

I need to show a zoom for specific regions in a plot. I do not want a digital zoom (for that you can check web1 or web2). I have different figures, one for the complete plot and another one for the ...
4
votes
3answers
525 views

Draw arrows to show multiplication pattern (distributive property)

Based on this question: How to draw arrows between parts of an equation to show the Math Distributive Property (Multiplication)? I got some nice tools for illustrating to my students how to find the ...
0
votes
0answers
22 views

How to draw bend arrows between the terms of the brackets [duplicate]

MWE \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{makeidx} \begin{document} \Large \begin{eqnarray*} ...
2
votes
1answer
29 views

Very basic example of pgfpictureboxed in Beamer

According to the userguide (§2.1, p. 6), the pgfpictureboxed-environment works as follows: \begin{pgfpictureboxed}{〈lower left x〉}{〈lower left y〉}{〈upper right x〉}{〈upper right ...
1
vote
1answer
42 views

PgfPlots - Plot semilogx of a matched filter

I tried to plot a frequency response of a matched filter, which its response defined by: H(f) = Since x (=f) runs from very big negative value to very big positive value, and y (=H(f)) runs only ...
1
vote
1answer
69 views

tikz macro, how to implement

I would like to make macro blocks for control loop block diagram. My idea is to have PI controller and filter blocks like in picture, and to have the possibility to simply add in my diagram, but I ...
6
votes
1answer
69 views

tikz library shadows does not accept space

With TikZ library shadows, a space immediately after the curly bracket in drop shadow = { shadow... throws an error. If there is no space after the bracket, there is no error, i.e. drop shadow = ...
2
votes
1answer
22 views

edges on graph do not align with center of nodes in foreach

As far as I can understand this should draw the same set of five edges in exactly the same way. The first set of edges are positioned correctly. But the second set of edges is horribly aligned. On ...
6
votes
1answer
45 views

Customize the Beamer Frame Title

How to change the beamer frame title to be like this What I did till now (I want the background color as in my code): \documentclass{beamer} \usepackage{tikz} \usetheme{CambridgeUS} ...
3
votes
1answer
44 views

How to join the points from an external file with smooth lines in tikz

I am working on plotting data from an external file. When I use the following code I get the points in the curve joined with lines, however I would like to join them using smooth curves. ...
15
votes
1answer
340 views

How does the shorten option work?

Many sample TikZ images use the shorten option in the tikzpicture options. Even though I can figure out roughly how it works and what it is supposed to do by looking at many examples, I was surprised ...
4
votes
1answer
95 views

Financial graph LaTex style

I am used to work with LaTex, but I am totally stuck trying to plot the following graph and include it in my paper using a LaTex layout. Here below I am also reporting the dataset (markdown does ...
3
votes
1answer
27 views

How to increase background color of a node to input text

Obviously I need a background color for the rightsided text. Code is from the Tantau manual, p.45. It's a riddle for me at the time. Something wrong with the node which keeps the text? For any answer ...
1
vote
0answers
25 views

tikz figure input line width from file

I would like to create a figure with different line plots, where I input the coordinates of the lines from a file. I would like to also input the width of each line from another file. is this ...
4
votes
1answer
360 views

pgfplots: Plot only parts of table and in “random” order

I have been lurking around stackexchange for a long time and so far been able to find solutions for my newbie problems but now I'm really stuck! My problem is probably not that complicated, yet a bit ...
4
votes
1answer
96 views

PGFPlots — a solid of revolution as a 2D-plot

I'm trying to draw something like this: And I probably should use a 3D-plot as shown here but it seems to be an overkill solution in my case. So I wonder if there is a better way to draw ellipses ...
5
votes
1answer
92 views

Aligning text along a sector of a circle

How can I align text along the circumference of a circle like this using TikZ? Please ignore the icons. I tried using paths and decorations, but I don't know how to constrain the text to each sector. ...
7
votes
2answers
347 views

Colorization of areas

I want to create in tikz the following image: Here is what I have so far: \documentclass[10pt]{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{pgf,tikz} ...