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
256 views

Rug plot in TiKZ

I wish to draw something like (a kind of rug plot) The plot shows performance of various machine learning methods. I wonder what is the best way to draw perpendicular hooks. Moreover, how can I ...
13
votes
1answer
3k views

Matplotlib's PGF vs Matplotlib2Tikz

I want to generate some plots to be integrated into a LaTeX document compiled with pdflatex. I also want the plot font (legend, title ...) to follow the settings of the LaTeX document. My search so ...
1
vote
1answer
211 views

Make custom tikzpicture section heading non-rigid

Trying to make a custom section heading but I don't know how to make it move fluidly with the text, only by commanding it to be in a specific location on the page. I want it to look like this: This ...
2
votes
1answer
660 views

label overlapping with arrow in tikz

First, the working code: \documentclass[journal]{IEEEtran} \usepackage{libertine} \usepackage{cite} \usepackage{url} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm} \usepackage{...
10
votes
3answers
974 views

Drawing a isosceles triangle on Cartesian plane

An isosceles triangle is to be drawn on the Cartesian plane. The two legs of equal length are to be in the first and second quadrants. (The code that I have gives angles of the two legs as 41 degrees ...
2
votes
0answers
75 views

key [turn] doesn't [closed]

According to the manual (http://www.ctan.org/pkg/pgf p. 142) the following code is sound \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) -- (1,1) -- ([...
5
votes
1answer
254 views

What exactly do the parameters in tikz' \draw-command mean and how do I draw a “T”?

I have a serious problem right now understanding what the parameters of the draw command mean. For a document about neural networks I want to make an example of a system detecting different simple ...
4
votes
1answer
346 views

Curved text within a curved arrow

I am trying to get the text that I place inside a curved arrow to curve with the arrow. I have the following code that generates that given picture, but I wonder how I can get the text to curve with ...
7
votes
4answers
435 views

Why do my arcs end at the wrong node positions?

I am trying to plot some arcs using tikz and the package tkz-euclide. However, it seems that the arcs do not end at the points where I want them to end. For example, consider the following code: \...
8
votes
2answers
268 views

Inaccurate PGF calculation?

I'm trying to implement an invoice calculation in LaTeX and using PGF as the method to do calculations. I've run into an odd problem where it seems that PGF calculates things incorrectly and I'm not ...
5
votes
1answer
926 views

Verbatim inside a minipage inside a tikz node — beamer class

I am trying to get a boxed text as part of a tikz node. I found an example here that I am trying to follow, but it is giving me an error: Argument of \@xverbatim has an extra }. I can't figure it out. ...
2
votes
0answers
36 views

Curly Brace tikZ [duplicate]

Im trying to force Latex to do a \newline on the text of my curly brace, or it doesn't allow me and the result is the following: As you see, there are some curly braces very close, so the texts ...
5
votes
1answer
95 views

pgfkeys computed (i.e., dynamically defined) key

I would like to perform some simple simulation in latex/tikz (in order to produce dynamical graphs). Say something like cellular automata, Ising model, etc. I need to store somewhere the value of ...
2
votes
0answers
53 views

How to draw following complex integration? [duplicate]

I am new to tikz package and want to draw following complex integration contours. I would like to insert these two pictures in my report. I read the previous posts on similar drawings but can't figure ...
2
votes
4answers
209 views

Use of overlay command in a graph

I have a diagram of part of a circle centered at the origin, an angle marked "alpha," a radius, and two line segments having an endpoint on the x-axis. It should have the following two modifications. ...
2
votes
1answer
485 views

How to add vertical and horizontal lines to ybar figure and defining colors for bars?

I'm trying to reproduce a figure from a paper so it would be in line with the visual style of my paper. The figure I'm trying to reproduce is Since originally posting I've found a way to define ...
3
votes
1answer
215 views

How do I test for a new page?

I need to know when I change pages. I thought I had a solution using everypage. It works using \newpage, but not using \vspace. \documentclass{article} \usepackage{everypage} \usepackage{...
4
votes
1answer
338 views

How to remove small value labels from ybar chart?

I can't figure out a way to prevent small values showing in my labels. A problem that looked very similar to mine can be found in here. Due to my non-existent coding skills I couldn't figure out this ...
3
votes
3answers
433 views

how can I use intersection points to draw a proper arc for my simple instance

I would like to join points (s) and (t) via arc. Could u help me to implement it?! I've tried it by such way \draw (s) arc (t); It is wrong! To say simply I need the correct arc without spreading over ...
0
votes
1answer
590 views

How can I draw these pictures in LaTeX (with TikZ)?

I want to draw these pictures with TikZ. But I can not. Please guide me in this regard.
13
votes
3answers
1k views

Tikz: How to create and reuse a picture

I am a beginner in Tikz and I have two questions: I'm trying to draw the picture below but have been unsuccessful (I drew the right part though but couldn't draw the left one) How can I reuse these ...
5
votes
1answer
153 views

protocol message diagram - rectangle - 02

I try to compile this code suggested at this previous answer protocol message diagram - rectangle \documentclass{article} \usepackage[margin=12mm]{geometry} \usepackage{hyperref} \usepackage[...
4
votes
2answers
271 views

Labels in diagram too far from lines

I'm having trouble with the labels in my diagram. I want them closer to the lines, but I can't seem to find a way. Is there any way to put the labels closer to the lines? Here is the code: \...
4
votes
1answer
297 views

Labeling the lengths and angles in a diagram with measurements

I have a diagram that is to be used to define the sine, cosine, and tangent functions. How do I label the drawn radius "r"? How do I draw the angle for alpha? (I am trying to adapt the code that I ...
2
votes
1answer
250 views

Centering TikZ picture inside poster box

I would like to center a tikzpicture inside a posterbox (baposter) \headerbox{Vorgehensweise}{name=definitions,column=3,below=problem,span=3}{ \usetikzlibrary{shapes.geometric, arrows,calc,calc,...
7
votes
3answers
339 views

Decorate with text along the perimeter of a circle using TikZ

Using the following code I am trying to visualize nested circles: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,fpu} \usetikzlibrary{decorations.text} \begin{document} \def\sizeA{...
1
vote
1answer
439 views

How to create this diagram with boxes and arrow?

How to create this diagram with boxes and arrow ? Thanks a lot.
4
votes
1answer
171 views

How can I increase the size of integral inside tikz and the length of the arrow

Code: \documentclass[a4paper,10pt]{article} \usepackage{tikz} \usepackage{amsmath} \usetikzlibrary{arrows,chains,positioning,scopes} % \makeatletter \tikzset{join/.code=\tikzset{after node path={% \...
2
votes
1answer
78 views

Gap at origin when using axis lines*=left in conjunction with line width spec via axis line style

Please forgive the strange graph displayed here - I am simply trying to display a replicable chunk of code in the presence of all the packages I am attempting to use and want to avoid displaying data ...
2
votes
1answer
186 views

Cylindrical Bar Chart

I know this might be a long shot, but does anyone happen to know (or point me to where to start) how to draw this chart. Say we have 6 values (5, 10, 15, 20, 25, 30), one for each column. Thanks in ...
4
votes
2answers
350 views

How can I insert a picture into a TikZ diagram?

I want to insert a picture into a TikZ graphic, is it possible? An example:
3
votes
1answer
194 views

TikZ code no longer compiling

Consider the following code: \documentclass{article} \usepackage{expl3} \usepackage{tikz} \usetikzlibrary{ hobby, shapes.geometric, decorations, decorations.shapes, shapes.geometric, ...
2
votes
2answers
189 views

How can I draw this simple tree in tikz?

How could I draw something like this in tikz ? Thanks \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(.1,0);} \begin{...
0
votes
2answers
113 views

Drawing a tree without nodes

How could I redraw this without nodes and just having dots between arrows? \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{petri} \tikzset{state/.style={circle,...
3
votes
0answers
131 views

Tikz how to extract spherical coordinates

I have X coordinate defined in Spherical coordinate system (the point is to be situated on the circle so it's easier): \def\Sx{0} \def\Sy{0} \def\Sz{2} \pgfmathsetmacro\Sρ{"sqrt((\Sx)^(2)+(\Sy)^(2)+(\...
4
votes
1answer
175 views

Arrow labelling

How would I label the arrows in the following: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{petri} \tikzset{state/.style={circle,draw=gray,inner sep=0pt,...
5
votes
1answer
450 views

Package pgfkeys Error: The key '/tikz/opacity' requires a value

I'm drawing a diagram for a physical phenomenon, "motion in one dimension". I have this figure with a tikzpicture: \documentclass{article} \usepackage{tikz} \definecolor{particle}{rgb}{1.0,0.7,0.3} ...
7
votes
1answer
753 views

drawing water droplets with tikz

I have drawn a few arrows as follows: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing, arrows.meta, arrows} \begin{document} \begin{tikzpicture}[>=Stealth] \...
5
votes
1answer
230 views

Cross in particular plane in 3D

I'm creating tikz graphics in (x,y,z) Cartesian coordinate system. I'm defining objects (circle in my WE) in some plane using \tikzset{xyplane/.style={canvas is yx plane at z=#1}}. I noticed it doesn'...
5
votes
1answer
835 views

Drawing a half arrow with tikz

Is there a command to draw upper half of an arrow in tikz? Something similar to:
8
votes
1answer
215 views

drawing path in foreach loop with pgfsetmacro

I have N points on a circle, I want to draw the intersection of the convex hulls of all sets of N-k consecutive points. The points are not evenly spaced. The values of N and k (and the actual angles ...
3
votes
0answers
252 views

Example from tutorial does not work: problem with edge style in graph [closed]

I tried an example from the TikZ tutorial: \documentclass{article} \usepackage{tikz} %\usepackage{pgfsys} \usetikzlibrary{positioning} \usetikzlibrary{graphs} %\usetikzlibrary{arrows} %\...
6
votes
1answer
129 views

TikZ: How to extract part of a path for later usage

I want to know if there is a way to extract some part of a named path and use this part later on for e.g. stroking. In my example, I want to stroke the line in the middle (the path named mitte) from ...
10
votes
1answer
981 views

Beautiful text - typography

Can anyone show me how to draw something like this. I am thinking of having a quote with similar font but have no idea where to start.
7
votes
2answers
494 views

Adding vertical hierarchy lines to a category column of a table

I often need to represent hierarchies within tables but I've yet to find an elegant way to do this. Oftentimes I do a variation on the following theme, with nested whitespace in the category column: \...
7
votes
1answer
252 views

Drawing Hex Boards with specific boundary

I would like to draw hexagons with specific layout and boundary like: Ideally, the shape of the board of hexagons could be change easily, and the boundaries could be drawn automatically. I did ...
6
votes
2answers
964 views

Interpolation and curve fitting - Tikzpicture? Gnuplot? Pgfplot?

well, I am fairly new to LaTeX, but I tried my hardest do find a solution for my problem but I couldn't find a proper answer, so I hope someone here has the answer or another suggestion for me. I ...
1
vote
0answers
526 views

Organizational Chart / Family Tree using tikz drawing library [closed]

Previous questions showed how this can be done with plain tikz. I wonder if it is possible to use tikz drawing library for this purpose. Here are two previous questions that do this without the use ...
3
votes
1answer
228 views

Why do I get an extra white page before my TikZ picture?

I've created a little diagram in TikZ. Only problem is, it's quite big, so I figured I should use landscape mode for it. Only problem is, when I put it between \begin{landscape} \input{erd.tikz.tex}...
2
votes
2answers
427 views

Aligning ticklabels in secondary y-axis in pgfplot

I want to right align the ticklabels in secondary y-axiz in pgfplot. Here is my output and MWE. Thanks in advance for your help. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat ...