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
0answers
308 views

pgf-umlsd and externalize [closed]

What would be the best solution to make pgf-umlsd and externalize compatible? The latter expects \end{tikzpicture} which is "hidden" within sequencediagram environment the first provides. I guess I ...
5
votes
1answer
522 views

Syntax error using PGF math function in coordinate

I would like to avoid setting too many of the values for the following picture too rigidly. For example, I would like to be able to set the position of point A and forever after that be able to ...
1
vote
1answer
125 views

Arrows underneath numbers (Part 2 question)

I need the code for arrows underneath numbers going in the right direction. I've looked up the commands online and all I have \uarrow which goes to the left and not right.: Thank you Hendrik. My ...
0
votes
0answers
73 views

Plotting a curve with different colors [duplicate]

Plotting a curve with different colors between points which you try to connect smoothly by one curve.
5
votes
1answer
373 views

tikz coordinate calculations gone wild

I'm quite a bit baffled why my coordinate calculations are coming out so differently. All coordinates are where I expect them to be, except coordinate Z. \documentclass{article} \usepackage{tikz} ...
9
votes
3answers
499 views

How to draw two intersecting graphs?

I want to make the following figure. My efforts are: \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{calc,shadings} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
329 views

How can I draw two lines to a block?

I'm trying to draw a control block, but I got problem to connect two input to a block How can draw a line from the u1 to the estimator without drawing on the estimator block? This is what I tried ...
11
votes
1answer
278 views

Increase the arc in a TikZ arrow

This question is a spin-off from TikZ arrow misaligned in italicized text. I'm drawing an arrow from one character to another within a word, using TikZ's \path edge[]. But the arrow's arc is so flat ...
5
votes
1answer
340 views

TikZ arrow misaligned in italicized text

Based on the questions How can I draw arrows between words in linguistic examples? and Add arrow pointing from one table cell to another, I'm trying to draw a curved arrow from one character to ...
1
vote
0answers
193 views

How to bring beauty to this pgfplot? [closed]

We are making a plot as follows: \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{calc,shadings} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \def\xmin{0} ...
3
votes
0answers
171 views

How to vertically align the captions for sub figures in subfigure? [duplicate]

This is my tikz code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,shapes.geometric,arrows,fit,calc,positioning,automata,} \usepackage{amsmath} \usepackage{caption} ...
6
votes
1answer
836 views

How can I add a component to circuitikz?

Similar to CircuiTikZ — create new component I am using circuitikz to create an electric circuit diagram. I have found the preset symbol for the zener diode to be different to the symbol I wish to ...
8
votes
1answer
318 views

Automatically place right angle indicator on normal vector

I'm trying to draw a normal vector on a curve, and use the usual "dot in an arc" symbol to indicate that. Here is what I have so far, which looks alright, but needed manual adjustment of angles and ...
23
votes
2answers
2k views

Does TikZ support interactive animation?

I am plotting a function y = a*x^2 with a is variable constant. I would like to control a interactively but I google and seems that TikZ doesn't support interactive operation. Also, I want to know ...
5
votes
1answer
262 views

Highlight elements in the matrix (continued)

Using @Stefan Kottwitz's solution of Highlight elements in the matrix, is it possible to select one single entry in the matrix? Where does one need to place the left and the right marks?
4
votes
1answer
483 views

how to add dotted line and arc line?

I wish to add dotted line connecting two nodes and an arc line as described in the photo. Here is my code: \documentclass[tikz]{standalone} \usetikzlibrary{ shapes.geometric, positioning, ...
1
vote
0answers
132 views

TikZ based \boxed construct is causing pdflatex to hang [closed]

In standalone code this works for me, drawing a nice red colored box around my equations (based on TikX \underbrace like replacement that I use without any trouble): \documentclass{article} ...
6
votes
1answer
961 views

tikz label coordinates using mathematical expression from foreach variables

\documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \x [count=\xi from 1] in {-3.0,-2.8,...,1.8} \draw[thin] (0,0) ++(\x,2) rectangle ++(0.2, 0.2) ...
3
votes
1answer
73 views

How to adust the location of the inner component in the Outer component constructed by “fit”?

I use "fit" to make two small rectangles inside a bigger rectangle. And then add some words at the top of the bigger one, which causes a large blank space at the bottom of the bigger rectangle as ...
5
votes
2answers
447 views

uncover chemfig molecule (in beamer)

I teach chemistry and wish to demonstrate drawing and naming of chemical structures I use chemfig to draw my molecules and I can do that fine. However, in for example the molecule ...
3
votes
1answer
268 views

generate schematic diagram with shapes and curved path

I wish to generate the following figure: So far I have managed: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \begin{tikzpicture}[transition/.style = ...
2
votes
0answers
140 views

Creating an invitation printable matrix [closed]

I'd like to create an 'invitation matrix' which will be printed on both sides of A2 or A3 paper and looks like this: |front_11|front_12|...|front_1n| |back_11|back_12|...|back_1n| ...
1
vote
0answers
63 views

how to set the size of the star? [duplicate]

I wish to draw the picture described How to add the circle, star inside the diamond? I tried the code: \node[draw, fill, star, star points=6, minimum size=0.1mm,above=of aux, anchor=center]{}; ...
4
votes
2answers
219 views

Why does loading tikz before calling “driver=dvips” make a difference

This question doesn't entirely make sense because I know I don't need to call driver=dvips. But I would like to know whether anyone can explain what's happening. A little background I'm trying to ...
4
votes
1answer
159 views

How to add new line character in the node

I wish to add the new line character in the node, however, I tried several ways, all cannot work. \node[draw, minimum width = 2em, minimum height=1em] (a) {get \\ flight(gf)};
12
votes
3answers
472 views

How can I draw a diamond with a cross in the center?

I wish to draw the cross diamond, however the line of the cross is inside the diamond, like described in the picture. However, I tried the code below, the result is \node[draw, diamond, below=of ...
5
votes
1answer
253 views

Label beside line before a branching node in a TiKZ “tree” chart

I'm very, very new to TiKZ. I'd like to make the (very crude) following diagram with TiKZ: Start | | Process 1 | / \ / \ / \ Item Item | | ...
4
votes
1answer
972 views

How to draw array (data structure) and show partition?

I'm doing a homework for algorithm class where I have to show what a particular array looks like at each step of the quick sort algorithm, in a manner similar to this image: (page from CLRS book). ...
10
votes
2answers
155 views

Place a background relative to the position of an environment

I am trying to place a background that extends the entire page width and whose height depends on the height of the environment contained. For example, the following code provides something to what I ...
2
votes
1answer
512 views

How to add the circle, star inside the diamond?

I wish to add the circle inside the diamond, and star inside the circle like in the photo. However, using my code, \node[draw, diamond, above=of aux] (diamond) {}; \node[draw,circle,above=of ...
1
vote
0answers
63 views

How to draw a slash into the line? [duplicate]

I wish to add a slash into the line as described in the following picture. Here is my code,however, I don't know how to add the slash, may someone help me?: \documentclass[tikz]{standalone} ...
5
votes
2answers
325 views

how to draw the complex work flow using tikz 2.0

I wish to draw a complex work flow using tikz 2.0 because I tried to update the tikz to 2.1, there are many problems. The work work flow is described as follows: I have tried to draw it by locating ...
6
votes
0answers
67 views

How can I draw angles only with the outer line, but not with the line to the center? [duplicate]

I have the following LaTeX-Code: \documentclass{article} \usepackage[pdftex,active,tightpage]{preview} \setlength\PreviewBorder{2mm} \usepackage{tikz} \usetikzlibrary{shapes, calc, shapes,snakes} ...
4
votes
1answer
1k views

includegraphics with TikZ

I am trying to create an environment with some picture in the left margin. Here is the code \documentclass[twoside]{article} \usepackage[paperwidth=170mm, paperheight=240mm, left=142pt, ...
8
votes
1answer
574 views

A perpendicular line to a plane in 3D

I have two line segments identified by two end points each. Two line segments are in the same plane and intersecting at a point. I would like to draw a line (normal of the plane) passing through the ...
3
votes
1answer
146 views

How to extend pgf-umlcd with self association connection?

I have the following UML diagram describing an OrganizationUnit with Persons that fill zero to many Vacancies. The problem lies with need to have nested OrganizationUnits, since pgf-umlcd does not ...
2
votes
0answers
131 views

tikz: code just keeps compiling? [closed]

I was trying to draw arcs in tikz, and I was using code from this site \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} \begin{document} \begin{tikzpicture} \draw ...
1
vote
1answer
387 views

#ifdef analog for LaTeX

For example there is a simple tex-file with following text: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw (0,0) circle (0.4cm); \end{tikzpicture} \end{document} Is it ...
6
votes
1answer
612 views

How to check tikz version using \listfiles Command

I tried to the following code to get the version information about TikZ using \listfiles command. However, there is an error says File amsmath.sty not Found, may someone help me? ...
1
vote
1answer
125 views

TikZ plot leaves empty space when using a predefined color (reopen)

This is a reopening of a question previously asked here that was closed with an incomplete answer. The problem is that using \definecolor in tikz picture leaves an empty space that causes ...
1
vote
0answers
144 views

Change size of axis ticks [closed]

I'm having trouble with my x-axis: I have a bunch of year I want to plot in a bar plot but I can't fit all the years in the x-axis (xticks). How can I reduce their size?
1
vote
1answer
480 views

Arrows in TikZ tree

I've been trying to create a tree consisting out of parents and nodes connected with arrows. I have created almost what I had in mind, except from that the arrows point the wrong direction. could ...
7
votes
1answer
318 views

My Geogebra graph breaks with multiple errors

Updated: I want a graph that drops vertically about 1/3 of the way across and 2/3 across. When I input this into Texmaker it has multiple errors including Dimension too large Package PGF Math ...
1
vote
0answers
34 views

Undefined control sequence, when using font in tikz node [duplicate]

I get the following error when using font keyword in TikZ node Undefined control sequence ...t=\small,black,rotate=90] at (-1/4,22/4) { where the code is, \node[font=\small,black,rotate=90] at ...
7
votes
1answer
826 views

How to draw the structure with rectangles inside

I wish to draw the flow like in the picture using the code below, however, I found it is very hard to locate the rectangles by using Coordinate. Is there any better way to do this? Here is the code ...
2
votes
0answers
559 views

Off Grid Circuitikz Symbols [closed]

Shouldn't circuits line up on the grids? Otherwise, drawing code get messy -- really quick. I have found pins-to-grid alignment to be common practice in most the Schematic/Diagram programs I have ...
8
votes
1answer
358 views

how to draw plots without data in tikz?

I want to draw this plot. I know how to do it with data. But here I don't have any data. And I want to draw this. How would I do it?
2
votes
1answer
174 views

positioning nodes according to their sizes in tikz?

I produced the following output using the tikz code shown below. What I want is for the arrow on the right to have a fixed length relative to the rightmost symbol, not relative to the center of the ...
5
votes
1answer
364 views

TikZ picture overlaps with text

I have a TikZ picture that overlaps with the text. I'm sure this one is easy, but I didn't find a solution. Here is a snapshot: And this is the code: \section{Algorithm Outline} blabla ...
10
votes
1answer
429 views

How to align a node vertical to one node and horizontal to another node?

Is it possible to align node c vertical to node a and horizontal to node b. If I combine the "below=of" and "right=of" parameter, Tikz ignores the first one. \begin{tikzpicture} \node[draw, circle, ...