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
1answer
31 views

Draw intervals with overbrace descriptions

For a report I need the following picture, which I would like to draw in LaTeX/TikZ. The idea is that there are discrete intervals on the real line and above these intervals I want to write which ...
1
vote
1answer
75 views

Drawing cycles using TikZ

I would like to draw cycles (or polygonal paths) using TikZ. I provide code in which I try to do this using rectangular coordinates and polar coordinates. In the first drawing, I think the cycle is ...
1
vote
0answers
27 views

Custom tikzmark creates error

I've defined the commands \newcommand{\tikzmark}[2]{% \tikz[overlay,remember picture,baseline] \node[anchor=base] (#1) {$#2$}; } \newcommand{\DrawVLine}[3][]{% ...
5
votes
2answers
91 views

\foreach within \draw doesn't seem to work

I'm desperately trying to make this work \documentclass{minimal} \usepackage{tikz} \newcommand\polygon[3][]{ \pgfmathsetmacro{\angle}{360/#2} \pgfmathsetmacro{\startangle}{0} ...
4
votes
2answers
54 views

Problems with pattern color

Why in the following MWE in all shapes the pattern color is as in the first one regardless that it is defined differently? %%%% pattern-color \documentclass[tikz,border=5mm]{standalone} ...
4
votes
1answer
39 views

Hyperbola instead of ellipse. Note the code below to the ellipse, there is a similar code for and hyperbole?

\documentclass[11pt,a4paper]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=1]; \draw (0,0) ellipse (5 and 3); \end{tikzpicture} \end{document}
0
votes
0answers
26 views

Unwanted vertical white space in tikz [on hold]

How to delete unwanted vertical white space in tikz
3
votes
1answer
30 views

When using custom path style in a tikz graph the quotes label isn't printed

I can put labels onto normal edges fine, but when the edge has a style applied to it, the label is no longer applied. Any idea what is going on/how to fix this? \documentclass{standalone} ...
6
votes
3answers
66 views

Flip fancyhdr headrule even odd

I'm trying to achieve a short fading \headrule under page numbers. But I cannot figure out how to "flip" it on even/odd pages. Does anyone know how to manage that? I also get a warning saying that ...
1
vote
0answers
31 views

Tikz spy makes move hyperref links

I have some troubles with the Tikz library spy. When I use the spy, it creates a new hyperref link at a new position. Thus there is 2 links where only one is wanted (see the image with 2 cyan box ...
4
votes
1answer
92 views

How can I plot the data from a table when the x column gives the difference between x values?

I want to create a "Trial Profile" chart with TikZ. My data is as follows: Height (Y axis) and time between checkpoints (X axis). y x 0 0 10 3 20 3 40 ...
5
votes
1answer
104 views

How to draw torsion prismatic beams in tikz?

I'm new in Tikz but I want to draw this objects: Can anyone give some good advice, or help?
0
votes
0answers
77 views

reproduce a figure with latex [on hold]

I would like to draw the figure with latex, but I have no knowledge of design with latex , could you help me please Thanks you !
6
votes
2answers
58 views

Positioning of node with two measurements

The following quote is found Chapter 17, section 5.3 in the pgf manual. ("This option" refers to the specification of the location of a node by two measurements.): The effect of this option is the ...
3
votes
1answer
40 views

How can I draw slide with dashed hidden lines

I tried to draw hidden lines as shown in this picture but i could not figure out how to do it. Please help me to fix this problem, I try this code \begin{document} \begin{tikzpicture}[z={(3.85mm, ...
1
vote
0answers
59 views

Commuting diagrams with two cells in tikz or anything?

I am trying to typeset the following diagram, which is part of the definition of Kan extension, using xymatrix. \xymatrix@R=30pt@C=30pt{ \X \ar[rrr]^{F} \ar[ddrr]_{K} &&& \Y \\ ...
2
votes
0answers
42 views

I need an ellipse with semi-axes irrational measures. How to proceed?

\documentclass[border=3pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} %calculos no ambiente tikz \begin{document} %ok \begin{tikzpicture} \draw (0,0) ellipse (2 and 1); ...
3
votes
1answer
25 views

Positioning a node with “above”

Units do not need to be declared in the specification of the height of a node above a given coordinate using above. The comment in the following example in Chapter 17, Section 5.3 indicates that the ...
1
vote
0answers
28 views

Including graph using tikz causes not including bibliography file

I am experiencing problems using package tikz. I have produced a graph in R and want to include it in my tex file using package tikz. After I include the the tex file with graph in myfile.tex with ...
2
votes
2answers
56 views

Two timelines with tikzpicture?

I'm trying to create two timelines with tikzpicture. The top one looks as I want, but I'm having troubles with the bottom one. Instead of having little vertical tick marks I'm generating big ...
3
votes
2answers
84 views

drawing curve line between predefined edges

Im trying to draw the following figure in LaTeX format: My question is how can I draw the curved line passing through the nodes shown in the figure? And how to change the color of the nodes left ...
4
votes
2answers
70 views

Undefined control sequence error in using spy TikZ library

My minimal working example is as follows. \documentclass{article} \usepackage{xcolor} \usepackage{tikz} \usepackage{graphicx} \usepackage{pgfplots} \usetikzlibrary{spy} ...
2
votes
1answer
31 views

Duplicate values when writing value near coordinate

I am using this code, taken from my question here. The problem arises when two x values have the same y value. Then the label I want to write near the coordinate overlaps with the other one. How can I ...
3
votes
1answer
37 views

Write a value near a coordinate in a plot

I want to do it from a file, rather from inside the document like I do it now: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture} ...
2
votes
1answer
26 views

Problem connecting nodes from and axis environment and using /tikz/scale

Consider this almost-MWE: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots}\pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture}[] \begin{axis}[clip=false, width=12cm, ...
6
votes
3answers
155 views

Drawing the diagram associated with the Second Homomorphism Theorem

I have code for a diagram that resembles the typical display associated with the Second Homomorphism Theorem in Group Theory. In the diagram, $H$ and $K$ represent subgroups of an abelian group G; so ...
1
vote
0answers
56 views

Install TikZ Knots Library [on hold]

I am trying to install the TikZ knots library, but I am having some trouble. My computer is running Mac OS X 10.10.2 with MacTeX (but I don't remember the version/year). spath3 has been downloaded ...
3
votes
0answers
48 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 ...
6
votes
3answers
118 views

Using the “foreach” option in TikZ to make a table

To show that the probability of rolling two die and getting a sum of 7 is 1/6, I wanted to make a table using "foreach" option in TikZ. The following code gives me a table of all the possible rolls. ...
1
vote
2answers
61 views

Getting an error when defining a macro in a TiKZ picture

I like a certain style of vertices in my TikZ drawings so I want to define a macro to save time formatting. It has two arguments, one names the node, the next is its location. It should have a blank ...
0
votes
0answers
41 views

Two minipages side-by-side

I want one minipage with text, to be next to another minipage with two tikzpictures. I have this code: \subsection*{7. Bereken exact de lengte van lijnstuk $TP$.} \begin{minipage}[l]{0.6\textwidth} ...
0
votes
0answers
23 views

LaTeX pgfgantt move inline label above the bar not working

I'm trying to move my already inline labels to above the bar and have attempted to add bar inline label node /.style=north or bar inline label anchor=north or bar inline label anchor/.styles = north ...
0
votes
0answers
25 views

avoid hyphenation in chapter title using tikz and titlesec

[This question is similar to the one here, but the solutions given there do not work in my context] In a (fairly complex) book I'm using titlesec and tikz to produce fancy chapter headings, basically ...
1
vote
1answer
78 views

Command already defined (custom command)

When compiling following code, I the compiler tells me that a command is already defined (the name is \c@b...). \documentclass{article} \usepackage{calc} \usepackage{ifthen} \usepackage{tikz} ...
0
votes
1answer
18 views

pstool + pgfplots/tikz + parskip conflict resolved

A while back a question about a conflict between pstool, pgfplots and parskip packages was asked. I came across a similar problem using the pstool, tikz and parskip packages in concert, and happened ...
5
votes
1answer
57 views

trigonometric function inside newcommand

I want to know if there is a way to define a variable that depends on a trigonometric function, like this. \newcommand{\cosTheta}{cos(30)} Such that it is parsed before using it in a tikz segment, ...
2
votes
2answers
67 views

Typesetting two lines of code in a node command

In the following code, TikZ is to draw four nodes at the vertices of a parallelogram. In two of the nodes, I would like to put two lines of text. I indicate this using //. I thought that using the ...
0
votes
1answer
67 views

Tikzpicture in wrapfigure affects rest of the pages

The wrapfigure does its job. I wanted two tikzpictures to be at the right side of the page. Like this: But then if I look at the next page, it's like the wrapfigure just goes on at the right side: ...
3
votes
2answers
119 views

TIKZ: Stacking two nodes with equal width without double drawing the overlapping shapes

I am trying to stack 2 Tikz nodes directly below each other with no space and without having the double-thick shape between them. Furthermore, both nodes should have the same width, either fixed or ...
4
votes
1answer
62 views

Passing tikz style to custom object

I am trying to create a custom tikz object (mainly based on Complex objects in TikZ: pgfkeys scope and best practice), called blk, which is basically a node with some additional anchor points and ...
1
vote
1answer
26 views

How to reduce length of and edge between two nodes without affecting a custom line marker?

I'm drawing some nodes with to and from edges with some of the edges red, and with a cross through it. I have a custom decoration for the cross, and draw a red arrow head at the end of the line. In ...
0
votes
0answers
25 views

pgfplots axis label positions change unexpectedly

I want the axis labels to appear at the ends of the axes -- the arrows should "point" to them. They are correct in this MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} ...
3
votes
0answers
64 views

Draw an arrow on a closed path in TikZ [duplicate]

Like this, only it doesn't work: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [->] (0, 0) ellipse [x radius = 2, y radius = 3]; \draw [->] (0, ...
2
votes
0answers
65 views

Draw the plane x+y=1 in three dimensions in pgfplots

I want to draw the plane x+y=1 in pgfplots. In this example, z is free and is not explicitly a function of x and y. So I cannot use \addplot3[surf, fill=blue, opacity=0.1, fill opacity=0.4] ...
-1
votes
0answers
50 views

How to draw 3D pyramid using tikz [on hold]

How can I draw this pyramid using tikz? APT is 90 degrees by the way
0
votes
0answers
50 views

Standard timeline with different circle colors

I just saw this amazing post and I was wondering if there was a slight addendum which could be used to make some of the circles in a different color. I also wanted to be able to modify the length of ...
2
votes
1answer
45 views

Drawing elliptical arc with desired major and minor axis

So I am given two points and wish to draw an elliptical arc joining them. More specifically, my code is as follows: \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[H] ...
3
votes
1answer
39 views

Color Mixing/Overlapping Mechanism

Ideally I would imagine that if I overlap the red, yellow, blue three glasses, then I would see more or less a black color in the overlapped region. However by doing this in LaTeX, it seems I was ...
8
votes
1answer
101 views

Why do coordinates in Bezier curves add to the padding in TikZ?

I have a little tikzpicture drawn with a Bezier curve, that I use in the text. I noticed that it has an unusual amount of horizontal white space, more than e.g. a circle: \documentclass{article} ...
3
votes
1answer
47 views

Edit position of nodes in tikz mindmap

I'm trying to make a mindmap with tikz but I want to add some fading (smooth transition between clear blue and dark blue) between the colour of the root node and his childrens. ...