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)

2
votes
1answer
40 views

How can I define a shifted point with tkz-euclide?

I would like to re-create the following image: Source: https://de.wikipedia.org/wiki/Datei:Feuerbachkreis_radius.svg I have everything, execpt for the horizontal lines. To create them, I think ...
19
votes
1answer
337 views

How to draw points in TikZ?

Very often we need to draw points. Every one of us has it's favorite method to do this. What is yours ? Do you use nodes, pics, marks, ... ? In a style ? Some backgrounds In the tikz/pgf manual ...
6
votes
2answers
136 views

Drawing knots with tikz - no visible crossings

I'm trying to draw some knots with tikz. I've got this far: \documentclass{article} \usepackage{tikz} \usetikzlibrary{knots} \begin{document} $\begin{tikzpicture}[domain=-2:2, scale=0.3] \begin{knot} ...
3
votes
1answer
49 views

TikZ crosses-decoration does not work

When trying to compile the examples from the manual like \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} \tikz \fill ...
5
votes
1answer
49 views

Problems with pgfmath

I drew a parabola graphic y = 0.5 - a x^2 which crosses the x axis at the "roots" points 0.75 and -0.75 and has a bend at coordinate (0, 0.5). And I want to mark a point on the parabola, which has a ...
4
votes
2answers
78 views

Position labels in automatic way at end of a line

Using tkiz, I would like to position labels at line ends in automatic way. Unfortunately "auto" centers labels at ends of line. Example \documentclass[a4paper]{article} \usepackage{tikz} ...
1
vote
1answer
52 views

Trim excessive whitespace from top of 3d pgfplots graph

Using the data in this file, I have the following plot: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{savetrees} \begin{document} \begin{figure}[b] \centering ...
2
votes
1answer
75 views

Having two forest figures and using tikzmark

I have two forest figures in the same figure environment and I want to use tikzmark in both of them. The outcome is supposed to look like this: My current code is this: \documentclass{article} ...
4
votes
2answers
74 views

Draw a pyramid with tikz

I want to draw the following pyramid in latex (preferably Tikz as I am somewhat familiar with it) I have found This topic that explains how to do a nice pyramid, but with my longer text I cannot ...
2
votes
1answer
51 views

Edge weights and node labels

I am trying to draw a graph with node and edge weights. Here is what I've managed to do so far. I've placed node names. but I want to place node weights under the circles. And I want to put edge ...
0
votes
1answer
108 views

TikZ correspondence between two levels

Can you help me in writing the TikZ code of the following image? I have written the PSTricks code: \psscalebox{1.0 1.0} % Change this value to rescale the drawing. { ...
5
votes
1answer
54 views

How can I have text along a path with pgfplots with marks?

I am using the decorations.text library to set text along a path drawn by pgfplots. The decoration works fine without marks, as suggested in this answer, but with marks on the path, the compilation ...
1
vote
0answers
51 views

How do I do a scatter with trend line?

I'm trying to remake this table from an article about Nested Containment List by Alekseyenko: I have a file with all my points in this format: 1183 0.561 1222 0.384 1473 0.425 1941 ...
3
votes
1answer
87 views

Why do TikZ Bézier curves print as rectangles when part of a closed path?

When we compile this code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} % Some variants of closing the path \coordinate (a) at (0,0) ; \coordinate (b) ...
2
votes
2answers
81 views

Tikz Inside Table Cell

With my severely limited LaTeX knowledge, I am trying to modify an existing macro to produce bridge diagrams. Inserted is a basic output. I would like to center the Tikz-drawn square in the (almost) ...
2
votes
2answers
78 views

How to draw a shape like file archives? [duplicate]

How to draw a shape like this using TikZ?
4
votes
1answer
63 views

Defining a variable in Tikz and using it in a table

I read the page Define a variable in TikZ about how to define a variable in tikz, but I am trying to then put these values in a table and getting errors. It seems latex is not remembering the white ...
17
votes
3answers
771 views

Reproducing image of a spiral using TikZ

I'm trying to reproduce the spiral shape in the picture below in TikZ, I'm not interested in the atoms and the text, just the spiral. I want the spiral to be coloured green like in the image. I was ...
2
votes
1answer
59 views

Define text color for all tikz nodes of a particular type

I want a particular node type in tikz to have a specific text color. Currently, I have defined a macro for text color. But I need to keep using that macro at every node. Is not there a better ...
1
vote
1answer
62 views

Help drawing vectors in a PGFplots axis environment using calculated coordinates and \draw

Why does using \draw and calculated coordinates not follow what a graph of projectile motion ought to look like? Any suggestions for code that would work using formulas in coordinates? ...
2
votes
0answers
73 views

Convert image to code (TikZ? PSTricks?)

I have a ... pdf file, which contains figures of plots such as the following: Now the second plot isn't too hard to draw on TikZ (I assume... I hope? I don't have any experience apart from ...
1
vote
1answer
60 views

LuaLatex and TikZ

I am having some difficulties with LuaLatex and TikZ. Can some explain to me what is wrong with the following MWE: \documentclass{amsart} \usepackage{luacode} % read this somewhere, doesn't change ...
3
votes
2answers
49 views

How to align two pgfplots that are overlapping?

I'm fairly new to pgfplots. I'm trying to graph two things, and have them plot side by side. However, when I use subfigure, my plots (and axes labels) overlap. How can I fix this? ...
5
votes
2answers
110 views

Label above node in TikZ

I wish to add a label above a node that already contains a label. \begin{tikzpicture}[scale=0.8,every node/.style={draw=black,circle}] \node (a) at (0,0) {a}; \node (b) at (2,0) {b}; ...
2
votes
1answer
50 views

How to annotate chemfig drawing with circles and lines?

I want to draw circles on top of a chemfig molecule and then connect these circles with elements in a table above. I have gotten this far: \documentclass{memoir} \usepackage{tikz} ...
13
votes
2answers
283 views

Defining a vector of variables in Tikz

I have the following animation in beamer: with the following code (probably not optimal): \documentclass{beamer} \usepackage{tikz} \usepackage{multimedia} \begin{document} ...
3
votes
1answer
88 views

Milestone graphic in TikZ with rectangles

Within the forum I found this nicely designed milestone / timeline graphic: Milestone graphic in TikZ Regarding this graphic I would like to make two adaptations: How can I adjust the code in order ...
3
votes
2answers
180 views

Drawing knots in the middle of two brakets (knot-package)

I'm trying to draw a knot in the middle of two brakets. My idea so far: \documentclass{article} \usepackage{tikz} \usetikzlibrary{knots} \begin{document} $\left\langle \left\langle ...
7
votes
2answers
105 views

TikZ node as character in text

I use a modified version of the TikZ-solution in another question to draw rounded rectangles around some text to mark it as a button of a program. It's no problem for single characters, but if I use ...
13
votes
1answer
224 views

tilted planes as scopes

I am trying to rebuild the following 3D graphic with TikZ. Exact resemblance is not required, and I have actually decided to change the geometry and style a bit to increase the clarity of the ...
4
votes
2answers
128 views

fa-home icon using TikZ

I am trying to get a fa-home icon in a document that I am compiling using pdflatex. I am aware that fa-home works only under XeLaTeX. Is there anyway, I could reproduce this icon using Tikz drawing? ...
4
votes
1answer
33 views

Size of a node with shortstack

I try to get my self defined node \preproc the same size as the defined blocks but I don't get it. I tried to use minimum heigth and minimum width (as I did in the style definition for the blocks), ...
1
vote
1answer
89 views

Plot within a TiKz picture

I have a tikz picture and wanted to include a curve whith the following form: 1/(x^2+1) I can plot the function for a positive domain, e.g. [1,4]: \draw[domain=1:4,smooth,variable=\x] plot ...
3
votes
1answer
80 views

How to set intervals for step-like plot (`const plot`) in pgfplots?

How do I set the precise intervals that pgfplots should consider when performing addplot with the option const plot mark mid? For example: \documentclass{article} \usepackage{pgfplots} ...
4
votes
0answers
95 views

TikZ: Is \tikztonodes incompatible with arc?

Consider the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows, decorations.text, decorations.pathmorphing, decorations.markings, positioning, shapes} \usetikzlibrary{} ...
2
votes
1answer
73 views

Color fade a line in tikzpicture

I had already a similar question. I know now how to color fade rectangles. But I was trying now for almost an hour and I couldn't figure out how to do a fading for a line. \documentclass{article} ...
3
votes
2answers
88 views

Orthogonal shift of a line

I want to shift a line by some amount in some direction. Here the direction is fixed, orthogonal to the line. One difficulty is that the line should be drawn like it would be at the origin position. ...
5
votes
2answers
116 views

Draw a tree with tikz

I have some problems I am not able to fix with this tree in tikz: 1. how can I avoid the empty space near the root? 2. how can I write a text on branches? I used "edge from parent" but does not work ...
3
votes
1answer
44 views

Combining a matrix and timeline in a tikz object

I have created a tikzpicture with a matrix with a timeline element. It is difficult to place the timestamps at either end of the timeline appropriately. Does anyone have a suggestion? Thanks! Edit: ...
3
votes
0answers
72 views

Help with a stacked cluster graph

I want to compare the weight and volume of two power options. One consist of FC, battery and motor and the other consists of 4-stroke engines i edit the following code but it doesn't give me the ...
3
votes
1answer
71 views

How can I name a label node?

I have recently discovered the possibility to adjust the baseline of a tikzpicture via the baseline=... key. However, this requires the node at which the baseline should be oriented to have a proper ...
4
votes
2answers
84 views

Two-lined brace in tikz node

I want to produce a timeline in the tikzpicture environment that looks like this: But my code, gives me the following: So I need the brace around both lines of my node! My code now looks as ...
1
vote
0answers
35 views

Strange behaviour involving nested TikZ pics an the to path [duplicate]

I have become quite fond of using TikZ pics, but sometimes I run into some unexpected behaviour. As far as I know, if you define coordinates like (-A), (-B),... inside a pic and draw the pic later as ...
4
votes
1answer
57 views

I want Tikz template for taxonomy Tree like the below mentioned image.

I could not find any Tikz template to fit in the same amount data like the below image. I did not get the same kind of template also. Am trying to find if there is any other alternative or same kind ...
0
votes
1answer
76 views

How to draw the following GERT network node diagram using tikz

How to draw the following nodes in tikz, Kindly help me.
2
votes
0answers
53 views

Problem filling rectangle with a TikZ pattern

I am trying to add a pattern-striped background to a rectangle, but the PDF generated with PDFLatex produces a couple of completely black rectangles instead of the ones filled in with the pattern. The ...
2
votes
0answers
95 views
16
votes
4answers
317 views

How to draw random simple closed smooth curves but with the same perimeter?

I want to draw some random simple smooth closed curves. Each smooth curve must have the same perimeter but different area. See the following figure to illustrate what I meant clearly. Each smooth ...
2
votes
2answers
85 views

Drawing a square with certain labeling

I am using the symmetries of the square to make a neat application to magic squares, but I am unsure about how to represent the symmetries of the square effectively. I would like to be able to typeset ...
4
votes
2answers
153 views

Color gradient in tikzpicture from top to bottom corner

Is there the possiblity to make a color gradient in the rectangular box in the following example from the bottom left to the top right corner (both in linear or radial shape)? \documentclass{article} ...