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
1 vote
2 answers
49 views

Create number tracing worksheet

I’d love to create something like this using latex. There’s a great post achieving something similar with letters, so I think I just need some tikz code for the digits themselves. Is anybody able to ...
Wendy Taylor's user avatar
2 votes
0 answers
49 views

I cannot define tikz coordinate with foreach statement

I got a weird bug when I want to define and name a list of coordinates \tikz{ \foreach \name/\pos in {{a/(1,0)}, {b/(0,1)}} \coordinate (\name) at \pos ; } The error is {/usr/local/texlive/2023/...
JGressier's user avatar
1 vote
0 answers
22 views

Foreach loop doesn't work inside mdframed to draw points

In this case, I would like to plot some points from the graph of x^2 - x - 6 using foreach (coordinate in the MWE). Unfortunately, when I plug the foreach loop, the error stated Undefined control ...
Wilory Lu's user avatar
  • 101
7 votes
3 answers
530 views

Filling the area below a Bezier curve

I use the following code in order to fill with color the area between a function and the x axis and it works properly. \documentclass[a4paper,10pt]{article} \usepackage{tikz} \begin{document} \begin{...
GSpyros's user avatar
  • 129
0 votes
3 answers
66 views

How to make two tikzpicture's appear one same row

\documentclass{article} \usepackage{tikz} \usepackage{caption} \usepackage{subcaption} \begin{document} \begin{figure} \centering \begin{subfigure}[b]{0.3\textwidth} \begin{tikzpicture} \draw[...
Paul's user avatar
  • 103
-2 votes
0 answers
88 views

Complex images and advanced TikZ in general?

I tried using a sphere and making rough arcs to resemble earth, but it was impossible to connect a lot of arcs. My code mostly consisted of \draw and \fill. Are there other ways to get better at doing ...
Ahmed Samir's user avatar
2 votes
1 answer
41 views

Link A to B with straight lines (instead of curved) - MATHTIKZ

Im struggling with the options in tikz to get straight lines instead of curved lines, when im linking A to B (see picture below). Here is my mwe: \documentclass{article} \usepackage{pgf,tikz} %%%%%%%%%...
Bilal Yilmaz's user avatar
3 votes
3 answers
118 views

ConTeXt failed with remember picture

I want to compile this example : \setuppapersize[A4] \usemodule[tikz] \usetikzlibrary[calc,positioning] \usemodule[fullpage][style={cm,empty}] \setupfullpage [margin=0cm] \usecolors[crayola] \...
Aviroum's user avatar
  • 1,494
1 vote
0 answers
38 views

“every" will change the shape in TikZ in LaTeX?

I am read the TikZ pdf file, in which there sometime use every to define a style, but sometimes not. After comparing every or no every, I found there is a change of shapes. For example: \documentclass{...
Y. zeng's user avatar
  • 1,081
3 votes
1 answer
188 views

Draw lines to divide pages in 2, 3, 4, .... equal parts

Following the topic to divide a page in two equal parts, I can't figure out how to draw a line at the quarter of the page. My goal is to create some multiple short tests on the same page that I'm able ...
Piroooh's user avatar
  • 1,197
2 votes
0 answers
38 views

"+(up:number)" option in Tikz is not relative to the first coordinate?

In Tikz package, one plus (+) represent the relarive coordinate to the first coordinate, but sometimes it is not the case. I see this example in Tikz pdf file: \documentclass{article} \usepackage{tikz}...
Y. zeng's user avatar
  • 1,081
5 votes
1 answer
256 views

Viscosity of a fluid (second version)

Starting from this link with this MWE \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{perspective} \makeatletter \tikzset{recycle bounding box/.style={% execute at end picture={% \...
Sebastiano's user avatar
  • 52.6k
1 vote
1 answer
47 views

Creating a Custom Environment with Boxed Text and Attached TikZ Drawing

I'm trying to create a custom environment in LaTeX that includes boxed text with rounded corners, and I want to attach a TikZ drawing to the top-left corner of the box. I've attempted to implement ...
Mar1One30's user avatar
0 votes
0 answers
24 views

formula in <list of values> for the command \foreach

good afternoon, My computer was on Debian 10 (buster) and I could use the following Latex code : \begin{tikzpicture}[scale=0.6] %valeurs ci-dessous à changer en fonction du repère qu'on veut \def\xmin{...
Kurt Godel's user avatar
5 votes
1 answer
83 views

Problem with Tikzpicture and colors in a foreach loop

I am following on one of my previous questions regarding the use of foreach loop in tikzpicture: Here is a simple description with a code that works but with all markers colored in red: \documentclass{...
Etienne's user avatar
  • 115
1 vote
0 answers
24 views

How to shift objects in 3d while preserving a correct camera angle

Here is a Riemann sphere projecting surface points onto the complex plane. Could someone show me how to shift the sphere up to z = 1? I would like to shift everything else connected to the sphere too, ...
Don Jolly's user avatar
0 votes
1 answer
48 views

TikZ - tikzpicture nested in \graph node

I am trying to nest tikz graph environments into the nodes of a tikz graph environment: \begin{tikzpicture} \graph [layered layout]{ ABABAB -> { AB -> {A, B}, ...
stimulate's user avatar
  • 107
3 votes
1 answer
40 views

circuitikz: three phase generator

I'm trying to draw a simple ac/dc converter schematics with circuitikz. My attempt gives the following result: I would like to have instead of the three sinusoidal current generators a single three-...
G. Gare's user avatar
  • 717
3 votes
1 answer
84 views

Intersection between tangent and circle

I am trying to define the tangent line of a circle at a given azimuth then use this intersection to define segment. The MWE here shows that intersection seems badly computed using [turn]90: command to ...
Sigmun's user avatar
  • 1,111
2 votes
2 answers
142 views

Generate geometric shapes (triangles, rectangles, etc)

I'd like to generate triangles and other shapes by length or angle with according labels to display exam-like questions. My issue is not the math itself but the selection of logic packages and the ...
RootRaven's user avatar
  • 249
6 votes
1 answer
132 views

Incorrect tikzpicture size when using dvisvgm output driver (PGF/TikZ)

I want to produce an SVG file with a node shape, e.g. rectangle. I use the following LaTeX code: \def\pgfsysdriver{pgfsys-dvisvgm.def} \documentclass{article} \usepackage[usenames]{color} \pagestyle{...
Christos Sevastiadis's user avatar
1 vote
1 answer
48 views

Quantikz: Annotation Text Above Gate

For a given gate symbol in the quantikz package, I would like to be able to place text above or below the gate in addition to the gate label. Shifting the text up and using \n to force multiple lines ...
Maxi Poser's user avatar
1 vote
1 answer
18 views

Missing } inserted error using tikz \matrix

My code compiles the matrix fine, but does not seem to realize it's left the matrix environment. If I try to put another matrix immediately after, I get the error "you cannot nest pgfmatrix ...
Aidan Hennessey's user avatar
0 votes
0 answers
39 views

What are these ugly red and blue thick lines when I \addplot+ in tikz beamer?

I need to create an overlay plot in beamer so I am using the "overlay-beamer-styles" library. However my minimum working example turns out very unexpected: Here is the code culprit: \...
trembling_hands's user avatar
4 votes
1 answer
113 views

How to draw such a winding line

I'm trying to draw a winding line like the solid black one in the following figures using tikz. However, I have no clue how to draw such a complex one. Could anyone provide some suggestions? Thanks ...
TurbPhys's user avatar
  • 115
1 vote
1 answer
41 views

Pgfplot coordinates declared in \addplot

I am trying to plot data from a .csv with different data sets (no more than 4). I have added some additional input parameters just for debugging, at the moment the document looks like this: \...
Valentín Gutiérrez Gil's user avatar
2 votes
1 answer
108 views

how do I place the question number above a tikz image

My code is below. I can't figure how to place the question number above the tikz image. Thanks for the help. \documentclass{exam} \usepackage{tikz} \begin{document} \begin{questions} \question \...
Yahya's user avatar
  • 49
0 votes
1 answer
26 views

Use beamer overlays in "normal" latex document

I have some pretty complicated tikz figures with a lot of overlays in external .tex files included in my beamer presentation. To write my paper, it would be very convenient for me to just "pick&...
semklauke's user avatar
3 votes
1 answer
135 views

Fill a domain defined by three inequalities

For an exercise I want to represent graphically the domain of a definition of a function. This domain is described by three inequalities. This is what I have done so far. \documentclass{standalone} \...
Dimitris's user avatar
  • 1,295
0 votes
0 answers
19 views

How to make quantikz brace not thick

How can get a normal (not thick) vertical brace (left of M), just like the horizontal brace at the bottom? \documentclass[ fontsize=11pt, class=scrreprt, border={0mm 0mm 0mm 0mm}, ]{standalone} \...
17tmh's user avatar
  • 91
0 votes
1 answer
34 views

Placing axes origin at xmin and ymin

How can I place the axes origin at x=-20, y=2000? \begin{tikzpicture} \begin{axis}[ legend pos=outer north east, legend cell align={left}, grid=none, ...
user3713179's user avatar
1 vote
0 answers
56 views

Librarys in TikZJax

https://tikzjax.com/ https://tikzjax-demo.glitch.me/ Is it possible to use librarys in TikZJax? I testet \tikzset{ background rectangle/.style={fill=red, rounded corners}, show background ...
cis's user avatar
  • 7,487
2 votes
1 answer
62 views

Changing line height and line thickness with TikZ

I would like to change the distance between successive lines (height distance here 1cm) and also the thickness of lines using the code below if that's possible. I need the reference number and page to ...
Jon's user avatar
  • 491
2 votes
2 answers
75 views

Fill between f(y) and f(x) functions

I want to fill the area between an f(x) functions and an f(y) function. This is what I have so far: \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tikz,bm} \usepackage{...
PlutoDust's user avatar
4 votes
5 answers
251 views

Wonky Diagram with Drawing a Polygon - TiKZ

I am drawing polygons for fun, but I drew a 100-sided polygon, and the 100th and 1st points do not join up very well, and something seems amiss. Here is my code: \documentclass{article} \usepackage{...
Cheese Cake's user avatar
2 votes
1 answer
72 views

LaTeX TikZ: Drawing several neural networks in one figure

I would like to create a figure showing the structure of the critic in the DDPG environment, which consists of three connected neural networks. Here (TikZ: draw two Neural Networks side by side ...
Diodendomme's user avatar
0 votes
0 answers
23 views

What is the best way to report this apparent bug re setting tikz font size in documentclass minimal? [duplicate]

I was using Overleaf to do drafts of various figures and was unable to set the font size. For example, this \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[font=\...
Nat Kuhn's user avatar
  • 646
1 vote
1 answer
91 views

A problem in creating symbols by TikZ

First, a minimal working sample is as follows. \documentclass{article} \usepackage{tikz} \makeatletter \newcommand*\newcirc{\mathrel{% \tikz{% \draw (0em,0em) circle [radius=0.2em];% }}} \makeatother ...
M. Logic's user avatar
  • 3,961
4 votes
1 answer
166 views

How to divide a circle into three equal circles using PGF/TikZ?

I want to draw the following figure: The accepted answer of SebGlav from this post gives some code. The code (due to SebGlav): \documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{calc} \...
learner's user avatar
  • 663
2 votes
1 answer
84 views

Drawing a hexagon structure similar to a Grötzsch graph with TikZ

I am trying to draw a hexagon that is connected to a set of vertices and edges within the borders of the hexagon itself. It is similar to a Grötzsch graph but is a hexagon rather than a pentagon. So ...
phys's user avatar
  • 49
1 vote
1 answer
30 views

How can I shade a (decorated) path or let it fade when it crosses a node?

There's nothing but a path which crosses a node and then splits into three. When crossing the node, which has some text in it, it should either shade or, even better, fade towards the center of the ...
Alexander Wittmann's user avatar
2 votes
1 answer
69 views

Rotation causing gaps around vertices?

The previous question resolved well by the user mickep, but I found rotate causes gaps around many nodes. The nodes and lines are not closely aligned. \documentclass[12pt]{article} \usepackage{...
licheng's user avatar
  • 499
0 votes
1 answer
32 views

How can I resolve the issue of the excess blank space?

I generated the following tikz codes through a software (with slight modifications), but I noticed a large blank space below the figure. Therefore, I wanted to use 'clip' (for example, \clip (-50,-...
licheng's user avatar
  • 499
0 votes
0 answers
35 views

Best latex package to render algorithm diagram

I want to render some algorithms from the Yamaha FS1-R manual https://usermanual.wiki/Yamaha/fs1renasa1.2616977742/view Operators are connected to each others to form an algorithm. What latex package ...
bhamadicharef's user avatar
1 vote
0 answers
57 views

How to create a guassian blur drop shadow with rounded corner border?

I want to have a border with rounded corners around an image. I also would like to have a dropped shadow effect for the image. How can I modified the answers for below question to achieve the desired ...
Pyi Soe's user avatar
  • 311
1 vote
1 answer
65 views

Fill between 4 circle and arc

I need to fill a zone defined by 4 arcs for which I know there centers and radius. I didn't manage to create the contour of this area and fill it. Here is my MWE with circle but the size of the ...
Sigmun's user avatar
  • 1,111
2 votes
0 answers
33 views

Use another parameter for tikzset

I want to define a new Tikz style that uses the same parameters as the object you used. I managed to get the line width, but I am not able to get line cap, for example. \documentclass{beamer} \tikzset{...
Luca Benatti's user avatar
0 votes
0 answers
22 views

titleformat with hang writes it in two lines

I can't find a way for the tikz code of the section text to be written after the section number. I appreciate any help \documentclass[a4paper]{article} \usepackage[margin=3cm]{geometry} \usepackage[...
antonio de la rosa's user avatar
0 votes
2 answers
66 views

How to display (or animate) three figures one by one for certain times, in Tikz/PGF?

In this post, I have learned to plot the following three interesting figures in mathematics (p-adic numers): \begin{tikzpicture} \draw[ ] (0,0) circle [radius=3]; \node at (0,2) {0}; ...
learner's user avatar
  • 663
1 vote
1 answer
42 views

Tikz-feynman [blob] does not appear

I am trying to create a simple fermion that has both a blob and horizontally aligned paths. However, I cannot get my diagram to work with both. With \feynmandiagram, I can create a blob, but not a ...
Ale Frabetti's user avatar