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

Tikz Timeline for Staggered Treatment Help

I am trying to create a timeline that shows when a policy was implemented in certain states. I am a novice to using tikzpicture. My sample period is 2000 - 2023. With the policy treatment starting in ...
0 votes
1 answer
36 views

Having \includepdf overlap pages from different documents

Imagine I have a document A.pdf containing a page that looks as follows: and a document B.pdf containing a page that looks like this: If I write in my LaTeX document \includepdf[pages={3}]{A.pdf} \...
1 vote
1 answer
58 views

Externalize a tikz-cd of tikzpictures

It is known that tikzexternalize and tikz-cd don't play well with each other: Are the TikZ libraries cd and external incompatible with one another?. Now, I have a tikzcd whose entries are tikzpictures....
0 votes
1 answer
17 views

How to render a rotated rectangle on certain cells of a table?

I want to render a rotated rectangle over certain cells on the table. Each cell of the table contains only one digit. How to achieve this using Latex?
0 votes
1 answer
24 views

Drawing bridges with some elements like cars and bicycles

Just for fun. Is it possible to draw the following with tikz (including a small car and a bicycle)? Here's an attempt by me to implement it. \documentclass{article} \usepackage{amsmath} \usepackage{...
-2 votes
0 answers
29 views

flowchart not working [closed]

When I use the code seen here I get the following, And I don't understand why...
-2 votes
0 answers
22 views

Convert Causal graphs draw to latex code [duplicate]

I am aware about some websites as Mathpix in which you can simple upload a screenshot of a formula and get the Latex code for it. I would like to know if there is the same functionality ( I've tried ...
2 votes
2 answers
23 views

Does one need an invisible node to make edge split among nodes?

I am learning how to make flow chart in tikz. In this MWE \documentclass[crop,tikz]{standalone} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} \begin{document} \...
0 votes
1 answer
24 views

How can I change the style of the endpoints of a regular dodecagon from round dots to squares?

I want to draw a cycle with 12 vertices, and the circle's style is a regular 12-sided polygon, so I use the following code: \documentclass[tikz, border=1mm]{standalone} \usetikzlibrary{shapes....
0 votes
1 answer
18 views

Aligning labels on an axis placed with node[below]

I have this code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=0.6,yscale=2,xscale=1.5] \draw[help lines, color=gray!30, dashed] (0, 0) grid (2.5,1.5); \draw[-&...
2 votes
2 answers
45 views

Draw over mutliple subfigures after resizebox

I have several TikZ pictures of different sizes, and I need to use the resizebox function to convert them to the same size and put them into a single figure by subfigure. I also want to add some edges ...
4 votes
2 answers
128 views

making an arrow with text layer over a rectangle

I have a code that looks something like the following, where I have arrows with text crossing over a dashed line from a rectangle. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{...
9 votes
3 answers
475 views

Slice letters using fractal pattern

How can one obtain something like in the photo bellow using Tikz? Look what I've got using tikz decoration library \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.fractals} \...
0 votes
0 answers
18 views

Error with using Forest and Tikz externalization

I can't seem to figure out why my forest externalization fails. It always works properly on the first compile, and if I clear any temporary files from my directory, but otherwise making any change to ...
4 votes
1 answer
73 views

Tikz: Slanted shading with shadings library

I'm trying to create a slanted shading effect on a tikz picture. I already have this effect working for the top and bottom, but have not found a way to get this working right for the left and right ...
10 votes
2 answers
414 views

How to draw a circle with a background image

Can anyone help me to make an image like this on TikZ. The code (MWE) that I have created is as follows: \documentclass{article} \usepackage[bahasai]{babel} \usepackage[dvipsnames]{xcolor} \...
0 votes
0 answers
8 views

color scatter points (bubbles) based on column of data set and print only the used legend entries

My question builds on How to colour scatter points and create legend entries based on a data type column and I just copy the answer from @Symbol 1 : \documentclass[border=9,tikz]{standalone} \...
0 votes
1 answer
61 views

Drawing Kagome lattice

I have been looking for a package to draw different lattice types. For example, I need to draw the Kagome lattice. What could be the best way to draw this structure? Also, is there any dedicated ...
1 vote
1 answer
30 views

axis environment with rotate option doesn't work well with 'fill between'

I am trying to recreate the following figure using pgfplots: I tried the following code, but it results in 'fill between' misbehaving, especially the blue color as shown at the bottom Figure. % ...
0 votes
1 answer
66 views

Extend TikZ/pgfplots axis arrows without grid

How can I extend axis arrows outside of the grid without also extending the grid? This is the closest I can get: \begin{tikzpicture} \begin{axis}[ axis x line = center, axis y line = ...
0 votes
1 answer
65 views

Writing chapter number using tikz

I'm looking to write the chapter number in roman using tikz. I tried to double the rule, and add the tikz node, but it didn't work properly. This is the example I'm aiming to ''resemble'', at least. ...
3 votes
3 answers
121 views

Align text horizontally in first 3 columns of a table with the top of figures in 4th column

I have the table below with 9 rows and 4 columns. The first three columns are text, but the 4th columns has figures generated using Tikz. As it stands now the text aligns horizontally with the ...
1 vote
1 answer
43 views

TikZ - Combining fading and fill opacity

I am trying to have a transparent fill as well as set the total transparency of the shape. The bottom example should be a combination of the two above. How can I manipulate the transparency value of ...
0 votes
0 answers
19 views

bubble plot in tikz (pgfplots): add legend corresponding to bubble sizes

Given the minimal working example provided in Bubble Plot in tikz with size depending on value and color defined by a fixed group , I want to add a bubble legend like it can be produced in Matlab and ...
3 votes
1 answer
119 views

Make TikZ symbol behave like constant

Answering this question: Overlay a 0 with a | I made this code: \documentclass{article} \usepackage{tikz} \newcommand{\zerobar}{ \begin{tikzpicture}[baseline, overlay] \node[anchor=base] {$0$}; \draw (...
1 vote
1 answer
258 views

How to make this header with tikz in latex

I would like to make this header below with tikz in latex for use in tests at the school where I work.
0 votes
0 answers
43 views

Accessing files generated by TikZ

I'm working on a project with Overleaf and use \tikzexternalize[prefix=tikz/] for externalizing the pictures. The output pdfs are generated. Do I have to download the pdf files and upload them again ...
0 votes
1 answer
37 views

Cross out a transition of automaton

I have the following automaton. \begin{tikzpicture}[>=latex, >=stealth', auto, node distance=0.5cm and 1.5cm, semithick, initial text=] \node[state, initial] (q0) {$q_{0}$}; \node[state] (...
1 vote
1 answer
73 views

How can I have multiple title page backgrounds, that are controlled from with my beamer theme?

It seems I am missing something while defining my title page in beamer. This was my first attempt (of course more sophisticated visually): \documentclass[aspectratio=169]{beamer} \usepackage{tikz} \...
0 votes
1 answer
112 views

pgfplot x axis ticks aligned with a matrix beneath |

How can I make something like this as shown in the image using pgfplots in latex. I want the x-axis tick marks aligned with the other texts as shown in the image.
1 vote
2 answers
34 views

fills with \tikzfillbetween

I have this code and I want to fill between A and B but I can't. I think \tikzfillbetween has a specially packaged one, but IDK. ‎\begin{minipage}{5.8cm}‎ ‎\begin{figure}[H]‎ ‎\begin{center}‎ ‎\...
1 vote
1 answer
179 views

How to extend a line passing through two points until it intersects the x-axis {or y-axis}?

How do I draw a line passing through two points (A) and (B), in my case its (0.1,40) and (1,0), and extending that line until it intersects the x-axis of the plot on a log-scale? Is there a way to ...
1 vote
1 answer
60 views

How to create a tcolorbox with fancy title box and with left and bottom borderlines

I would like to use the tcolorbox below to hold exercises for my students. I tried to reproduce with codes below: \documentclass[12pt,a4paper]{article} \usepackage{tcolorbox} \usepackage{amsmath,...
0 votes
1 answer
22 views

Using foreach to add variable number of rows to a bytefield inside a TikZ node? (part 2)

I am trying to add a variable number of fields to a bytefield, inside a TikZ Node. An earlier question (Using foreach to add variable number of rows to a bytefield inside a TikZ node?) gave helpful ...
1 vote
4 answers
82 views

Drum score using musixper package from Musixtex

It is needed to implement a drum score for Bass Drum, Ride, Hi-Hat, Snare, Clave, Cow Bell, The basic code is as follow: \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage{polyglossia} ...
1 vote
1 answer
475 views

How do you create a keyhole contour not centered at the origin?

I've been trying to create a keyhole contour where the keyhole is a tiny circle in say, the first quadrant, and the main circle is still centered at the origin. I'm specifically not trying to create a ...
1 vote
1 answer
30 views

Package pgfkeys Error: I do not know the key '/tikz/10mm)'

When try to shift vertically a Tikz node that use pgfkeys coordinates it shows an error message: Package pgfkeys Error: I do not know the key '/tikz/10mm)' The basic code is as follow: \documentclass[...
0 votes
1 answer
43 views

Setting an opacity range down to transparency

I have this tree in forest and I'd like the colors of each zone to fade to transparency before the color reaches the next zone, but whenever I play around with fading the opacity settings of the ...
0 votes
1 answer
28 views

TikZ not showing up image in VS Code, latest Mac OS, latest MacTex distribution (Freshly installed 2022 using the .pkg)

I was wondering why thee images are not showing up. For the code From :https://www.overleaf.com/learn/latex/TikZ_package \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \...
2 votes
1 answer
46 views

tikz externalization and glossaries give cryptic error

As per the title, I am trying to compile the following with the latest TexLive: \documentclass{article} \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize \tikzexternalenable \usepackage{...
1 vote
0 answers
33 views

tikzmath produces an error when the trigonometric functions are used [duplicate]

Why does the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{math} \begin{document} \begin{tikzpicture} \tikzmath{ coordinate \v; \v = (cos(pi),sin(pi)); } \end{...
0 votes
0 answers
34 views

How do I add a point that says 'CM' (centre of mass) at the point where the forces of mgcos(theta), mgsin(theta and mg extend, shown by the red point

An image of the diagram is shown, I aim to make it say CM but am not sure how to. The code is shown here: \begin{wrapfigure}{r}{3.2cm} \begin{tikzpicture}[>=latex',scale=1.425] % save length of ...
0 votes
2 answers
55 views

Arc with nodes evenly distributed

Im using the beamer template for a presentation. I'd like to have a coordiante system where there is a smooth arc from the upper left to the lower right as a pareto front. On this arc, I want to have ...
0 votes
1 answer
107 views

Problem plotting 3D data from file using surf

I am trying to plot 3d data as a surface plot. However the result is not the one I would like to obtain. Here is the code: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{...
3 votes
1 answer
34 views

Adding braces above other braces on timeline graph

I am trying to add two orange braces as shown in the picture below: I am struggling to place them (in orange) on my diagram. Below is my MWE: \documentclass{standalone} \newcommand{\ImageWidth}{11cm} ...
2 votes
2 answers
99 views

Drawing a Flowchart for a Degree Plan

I am new to drawing flowcharts using tikz. I need to draw a flowchart similar to the following one: However, I could not get elbow arrows. I need to get elbow arrows that do not intersect the other ...
2 votes
4 answers
167 views

semicircle centered at chord center

I need a semicircle node centred at chord center. The positioning is achieved with the option anchor, but the external lines are still directed to center. Is it possible to direct lines to chord ...
0 votes
0 answers
50 views

Recreate and old physics course (solid state) illustration in Tikz

As hobby i'm recreating a 22 years old course notes of my professor in solid state physics. He did the following figure (no comments...): Using Matcha.io drawing tool i have redraw it in a different ...
1 vote
1 answer
36 views

Rotate part of Tikz code

I'm trying to create the following picture in tikz: I managed to plot it, but not with the upper part being tilted: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz, pgfplots} \...
4 votes
2 answers
54 views

Tikz sweeps location of text inside node with Hebrew

For some reason the text of the second node is not printed inside the box of the node, but on the complete opposite side of the tikzpicture. Any idea on how to fix it? \documentclass{beamer} \...

1
2 3 4 5
659