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)

10
votes
4answers
347 views

TikZ Fill for Fraction Diagram

I'm trying to shade in one third of this circle. Obviously, it's not working. What did I do wrong? I got no error messages for either of my attempts in the code below, but neither filled anything ...
5
votes
4answers
180 views

The curvature of a circular arc is backwards

The curvature of the circular arc indicating the angle at ∡OPR is backwards. The command that I used to draw it is the last line in the code. \documentclass{amsart} \usepackage{amsmath} ...
3
votes
1answer
61 views

Plot multiple histograms from csv file using pgfplot

I have the following data.csv file: subject,f1,f2,f3 F11,0.019,0.04165,0.00016547 F14,0.03034,0.02161,0.000267 M22,0.05128,0.0648,0.000327 M22_1,0.052,0.0328,0.000206 M23,0.0364,0.06355,0.000379 ...
9
votes
3answers
437 views

Third grade spiral in TikZ - dimension too large

I'm trying to draw a smooth third grade spiral (r^3 = a^3\cdot \varphi) over $60\times 60$mm grid and I'm getting the "Dimension too large"-error if I set $a > 320$ but I need to fill the grid area ...
6
votes
2answers
143 views

Drawing an arc of a circle using its center and endpoints

I have a display illustrating the rule for calculating the sine and cosine for a sum of two angles. The measure of $\angle{AQP}$ is $x$. The last three lines in the code give the commands to name of ...
1
vote
4answers
172 views

Connecting 5 randomly selected points on the circumference of a circle

I recently started using LaTeX/tikz and was wondering if anyone would be willing to help code (using tikz) a diagram similar to the attached. Note that the pentagon should not necessarily be regular ...
3
votes
1answer
54 views

Math formulas not working in TikZ

I often experience problems with evaluating expressions like sqrt(\x) or 2^{\x^2} in TikZ pictures. Here is an example: { \begin{tikzpicture}[scale=2] \draw[draw=gray!50!white,fill=gray!50!white] ...
0
votes
0answers
17 views

eps2pgf error: /undefined in currentlinecap

I'm encountering a problem when converting .eps to .pgf with eps2pgf. I'm running OSX Yosemite with Java version 1.8.0_31. This is what I input in Terminal: java -jar eps2pgf.jar figure1.eps -o ...
2
votes
3answers
49 views

Creating a Flipbook as overlay only on some pages

I'm writing a thesis where some images with minor changes are used. This changes would be perfectly visible if it would be possible to overlay one picture over the other and toggle both. So doing it ...
1
vote
1answer
60 views

Fit 3D plot onto a shape

I want the 3D plot to be specified in terms of the coordinate system used to draw the rectangle. Right now, the 3D plot takes up way too much space and is off picture. I want it to be contained ...
1
vote
1answer
71 views

Draw a 2D functions in tikz

I want to be able to plot in a 3D environment any type of function of two variables z = f(x,y), where x and y are specified within a given range. For instance plot f(x,y) = x^2 + y^2 where x in [-2,2] ...
1
vote
1answer
53 views

Date/Time in both axes with PGFPLOT

I am trying to plot some data that contains date/time values in both the x and y axis. I have been using the pgfplots and have managed to plot date/times on the x axis and on the y axis separately ...
0
votes
1answer
52 views

chemfig molecule shifts tikzpicture (in beamer)

I have a beamer slide with a title. On it I have a tikzpicture, which contains a molecule drawn with chemfig. Without the molecule the picture is just fine: However, as soon as I put the molecule, ...
2
votes
1answer
86 views

How can I draw an arrow like this whose type is different from the default type using Tikz?

How can I draw an arrow like this whose type is different from the default type using Tikz? I want one like this: not like this default type:
0
votes
1answer
58 views

How do I draw line with TikZ showing 3 point A,B.C?

I want to draw a line showing end points A and B with a Point C between using TikZ.
5
votes
3answers
55 views

How to skip intermediate nodes in Latex tree?

I have the following LaTeX code for a timeline (using tree), but I'd like the two empty boxes following the "no" box to disappear, and instead to just have a straight arrow to action3 -- something ...
4
votes
2answers
115 views

TikZ: Intersection for Fraction Diagram

I am trying to create fraction diagrams for children using TikZ. Is there an elegant way to fix the top of this diagram of 1/2 in a way that will scale when I want to show, say 29/6 with triangles... ...
3
votes
1answer
62 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
43 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} ...
3
votes
1answer
59 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 ...
4
votes
1answer
59 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 ...
3
votes
1answer
178 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 ...
16
votes
3answers
398 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 ...
1
vote
0answers
29 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 ...
3
votes
2answers
73 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 ...
2
votes
2answers
85 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
82 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 ...
3
votes
1answer
55 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 ...
3
votes
2answers
103 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 ...
8
votes
1answer
60 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
96 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
156 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}{ ...
4
votes
1answer
39 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 ...
2
votes
2answers
51 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
30 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. ...
0
votes
0answers
21 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
61 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 ...
11
votes
2answers
181 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] ...
3
votes
3answers
211 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
1answer
44 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 ...
4
votes
1answer
104 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/
4
votes
2answers
83 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} ...
1
vote
1answer
61 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
0answers
39 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 ?
2
votes
1answer
92 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
1answer
58 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} ...
4
votes
1answer
47 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}, ...
7
votes
2answers
193 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 ...
1
vote
1answer
45 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
1answer
48 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 ...