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)

0
votes
0answers
2 views

How does the stripcommand in the pgfmanual file work?

I am trying to understand how commands are typeset for use in LaTeX documentation. To clarify, not using LaTeX to create documentation, rather to write documentation in LaTeX about using LaTeX (like ...
0
votes
0answers
20 views

Sierpinski triangle tikz [duplicate]

How would I draw Sierpinski triangle using tikz? Basically the first 3 stages as in this picture: All of the images on line the graphics aren't very smooth which I don't like.
1
vote
0answers
27 views

Tikz Polar Fill to Origin

I'm trying to shade under a polar graph. I'm using this code: \documentclass{exam} \usepackage{graphicx} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \fill[fill=gray] ...
6
votes
2answers
145 views

How can I draw this circle with different colour?

I am trying to draw the following picture but I have some difficulties. I code the following: \documentclass{article} \usepackage{xcolor,pict2e}% to allow any radius \usepackage{tikz} ...
1
vote
0answers
18 views

Exporting stacked bars using matlab2tikz in MATLAB working strangely

I have created a stacked bars in matlab as shown in the figure. In matlab figure window it looks like this: I use the following command to get this plot. plotBarStackGroups(rand(5,3,3), [1:3]) ...
4
votes
2answers
54 views

Defining node inside curly braces

I am trying to define a node inside a curly braces {}: \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture} \Tree [.CP \node(y){here}; [.C$'$ C ...
3
votes
2answers
63 views

Drawing a line segment of a specific length that is perpendicular to a given line

I have a typical geometric construction that I want to draw using TikZ. The following code gives a line segment PQ. How do I get TikZ to draw a point on the line perpendicular to PQ and through P ...
7
votes
0answers
51 views

TikZ decoration to draw a winding or twisting ribbon

I enjoy TikZ styles and decorations a lot, but I still dabble with them. I know how to draw ribbons with a style, if they aren't meant to twist. But I'd like to define a style that has a twist of the ...
0
votes
1answer
74 views

Draw picture of electric transformer

I would like to draw an electric transformer close to this image Ideally there would be more spires on one side than the other I had learned to do some tree decision with Tikz, so I can do two ...
6
votes
1answer
114 views

Draw between shapes in Tikz

I'm trying to draw lines from the center circle (General Assembly) to the Economic and Social Council and International Criminal Court circles such that the angle of incidence for the line on all ...
5
votes
1answer
33 views

Putting the endpoints of a line segment “over” the line segment

The display that TikZ gives for the following code is a line segment with endpoints. The line segment is drawn over the endpoints. How do I put the endpoints over the line segment? ...
5
votes
1answer
76 views

Labeling a point using TikZ

In the following code, I want to label the point (1,1) as "P." (It is not exciting, I know. It is part of a graph that I want to draw.) I have the code \node[above right, outer sep=2pt] (1,1) {P}; ...
12
votes
4answers
233 views

Drawing a block diagram with TiKz

I need some help drawing a block diagram using TiKz. I want draw something similar to this: However, I'm struggling to go further than this so far: using the code below: ...
1
vote
2answers
112 views

Making FFT Figure using LaTeX Tikz

I've been writing a paper on the FFT, and need to implement an image showing the basic premise of the 2-radix algorithm used. The image I want to create using Tikz is as follows. However, I've hardly ...
2
votes
2answers
76 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
92 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
34 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
99 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
66 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
44 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
27 views

Unwanted vertical white space in tikz [on hold]

How to delete unwanted vertical white space in tikz
3
votes
1answer
36 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
77 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
40 views

Tikz spy makes move hyperref links [on hold]

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
101 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
112 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?
-1
votes
0answers
84 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
61 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
41 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, ...
2
votes
1answer
86 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. Here is a MWE of what I am currently trying to do. ...
2
votes
0answers
45 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
27 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
29 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
59 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
88 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
72 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
160 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
60 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
2answers
97 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
121 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
63 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
42 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
1answer
34 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
79 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
21 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, ...