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
22 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 ...
3
votes
2answers
43 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 ...
2
votes
1answer
8 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 ...
1
vote
3answers
31 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 ...
1
vote
1answer
33 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 ...
2
votes
3answers
31 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 ...
4
votes
1answer
94 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/
3
votes
1answer
32 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
15 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 ...
1
vote
1answer
41 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 ...
3
votes
2answers
83 views

Telling TikZ to 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 ...
1
vote
1answer
47 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] ...
0
votes
1answer
40 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
54 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
51 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.
1
vote
1answer
129 views

Using Tikz Calendar in Persian

I saw this question: Using Tikz Calendar in Portuguese as a Syllabus and tried to translate it to persian (solar hijri). The below example code works nice, but the problem is this: for example 1st ...
4
votes
2answers
101 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
117 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 ...
3
votes
1answer
43 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
38 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
49 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
52 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
196 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
492 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
45 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 ...
16
votes
3answers
275 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
58 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
0answers
23 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
77 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
71 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
111 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
268 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
51 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
89 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
39 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
90 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
147 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
48 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
284 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
51 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
202 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}{+} ...