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)

4
votes
1answer
36 views

How to increase space between the bottom border of a boxed figure and its caption?

I am trying to generate a space (6pt) between the boxed figure and its caption. Since I am using tikz code \includegraphics did not work. Also I tried \setlength{\abovecaptionskip}{6pt}, ...
4
votes
0answers
90 views

How to draw this image using tikz?

Beyond the solution to this particular diagram, can you explain if there is a general set of steps that you would follow to obtain this code? My guesses: Would conversion to vector graphics give ...
4
votes
1answer
54 views

PGFPlots polaraxis axis labels are swapped (or in the wrong place)

I have some problems with axis labels when using the polar axis, if I set the X and Y label they appear in the wrong place. When using the polar axis; x coordinate is the angle (azimuth, phi) y ...
1
vote
1answer
24 views

Tikz : node in margin right to other node interacts with tcbtheorem

I am currently trying to use Gonzalo Medina's answer to create a framed environment for a margin note Consider the following simplified code : \documentclass[oneside]{book} ...
2
votes
1answer
45 views

How to place a section heading inside tikz figure using titlesec and the runin option

I am currently workin on a big tikz figure and I want to place a section heading inside a box, which leads to a problem. A minimal example is here: \documentclass{article} \usepackage[T1]{fontenc} ...
7
votes
2answers
760 views

Creating an automated table of signs

When solving some inequalities in the context of algebra-precalculus course it is sometimes useful to sketch the behavior of the factors involved using a table. All becomes clear with an example - say ...
1
vote
0answers
26 views

Pgfplot: Zoom in to predefined plot

I have one figure with two plots where one is zooming into the other. I am trying to have pgfplot show the following arrow with the highlighted area where the second image is zooming in : The ...
1
vote
1answer
33 views

why does tikz connect my nodes?

I use \usepackage{pdflscape} \usepackage{tikz} \usetikzlibrary{automata} and my code looks like this \begin{figure} \centering \begin{tikzpicture} \node[draw,align=center,text ...
1
vote
2answers
35 views

Typesetting a node in bold font

How do I typeset ${\mathrm{HR}}(\ray{r}, \, P)$ in a node in bold font? I apologize for the cumbersome code. The command for the pertinent node is in the last line. \documentclass{amsart} ...
1
vote
1answer
29 views

How to correct tikz '\draw' location by hand?

I want to make a brace to the right of two nodes but I don't want it to be attached to but I want some extra space. For the starting location my solution seems to work well but for some reason the ...
5
votes
0answers
47 views

Tikz spy - empty zoom with pdflatex

I have issues getting the spy library to work on my current installation. I am running TeXmaker with MikTeX 2.9 (with all packages updated) on Win8.1x64. I read about the issues others are having ...
6
votes
1answer
705 views

TikZ borders showing through when they shouldn't (overlapping circles)

If you draw two circles that are exactly the same in all aspects (location, size, etc...) except they have different colors, then the "border" of the underlying circle is showing through. ...
1
vote
2answers
85 views

Draw a circular node with a sine cirve in it to resemble the symbol a short sine wave

How can I do this in TikZ: I want to draw a circular node with a sine curve in it to resemble the symbol of a short sine wave like in the diagram shown in the link below. I can draw a circle but I ...
4
votes
1answer
112 views

How do I make solid headers?

I am trying to replicate the formatting of a certain standardized test. It looks a little bit like this: I'm going to try memoir and tikz a little bit today, but I was wondering if there is an easy ...
1
vote
2answers
41 views

An error using “Positioning” package to place the titles of a hexagon and a pentagon

In the following tikzpicture environment, I have a hexagon and a pentagon aligned along their horizontal axes of symmetry. (In the hexagon, the vertex A is furthest to the right, the vertex B is the ...
12
votes
1answer
358 views

water inside 3D tube

How can I generate the above image using TikZ. The oval inside tube represents water and arrows indicates the dipole orientation of water. What I was able to get so far is pasted below. ...
1
vote
1answer
67 views

Linear regression on modified datas

I would like to create a linear regression on modified data. My raw data is on a file called data.dat like that : x,y 1,2 2,3 3,4 4,5 5,8 6,9 7,34 If I do something like the code below, I get the ...
3
votes
0answers
33 views

getting confused with pgf

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east, legend style={draw=none} ] \addplot[forget plot,cyan,domain=0.001:8] {abs(log10(x))}; ...
1
vote
1answer
30 views

clear me the doubt in positioning legend option

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east ] \addplot[cyan,domain=0.001:8] {abs(log10(x))}; \addplot[red!70!black,domain=-2:4] ...
1
vote
1answer
53 views

Normal distribution with discrete histogram inscribed

How can I produce the following image with tikz? I have seen the codes for plotting the normal curve, but how to get the rectangular shapes inscribed right at their centers? The red is not so ...
3
votes
2answers
329 views

Help me in drawing log(x) curve

\documentclass[addpoints]{exam} \usepackage{tikz} \usepgflibrary{arrows} \begin{document} \begin{questions}\usepgflibrary{arrows} \question Draw the graph of $f(x)=|\log x|$. Solution: ...
4
votes
3answers
247 views

TikZ: Drawing an arc from an intersection to an intersection

I want to draw an arc with a given radius from the point the arc intersects with a given circle to the point where the arc intersects with another circle. I have been reading through a lot of the TikZ ...
3
votes
2answers
32 views

Code Error From Geogebra for Tikz

I try many changes in this code, but I don't see the error. Can someone help me? \documentclass[10pt]{article} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} ...
1
vote
1answer
77 views

Typesetting a title on a tikzpicture (Version 2)

I have two very similar-looking polygons in different TikZ environments. Each polygon is symmetric across a horizontal line. I want to put them in one TikZ environment with the axes of symmetry ...
1
vote
1answer
31 views

I get problems when I use the same tikzmark label in every slide

Inorder for my tikzmark to be displayed properly, I need not to use different names for each tikzmark. It troublesome to keep track of the names, is there a work around this problem. In the below ...
4
votes
5answers
202 views

Drawing and Labeling a Triangle for a Demonstration of the Double-Angle Formula of Cosines

I have a display of two triangles, but the triangle drawn in red is unintentional. TikZ is misinterpreting the coordinates for point C. The polar coordinates for C is given as \coordinate (C) at ...
50
votes
7answers
21k views

TikZ: How to draw an arrow in the middle of the line?

Like this: .------<------. | | v ^ | | '------>------' I am currently using \begin{scope}[very thick,->] \draw (-4,1)--(-4,0)--(0.1,0); \draw ...
0
votes
0answers
29 views

Error when compiling using tikzmath

I am trying to learn how to use Tikz and its library Tikzmath to make graphics. I am trying to practice by drawing a series of circles along a line. My code is as follows: ...
2
votes
2answers
52 views

tkz-kiviat : increase label length and get the right legend

I want to draw a spider/kiviat diagram. I am using the tkz-kiviat library but I have some problems. Here is my MWE \documentclass[xcolor={dvipsnames}]{beamer} \usetheme{Warsaw} ...
5
votes
2answers
173 views

TikZ : Pair of compasse rendering contest

I made a side view of a compass based on this answer symbols of pencil, ruler and compass I'd like a view from above. \documentclass[border=2pt]{standalone} \usepackage{tikz,xparse} ...
0
votes
0answers
24 views

Drawing solids made up of identical unit cubes [duplicate]

I need to draw some solid figures that are made up of unit cubes so that some pair can be fitted together to make cuboid or cubes.
4
votes
2answers
45 views

Translating a node style from tikz to tikz-cd

I'd like to switch from tikz to tikz-cd to draw diagrams of arrows (I just started practicing, so I don't know much), and I can't figure out how to translate the following node style: ...
2
votes
1answer
25 views

Overshooting axis arrows strange behaviour with tikzexternalize

I would like to use the following code to create a plot with a horizontal gridline and axis arrows which overshoots this gridline (like here). However due to the line \tikzexternalize[shell ...
9
votes
1answer
114 views

Parameters in a caption

I have a simple figure with a code like this: \begin {figure}[htbp] \centering % \begin{tikzpicture} [scale=1] \def \r {1/4} % y-scaling % % PARAMET. \def \a {1} %x^6 \def \b {-6} ...
2
votes
2answers
67 views

Telling to TikZ continue the previously-drawn path with a line-to operation?

This question seems quite simple, so I feel a bit sheepish about asking it, but I've spent quite a while scouring both this site and the manual without any success, so here goes... I found that ...
3
votes
1answer
66 views

Drawing and labeling angles in an axis environment

I am curious about the misinterpretation of TikZ commands to draw and label an angle in an axis environment. If, in the following code, I have $\theta$ drawn using the commands, \draw[draw=blue] (A) ...
5
votes
1answer
153 views

How to draw a series of simple circle packing illustrations, possibly with Tikz?

For an industrial problem, I would like to be able to draw a series of layouts of the cross section of multistrand electrical wires. These can be simplified by packing in a circular envelope a given ...
2
votes
1answer
150 views

Many body perturbation diagrams (closed Feynman diagrams) in latex with labelling

I would like to draw many body Feynman diagrams using latex. These are closed and often used in condensed matter and nuclear physics in contrast to the open scattering diagrams in particle physics. ...
10
votes
3answers
219 views

Drawing the three altitudes of a triangle with TikZ; incorrect orthocenter

You probably know that if you draw all three altitudes of a triangle, they will meet at a single point, the orthocenter. I'm trying to draw a picture that shows the intersecting altitudes with TikZ ...
3
votes
1answer
67 views

Custom Beamer theme does not arrange stuff as I expect

I am creating my own Beamer theme (let me call it mytheme in this thread) and currently working on title page. First I put the code shown below in beamerinnerthememytheme.sty, which is loaded by ...
3
votes
1answer
56 views

Below=of is not understood for tikz positioning

I am trying to use TikZ, but relative positioning of the nodes is not being understood. I am using the MacTex installation that I downloaded today. This code is copied from the TikZ manual, but ...
24
votes
4answers
1k views

TiKZ: “hand-drawn” explosion

Is there an elegant way to simulate a handdrawn explosion as shown in the following image using tikz?
0
votes
1answer
46 views

Drawing and labeling the axes for the Cartesian plane

Nothing exciting here. I only have code to display the coordinate axes. I have a file in which displays of various functions are plotted on the Cartesian plane and displays of a pair of intersecting ...
2
votes
1answer
1k views

can't get multiple lines with tikz-qtree package

I am using the following code to draw a fairly simple tree. The problem is that the line break commands are being ignored although I have found a number of examples on the net that show that they ...
2
votes
1answer
94 views

How to draw an image?

How can I make this kind of graph by tikz?
109
votes
10answers
32k 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 ...
3
votes
1answer
63 views

tikpicture moves location with every compilation

I am using TikZ to draw arrows or position figures. My code has three slides. TikZ worked fine with the first two, but with the last, the image moves with every compilation. I suspect the reason is in ...
37
votes
2answers
7k views

“Single ampersand used with wrong catcode” error using tikz matrix in beamer

I am having trouble getting a basic example of a matrix of notes to show up in my beamer presentation. I am using the code copied from the pgf manual. Here is a complete working example. The error I ...
1
vote
0answers
34 views

Package pgfkeys Error: I do not know the key '/tikz/patch/.pic' and I am goin g to ignore it

I get the following error while compiling: ! Package pgfkeys Error: I do not know the key '/tikz/patch/.pic' and I am going to ignore it. Perhaps you misspelled it. I'm using tex live with update ...
3
votes
1answer
35 views

StrChar causes error when used inside tikzpicture

The following TikZ code attempts to make a graph by drawing vertices 1 through 6, then drawing edges from the list. The edges are formatted as 12, 23, etc., so the command StrChar from package xstring ...