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
2answers
86 views

tikz diagram question

I want to create the diagram in the pic below and I have the code for the upper part of it, but I have hard time to finish the rest, any help appreciated. my code:- \documentclass[11pt, ...
4
votes
1answer
70 views

Adding two circles in latex?

I want to add to intersecting circles together in latex and remove that area from an even larger circle. My code is as follows: \documentclass{article} \usepackage[utf8]{inputenc} ...
3
votes
2answers
64 views

How to create rectangles of arbitrary size?

I am aware that TikZ tries to create shapes based on minimum size and the text content, but I wish to create some rectangles of arbitrary size as the ones in the following figure: As you can see, ...
0
votes
1answer
90 views

animated proof in latex [closed]

How can I make something like this? I would prefer tikz.
2
votes
1answer
25 views

How to encircle two neighbors node using forest?

I fail to encircle two node \documentclass{standalone} \usepackage[utf8]{inputenc} %unicode support \usepackage{lmodern} \usepackage{tikz} \usetikzlibrary{fit} \usepackage{forest} ...
1
vote
2answers
57 views

Write same vertex labels with TikZ

I am writing an article on graph coloring and trying to make this type of labeled tree in TikZ. (See the attached Figure) The problem is that I have to use same color label (English letter) for many ...
4
votes
2answers
265 views

Big circle with its radii

I don't know how to draw the radii of circle. This is what I can draw \documentclass[tikz]{standalone} \usetikzlibrary{patterns} \newcommand{\greatcircle}[5][]{ \path[#1,pattern=north west ...
1
vote
1answer
30 views

Tikz matrix inside foreach

I want to draw a matrix inside foreach but the compiling is aborted due to some errors. This is my code: \documentclass{scrartcl} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \x in ...
3
votes
1answer
48 views

Filling matrix rows with a user defined key-value macro

I'm trying to create tables with many columns and many empty fields. I'd like to reference the fields later as TikZ nodes to add more TikZ stuff around them, so \matrix{} looked like a good idea. I ...
5
votes
2answers
201 views

How to change fill opacity without affecting the angle label?

Is there an easy way to change the fill opacity of the sector without changing the opacity of the angle label? I tried to use fill opacity=0.5 but the label ("$\alpha$") changes too. ...
0
votes
1answer
30 views

TikZ: create single part node from multipart one with default text

I would like to create a style I can give to a node such that it is a multipart node (2-part, say) with one part's text fixed. I know I how to create multipart nodes using, e.g., circle split and how ...
3
votes
2answers
40 views

How to create a dashed line in HMM

The following code describe a hidden Markov process. Can someone tell me how to add a dashed line between the two rows of the circles, that is, a dashed line separate the observed space and the latent ...
2
votes
1answer
27 views

Use single plot marker in manual “group” legend entries

I have an axis which contains several plots. These plots can be divided into two groups, of which each has a common plot marker. The plots are styled using a combined cycle list. I would then like ...
2
votes
1answer
46 views

A pentagon with labeled edges

I have the following code for a pentagon to be generated using tikz. I'm trying to modify the code slightly, but I haven't been able to progress any further. I would like for the "dots" at the ...
6
votes
2answers
29 views

tikz array lookup

Here's a very simple example; how do I replace foo with an array lookup as a function of \k? I want the red label to be foo, the green label to be bar, the blue label to be baz. ...
5
votes
2answers
87 views

problems using tikzmath

I want to repeat a drawing but rotated 90 degrees. I am trying to use tikzmath but can't figure it out. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} ...
1
vote
3answers
99 views

Shading areas between shapes

I have two circles whose intersecting area is occupied by an ellipse. I need to do: Draw a vertical line dividing the ellipse. Shade the four areas from the intersection of ellipse with the circles ...
2
votes
1answer
34 views

How can I fill a face of cubic with variable color on tikz?

Base on the bellow figure, I want to change color of two face. How it is possible.Both side are the same (just I cant plot correctly one of them). \documentclass[border=10pt,tikz,multi]{standalone} ...
0
votes
0answers
30 views

How to Highlight everything: Text, Tables, TiKZ Pictures

I am aware of Latex text 'yellow' highlighters, however, I am looking for the perfect highlighter, which can simply highlight everything from text, tables and TikZ Figures. Is there a way (for ...
1
vote
1answer
20 views

positioning of label edge (Tikz figure)

I have a problem with the 'sloped' option. See my example below. from s0 to s3 and s3 to s0, the label are too close to the edge. The pos option allows the user to move the label along the path, but ...
1
vote
1answer
85 views

How to plot a wall section

How can I plot a wall section with the part of sin graph in the middle like the one in the picture. I wrote this code: \documentclass{article} \usepackage{tikz} \begin{document} ...
2
votes
2answers
48 views

Tikz - drawing parallel lines that truncate at the same x-coordinate

Currently I have a figure that looks like this : However, I want the parallel lines to be "truncated" at the horizontal line. The lengths of all the parallel lines are equal, and an irrational ...
0
votes
1answer
29 views

pgfplots: percentage in matrix plot

I'm trying to draw a matrix plot with the shown values in percentage. I already tried: nodes near coords = {\pgfmathprintnumber\pgfplotspointmeta\%} Unfortunately this didn't work out. Here is my ...
4
votes
1answer
55 views

In-place calculation of color with tikz and calc

Is it possible to calculate a color value like this in-place with tikz and its calc library? \filldraw[fill=black!{50-95.7/2},draw=black] (1,0) rectangle (2,1); %Gives a 'Missing number, treated as ...
1
vote
0answers
35 views

Histogram with big value and a lot of small value

\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ symbolic x coords={100,95,90,85,81,80}, ylabel = ...
3
votes
1answer
40 views

Can a scope environment behave like a node?

The following flowchart was made in PowerPoint, and it describes the input and output of a function. As you can see, the diagram is quite intuitive: a set of files are piped into "Function", and it ...
3
votes
1answer
42 views

creating scatter plot from data file with missing values (sparse matrix)

I have a data set with multiple columns, where some entries are blank. I want to import and plot this data using tikzpicture. However, the resulting graph looks like some values are repeated. Can ...
3
votes
1answer
32 views

Large Nodes in Tikz Tree Leads to Overlap

In the previous question Large Quantity of Nodes Result in Overlap, I, foolishly, tried to create a tree using Nodes. That approach resulted in overlapping nodes as the tree got larger. User Ignasi ...
4
votes
1answer
52 views

problem with tikz function plot

I have an error in a function with trace tikz I draw three functions of the form 1/2 (Acos (w * t + phi) + abs (Acos (w * t + phi))). the three functions are shifted 120 ° the route of these three ...
1
vote
1answer
56 views

Simple Vertical Timeline with Arrows

I would like to know how to replicate the style of this vertical timeline where the arrows are pointing toward the relevant times on the line. If that is too broad of a request, it would be very ...
5
votes
4answers
605 views

How to draw an ellipse, with the foci, center, and axes labeled?

How do I plot this picture using LaTeX code?
1
vote
0answers
31 views

Large Quantity of Nodes Result in Overlap

When I use a large number of Nodes in Tikz, they begin to overlap (see screenshot below). I tried following the instructions in Overlapping nodes in tikz, but it does not solve the problem in my ...
6
votes
2answers
137 views

Using exp() in axis cs

MWE: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \usepackage{amsmath} \begin{document} \begin{center} \begin{tikzpicture} \begin{axis}[ axis lines=middle, clip=false, ...
4
votes
2answers
34 views

Angular path between tikz nodes

Considering the following MWE: \documentclass{beamer} \usepackage{fontspec} \usepackage{tikz} \usepackage{tikz-qtree} ...
3
votes
1answer
41 views

“perpendicular shift” for paths

I am trying to draw several parallel arrows between the same nodes, to get roughly this result: What I would need is a hypothetical perpendicular shift key, which would shift the edge along its ...
2
votes
1answer
68 views

How to draw a decreasing exponential function?

I'm trying to modify this graph (I would like to drow a graph similar to an equilateral hyperbola like this one My code is: \documentclass[border=2pt] {standalone} %\usepackage{tikz} ...
2
votes
1answer
39 views

modify the scale of x-axis and y-axis

Hi every one I would like to modify the scale of x axis and y axis like this picture. I'm starting from that code. \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} ...
1
vote
2answers
38 views

The word “Table of content” has been removed when using tikz

According to This question the word "Table of content"(in persian"فهرست"), has been removed. I want it back. What can I do? CODE \documentclass[twoside]{book} \usepackage{tikz} ...
4
votes
0answers
57 views

\title after \begin{document}: When to do it?

My answer to Problem using \alert{} in Beamer title with metropolis theme solves an incompatibility problem between TiKZ and \title with \protect-ed contents in beamer documents. Following code ...
3
votes
2answers
104 views

Plotting conjugate diameters of an ellipse

Good morning, I'm drawing an ellipse with its conjugate deameters. My MWE \documentclass{standalone} \usepackage{pgfplots} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \begin{document} ...
4
votes
1answer
70 views

Circular Arrow in the middle of cd without tikz-cd

I have the following commutative diagram \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (m)[matrix of math nodes, row sep=3em, ...
2
votes
2answers
145 views

graph of pendulum

How can I create the arrows on the ball with captions like the one in the picture? \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{calc,patterns,angles,quotes} \begin{document} ...
5
votes
2answers
85 views

Hierarchical semantic network

I would like to reproduce a hierarquical semantic network like this (Memory and Learning, from brain to behavior", Mark A. Gluck) My main problem is to add the lateral information in each box. ...
2
votes
2answers
36 views

Changing linespacing in tikz node text

Considering the following beamer/tikz code: \documentclass{beamer} \usepackage{fontspec} \usepackage{tikz} \usepackage{tikz-qtree} ...
2
votes
1answer
51 views

Rotate Tikz-UML sequence diagram

I'm trying to rotate a Tikz-UML sequence diagram by 90 degrees, but the lay-out is completely screwed up when I do. At the moment, I use following code: \documentclass[11pt,a4paper,oneside]{article} ...
2
votes
1answer
43 views

TikZ macro with list of integers as argument

I would like to write a macro that takes lists as some of its arguments and wonder how to best access the individual entries of these lists. For example, I would like something of the sort ...
1
vote
1answer
34 views

TikZ: cannot extract coordinate from intersection point

I am applying the solution proposed in this answer in order to automatically draw a vertical line at the point where to functions intersect. That solution implies creating a new commands that receives ...
1
vote
1answer
21 views

Label only selected vertices with tkz-berge

I drew the following graph with tkz-berge, but only want vertices "v" and "u" to show up, how can I do this? I've tried with \AssignVertexLabel but I seem to lack understanding of how to use it. ...
1
vote
0answers
67 views

Undefined control sequence when using TikZ

I looked up how to use TikZ to make an ERD using crow's foot notation and found this. When I c/p the code provided there, there is no problems at all,but when the preamble is pasted into mine and the ...
2
votes
1answer
58 views

Why do the values of x-axes in Tikzpicture don't line up vertically, for different plots but with same x-values?

Sub-compilations of MWE I will later create a final file which will show the problem (cf. Main compilation of MWE below), which will need the following input files: test1.pdf, which can be compiled ...