Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [tikz-pgf]

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

TikZ, polyglossia, \footnote interference?

With this MWE I can either setotherlanguage{latin} or get the tikz picture to print as desired in a footnote, but I haven't figured out how to do both. Doing both causes "missing \endcsname" ...
0 votes
1 answer
9 views

Tikz forset. grow east Issue with arrows. How to keep them straight?

For my flow chart, if I do not use grow=east option for the tree, it does not fit the page width. Using grow=east makes it fit. But now the arrows connecting the nodes no longer are straight as they ...
1 vote
1 answer
30 views

TikZ: How find min, max of x-values in list of coordinate pairs?

After several \coordinate pairs are created in a TikZ picture, how can I get the minimum and maximum values of the x-coordinates of those pairs, so as to use them further? Toy example (does not ...
1 vote
0 answers
14 views

Rating margin in a document

I'm trying to reproduce this, but I don't have the same thing. \documentclass{article} \usepackage[most]{tcolorbox} \usepackage{lipsum} % Pour générer du texte de remplissage \newtcolorbox{exa}[2][]{...
8 votes
2 answers
257 views

TikZ: how prevent darker fill in overlapping regions?

In this TikZ picture, how do I prevent the overlapping regions from becoming darker than the rest? I want the overlap to be the same uniform color as the rest of the regions. \documentclass[tikz,...
1 vote
1 answer
140 views

Modifying a sunburst chart with % symbols and joint legend

I copied a code from this post to make a sunburst chart, but I need to make 2 modifications that I haven't been able to work out: is to add % into the text, and is to create a joined legend for both ...
8 votes
1 answer
575 views

One tcolorbox with alternative color in different lines

This is what I want to get This is what I already have \documentclass{article} \usepackage{geometry} \geometry{left=2.5cm,right=2cm,top=2.5cm,bottom=2.5cm} \usepackage{fontawesome} \usepackage{...
2 votes
1 answer
48 views

Tikz, font in nodes and node (background) color using LaTeX macro/command

For my actual project I am breaking down my Lua/LaTeX/TikZ problems into several smaller ones. So here is one of the many. First, I'm trying to write a macro for the color of a node. Argument for the ...
71 votes
2 answers
37k views

Draw edges and paths in the background of nodes in TikZ

Is it possible to draw edges or paths in the background of nodes independently of whether they are constructed before or after the nodes are defined? In the following example, the \draw instruction ...
2 votes
1 answer
38 views

How to create a looparrow with tikz?

I'm drawing a commutative diagram in latex and I want one of the maps to signify an immersion, which is denoted by a looparrow in my context, but I can't seem to find how to do it with tikz. I mean ...
0 votes
0 answers
33 views

Recommendations: Present Equations using Tikz

I have 10 rather long equations and I would like to present them visually in a structured way. I thought of a taxonomy tree. Would you recommend doing something like that? Do you have done something ...
3 votes
1 answer
53 views

How to bring to front the "fit"ted rectangle?

I want to have 4 rectangles (with color X) and an bigger rectangle covering these 4 (with color Y). But, when I "fit" the bigger rectangle, I am losing the other 4. \begin{tikzpicture}[ ...
2 votes
2 answers
80 views

How to draw stacked/partially overlapped blocks in Tikz to indicate many items?

I am trying to make something similar to this below (drawn using another software) but in Tikz Currently I use tikz/forest to make my flow diagrams. But I do not know how to make such stacked/...
9 votes
3 answers
395 views

How to name a TikZ path?

How do I name the indicated TikZ path with a name such as X and subsequently use it, for example, to draw it? The code shown does not compile! \documentclass[tikz,border=0pt]{standalone} \begin{...
5 votes
2 answers
126 views

Tikz node position along edge, expressed in absolute distance

Is it possible to set node position in absolute distance along an edge, rather than using pos=<x> where pos=0 is at edge start and pos=1 at edge end (which are relative positions between the two ...
4 votes
2 answers
196 views

How to draw such a diagram in Tikz with both positive and negative bars

How to draw such a diagram in Tikz in the easiest way? You can send a link to a similar example. MWE: \documentclass[tikz, border=2pt]{standalone} \usepackage[main=russian,english]{babel} \usepackage[...
-1 votes
0 answers
45 views

how to create a figure with equation of runge kutti [closed]

I want to create the same figures that are shown on the page, and I want to know if the 28 numbers are page numbers or section numbers.
0 votes
2 answers
63 views

TikZ - Indicate angles in spherical coordinates

Currently, I have the following code: \begin{tikzpicture}[scale=2,tdplot_main_coords] % Draw the axes \coordinate (O) at (0,0,0); \draw[thick,->] (O) -- (1.5,0,0) node[anchor=east]{\(x\)...
3 votes
1 answer
255 views
+50

How to draw cool 19th-century-style 3d plots?

I like making 3d parametric plots in tikzpicture, e.g. the one below. My question: is it possible to, instead of decorating the plot with a colour, decorate it with a pattern supported by tikzpicture ...
5 votes
2 answers
274 views

How to fix the color regions of this tikz figure?

I am trying to fix the blue region in the figure below but the white part is not completely filled yet. Here are the following Latex codes for the standalone figure: \documentclass{standalone} \...
3 votes
1 answer
171 views

Why is 1 cm in tikzmath 28.5 cm long in a tikzpicture?

I define in tikzmath a variable of 1 cm. \tikzmath{ \oneCm = 1cm; } If I draw a line whose length is 1cm, and a second line whose length is \oneCm, they are not of the same length! It's about 28.5 ...
0 votes
2 answers
557 views

Commutative diagram for Hopf Algebra

I'd like to reproduce the following diagram: I've seen there are code for similar exagons on this website but I'm not that good with tikz to generalise them and add the central line.. Thank you!
1 vote
1 answer
53 views

Drawing graphs to visualize Hopcroft-Karp

I am trying to draw graphs similar to the second picture. Using tikz-graphs I was able to draw simple bipartite graphs, but I couldn't get the following things to work: I draw bipartite graphs using ...
0 votes
1 answer
102 views

Why does this MWE not compile (heatmap with contour lines)?

I'm trying to plot some 3D data which is saved in a csv file. Plotting just the color map works fine, but I also need to add the contour lines, so I get a result similar to this: My intuition was ...
1 vote
2 answers
72 views

Draw two arrows between nodes in tikzpicture

I'm looking how to draw two arrows between nodes such as the red ones my image (the black one doesn't matter). I tried with south,east etc unfortunately I cannot have something like on the picture ...
3 votes
1 answer
173 views

Tikz: Grouped Plot with Secondary y-axis

I have been working quite some time on a grouped error bar plot, but I've hit a wall: one of the variables (Variable 2) comes from a logistic regression, so its value/coefficient isn't directly ...
3 votes
1 answer
60 views

Node in TikZ does not align picture into anchor

I struggle to align the picture to the bottom left corner; see the image below. The placeholder picture is taken from this site, and the code is below. \documentclass{standalone} \usepackage{amsmath} ...
7 votes
3 answers
2k views

Borders of a matrix are not well placed

I have the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \colorlet{mlightgray}{gray!20} \begin{document} \begin{tikzpicture}[cell/.style={rectangle,draw=black}, ...
4 votes
1 answer
120 views

How can I center a tikzpicture but still add an arrow to it?

I have this MWE: \documentclass[11pt]{beamer} \usepackage{tikz} \usetikzlibrary{arrows.meta, calc, matrix, overlay-beamer-styles, positioning} \newcommand\Circle[1]{% \tikz[baseline=(char.base)]\...
4 votes
2 answers
285 views

Isn't it possible to display text over a video?

I would like to have text being displayed on top of a video. I tried both multimedia and media9, as soon as the video starts, the text disappears. I also tried creating multiple tikzpicture ...
1 vote
2 answers
99 views

Measurement elements

Do you know how I can draw this and implement it in an electrical circuit?
2 votes
2 answers
56 views

Is decorations.text not properly compatible with the tikzmark library?

I've tried getting this strange error message across 2 different documents so far (that I've tested), and it only happens when I combine the usage of tikzmark with decorations.text, both of which are ...
1 vote
0 answers
61 views

\NewDocumentCommand with TikZ calc library

recently I was doing a lot of various diagrams and found myself experimenting with the \newcommand to define labels and "variables". As such I wanted to expand and experiment with commands ...
2 votes
1 answer
101 views

TikZ vs. pgf syntax

In the following LaTeX source taken from https://tex.stackexchange.com/a/435766/13492, do I correctly understand the syntax that the \draw let ... on line 7 continues through to the semicolon ...
2 votes
1 answer
43 views

customized marker (pgfdeclareplotmark) with color as argumeent

I am trying to customize the shape+color of a marker for a scatter plot. Everythink works when I hard-code the color (e.g. red): \documentclass{article} \usepackage{pgfplots} \usepackage{xcolor} \...
2 votes
3 answers
1k views

Animate PGF Plot from discrete data

I have a tikz picture that contains data points (only a part shown) \documentclass{article} \usepackage{pgfplots} \newlength\figureheight \newlength\figurewidth \setlength{\figurewidth}{8cm} \...
3 votes
2 answers
100 views

plot a function in a subdomain with pgfplots

I'm trying to plot the function $-log(x^2+y^2)$ in a circular domain centered in (0,0). With addplot3 I can plot it on the square domain $[-1,1]^2$. With what I found here pgfplots and ifthenelse, I ...
2 votes
1 answer
48 views

Define coordinate for multiple tikzpicture

I have multiple similar tikzpicture (used with beamer overlays). Is it possible have a single coordinate definition that would be usable within each tikzpicture ? This would avoid duplication in the ...
0 votes
1 answer
38 views

Formatting table with plots

Can someone help me format this table: I would like a little bit of space between the plots and the upper and lower margin of their respective cells. I dont know how to make the weaky relu function to ...
0 votes
1 answer
76 views

To draw a tetrahedron with its center [closed]

I need a tetrahedron with a its center and I would like to label all of them, but I do not know how to find a way for the center. I saw this To draw a labeled tetrahedron. For my case I need a ...
2 votes
1 answer
50 views

Drawing one branch of hyperbola with asymptotes in tikz

I am trying to draw a single branch of hyperbola with tikz and I found in this forum a wonderful script here in this post (@DouglasMencken) : this post \documentclass[tikz, margin=10]{standalone} \...
1 vote
0 answers
52 views

Tikz strange behaviour [closed]

I use the following code in Tikz : \begin{tikzpicture} \foreach \a/\n in { 0/i, 60/s, 120/t, 180/3, 240/5, 300/7 } { \node[circle, draw] at(\a:2cm) (v\n) {$v_{\n}$}; } \draw (vi) --...
1 vote
0 answers
57 views

Graph hardly readable - pgfplots options difficult

I am trying to create a plot representing the number of articles about resilience over a period of time. The data comes from a txt file, looking like this: Publication Years Record Count % of 141519 ...
-1 votes
0 answers
45 views

Mechanical Systems [closed]

A machine with a mass of 150 kg is mounted on 2 springs and 1 shock absorber.Each spring has a stiffness constant K=70000N/m and the shock absorber has a damping constant C=1000N.s/m.The machine has ...
-1 votes
1 answer
83 views

Existence and uniqueness [closed]

Sorry, I am new to LaTeX. How can I make this figure or something similar from Nagle's Differential Equations book in a TikZ code?
2 votes
1 answer
74 views

Print macro in \addplot node label

I use a foreach loop to plot multiple curves via the \addplot command. The values that are necessary to define the relevant curve in each iteration are defined through some macros with the command \...
1 vote
1 answer
500 views

Anchoring boxes for slide layouts in Tikz and Beamer

I've been reading the tikz manual, and I was able to generate this MWE: \documentclass[xcolor=dvipsnames]{beamer} \usepackage{tikz} \usetikzlibrary{calc, intersections,through,backgrounds,positioning}...
0 votes
0 answers
71 views

tikz colorbar with logarithmic scale

I would like to create a colorbar with tikz that matches the color scheme that I use in a figure that I import as a PDF file. The color scale should be logarithmic from 1e-6 to 1e-2. However, I only ...
5 votes
3 answers
469 views

How to anchor between "X.north" and "X.north west"?

How can I get the dash-dotted line to appear between the other two? Currently, both lines are anchored to "A.north west" (and the regular dashed line is effectively at "A.north"). ...
2 votes
1 answer
37 views

How to achieve consistent vspace between minted environment annotated by tikzpicture and next paragraph?

I am using tikzmark and tikzpicture to annotate code examples. I noticed that there is inconsistent vspace between the next paragraph(or text line) and the code examples. I tried \vspace{-1em} or ...

1
2 3 4 5
699