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)

3
votes
1answer
102 views

Creating a graphical representation of a table of contents in TikZ

I struggle creating a graphical representation of a books contents with TikZ. An example I've created in Powerpoint is attached. I am especially interested in relative positioning and no declaration ...
2
votes
1answer
27 views

How to connect nodes with an arrow TikZ?

The arrow connecting the bottom blue rectangle "Update E from H" to the red diamond "Done" has two discontinuities. How can I fix my code below to connect these lines at the empty nodes? ...
1
vote
0answers
25 views

Multiple variables in Tikz don't work as expected

I want to draw lines of the form (0,0) to (radius:length) and use \foreach so I don't have to write everything again and again. Here's my MWE: \documentclass{scrbook} \usepackage[ngerman]{babel} ...
1
vote
1answer
42 views

Prevent overlap in margins by blocking some vertical space

Let's consider the example I used in Tikz: node in margin right to other node interacts with tcbtheorem that is a command that uses TikZ to draw a colored box around a marginal note. As this note ...
2
votes
1answer
50 views

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

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

I need this tikz and tabular sketch at the right of my presentation, and an itemize at left, but too much length

I need this tikz and tabular sketch at the right of my presentation, and some text at left. Unfortunatly the text is at left but in the down part of my frame, I need it at the center and starting ...
6
votes
1answer
490 views

Drawing a bent path as a loop in tikz

I am drawing an optical experiment that involves making a path take a detour. This is possible with PSTricks, but I haven't found a way to achieve this with TikZ. What I currently have: The ...
5
votes
3answers
5k views

How to make pgfgantt scale to specific widths in the page? (ex. textwidth)

I'm trying to use pgfgantt to create a gantt chart for a project spanning many weeks, thus the following code would overflow through the right margin. I can't find a way to alter the size of the grid ...
4
votes
1answer
40 views

Missing \endcsname in tikz draw

I tried to do some calculations in TeX to help me draw a picture and I can't get over this error: ! Missing \endcsname inserted. <to be read again> \numexpr l.12 \draw ...
15
votes
3answers
265 views

Tikz-diagram: Additional right angle and space

I'm trying to recreate this diagram: Mine already looks pretty good but the connection between the Environment and Sensornode lacks the 2nd right angle and space for the measured by text. How ...
3
votes
2answers
54 views

How to insert degree Celsius symbol in node text in pgfplots/tikz?

Here is my code. \resizebox{\textwidth}{!}{ \begin{tikzpicture} \selectcolormodel{gray} \begin{axis}[xlabel=Voltage,ylabel=Current,title=IV Characteristics of PV Module] \node[label={Set 1}] at (axis ...
29
votes
8answers
3k views

How to draw triangular grid in TikZ?

Is there an easy way to draw a triangular grid in TikZ, like this?
1
vote
1answer
117 views

Using Tikz Calendar in Persian

I see this question: Using Tikz Calendar in Portuguese as a Syllabus and I try to translate in persian (solar hijri) below code work nice but the problem is this: for example 1st day of "Dey" (one ...
1
vote
0answers
22 views

TIKZ with the siamltex1213 class

pdflatex does not work with siamltex1213 class as mentioned in this question. Also TIKZ does not work with this class as mentioned in this comment. Are there any workarounds for using TIKZ with the ...
2
votes
2answers
74 views

Categorical product in tikz?

There are many examples of the coproduct in tikz with straight edges, however I can not find any (that work) or without a special package (other than tikz) for the product. I would just like to be ...
3
votes
1answer
70 views

Fit large tikz image on page without white space

I am working on an agenda in knitr (using XeLaTeX). I use tikz for rounded edges around a tabular environment in the monthly overview. This is the first of several pages of the overview: As you ...
11
votes
2answers
108 views

tikz-3dplot: Rotate arc around specific axis

\documentclass[tikz]{standalone} \usepackage{tikz-3dplot} \begin{document} \begin{tikzpicture}[scale=2] % draw arcs \draw[canvas is zx plane at y = 1, line width = 1pt] ...
12
votes
3answers
267 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
49 views

Foreach loop to use path intersections directly

Here is the MWE, I want to intersect two paths and loop through all intersection points with a loop, not knowing before hand how many intersection points are there, and definitely hoping I do not have ...
2
votes
2answers
87 views

Draw a convex hull with tikz

I want to draw a convex hull with tikz. \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \def\us{(0,2),(1,4),(2,0),(3,2),(4,1),(6,2),(6,4)} \foreach ...
5
votes
2answers
83 views

TikZ text not nicely vertically aligned

I use lines and text to clarify a TikZ figure. However if I use the same y-coordinate (in tthe example below 3) and offset (in this case 'above'), the text looks messy. How can I get the alignment ...
4
votes
1answer
34 views

Tikz: Align left/width of different fit boxes so multiple fitboxes align nicely vertically

The Tikz fit functionality is very nice, but what (1) if I want to align multiple fit boxes to the same left/width location so that all fit boxes matches, so different fit boxes are nicely aligned ...
7
votes
0answers
38 views

TikZ: Mixing color with white and setting opacity with a white background yields different results

I noticed that 25% opacity with a white background yields a different result for me than mixing 75% white into the color. Why is that, and what would be the correct way to not have opacity but the ...
2
votes
1answer
89 views

Why more margin on the left?

I have this figure: \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{fit,arrows,calc,positioning} \begin{document} \tikzstyle{b} = [rectangle, draw, fill=white, node ...
6
votes
2answers
146 views

Generate the n-th letter of the alphabet in a tikz loop [duplicate]

The following code draws 10 nodes, labelled from 0 to 9. \documentclass[a4paper,10pt,landscape]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \i in {0,...,9}{ ...
2
votes
2answers
44 views

Tikzpicture: How to caption with multiple axis

Is there a way to caption multiple axes with tikzpicture? I don't want to use subfigures since each axis (and its corresponding figure) is connected via an arrow to another axis. I have something ...
2
votes
1answer
26 views

Tikz: How to fit also the text of a node inside a box?

Assume I want to cluster certain nodes in a box, however I also want the node text to get boxed. The following MWE place the node in the box, however the below (or left/top/right) placed text, not. ...
1
vote
1answer
46 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: ...
27
votes
6answers
1k views

Spirograph, Continuous Rotations in TikZ or PSTricks

Spirograph-like drawings are obtained when one repeatedly draws a closed curve on a continuously rotated canvas. Is there a nice way to make spirograph drawings using TikZ or PSTricks? There is a nice ...
0
votes
0answers
20 views

How to update tikz-cd (TexLive)?

My tikz-cd is out-of-date. I have found this version which seems the latest: http://pgf.sourceforge.net/ Then I unzip the package, put the "pgf" from the package to my ~/texmf directory. But I ...
1
vote
1answer
280 views

tikzexternalize in TeXMaker doesn't work

I'm having some troubles while compiling my thesis with the tikz externalize feature in Texmaker. I created the user command: "D:/laTex/texlive2014/bin/win32/pdflatex.exe" -synctex=1 ...
11
votes
1answer
361 views

TikZ Chromaticity Diagram

I'm trying to make a chromaticity diagram in tikZ, does anyone know how to make one? I want this My issue is not in forming the spectral locus that I can do, right now I'm only using three points ...
1
vote
1answer
50 views

Vertical colorbar (in tikz) + subfigures (png)

I have an issue with the placement of a colorbar. The colorbar is defined separately in a tikz-environment, as suggested in this topic. My goal is to place one colorbar together with 4 png pictures ...
3
votes
3answers
200 views

How to create this graphic with TikZ?

I want to create a graphice like the following: Below is my code: \documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{arrows} \newcommand{\psign}{+} ...
3
votes
2answers
73 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} ...
4
votes
2answers
71 views

Placement of labels in tikzpicture

I have constructed a polygon using tikz and would like to know how to label the points in the manner shown in the diagram below I have constructed my polygon as follows: \documentclass{article} ...
17
votes
1answer
468 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. ...
3
votes
1answer
41 views

How to change label distance in a TikZ diagram

I'm a complete beginner when it comes to TikZ, so please excuse some stupidity on my side. I'd like to TikZ a tower of fields, however the distance of the inner labels and the edges is too big. I'd ...
5
votes
0answers
74 views

Watercolor in tikz

Is it possible to fill a shape with a coloring that looks like watercolor like in this image using tikz or pgfplots? Src: http://bartoszmilewski.com/2015/07/29/representable-functors/
15
votes
3answers
8k views

changing loop size and shape in tikz

I would like to make the small loop around the circle (loop above) a bit rounder and nicer. below is a short example of my code: \documentclass{scrbook} \usepackage{tikz} ...
4
votes
5answers
221 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 ...
7
votes
2answers
190 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 ...
7
votes
1answer
74 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 ...
1
vote
1answer
46 views

Gnuplot-Tikz-TeXstudio setting problem

I am a beginner in making graphs of functions by TeX itself - until now i have solved these issues by including .eps pictures. Now i am on doing things better and nicer. I started to use Tikz packages ...
2
votes
1answer
85 views

Simple Probability Tree

How do I make the following probability trees in LaTeX? Thanks for the help!! Probability Tree 1: Probability Tree 2: \forestset{my label/.style={if n=1{edge label={node [midway, above left, ...
2
votes
0answers
35 views

Table of Contents style fit to part style

I am using titlesec and TikZ to customize my \part style. I would appreciate to use the \part style for the \tableofcontents title. Is there any way to do it ?
4
votes
1answer
43 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}, ...
5
votes
1answer
64 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 ...
2
votes
1answer
48 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
768 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 ...