Skip to main content

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

How to create a command to plot a series of square lattices on a given line?

As the figure below, for a fixed line on a square-lattice layer with the scale of 30*30, it y-coordinate is 12, then I'd like to plot squares on the x-coordinates of 1,6-13,21,28-30, 13 square dots in ...
Meiu's user avatar
  • 514
2 votes
0 answers
30 views

How to fixed the little bug of sharp conjunction of tikzpictures?

When I use tikz to plot the figure, the conjunction of two lines is not connected so good. Shown as below, is there any solution to fix it? Here below is the MWE: \documentclass[border=10pt]{...
Explorer's user avatar
1 vote
1 answer
31 views

How do I make the text bend along the function using tikz if possible?

I am trying to label my diagram with the equation but I would love to make it bend along the equation. I haven't quite figured it out. I am hoping there is a solution involving tikz because it is what ...
Ms Thanh's user avatar
2 votes
2 answers
83 views

Checking if the version of TikZ is newer in a format-independent way

Notice: that question has been answered here, posted to be useful to the general public. I am struggling to write a macro to use in circuitikz to apply the change to arrow tips you can see here (which ...
Rmano's user avatar
  • 42.2k
1 vote
1 answer
56 views

NiceMatrix + Tikz Determinants Picture

I'm having trouble recreating a particular picture I want to use. It's a 3 x 3 determinants formula, which I'm trying to use the nodes created by NiceMatrix to create loops around the entries to ...
Xir0s's user avatar
  • 11
5 votes
5 answers
603 views

tikz diagram skier on a slope

is it possible to reproduce this schema with tikzpicture ? This is what I tried : \documentclass{article} \usepackage{tikz}%,pgf} %\usepackage{pgfplots} %\usetikzlibrary{calc,angles} \usetikzlibrary{...
matheux's user avatar
  • 99
1 vote
0 answers
31 views

Update tikz style of a named node type to be a box with two colours

Right now I have a node type that looks like this (pictured with wires coming out): but I'd like it to just have two colours -- white on the left and orange on the right (no shading). I've read about ...
Adina Goldberg's user avatar
0 votes
0 answers
33 views

PGFplots, tables and multiple paths

I'm trying to use \addplot table to read multiple lines from the same file, but I want to be able to identify them as different paths so that I can apply a decoration on each separately. The result I ...
Antonin Bourgeois's user avatar
5 votes
1 answer
114 views

How can I get `f(2/3) = 20/9` and `f(4/3) = 16/9` of the function f(x) = 3 *x^3 - 9*x^2 + 8*x when I use pgf/tikz

Based on this answer, I am trying to calc f(2/3) and f(4/3) of the function f(x) = 3 *x^3 - 9*x^2 + 8*x, my code \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{fpu} \usepackage{...
Thuy Nguyen's user avatar
  • 1,136
4 votes
1 answer
72 views

PGFPlots library fillbetween causing a bunch of "Missing Character" warnings

When trying to shade the area between 2 paths using the fillbetween pgfplotslibrary, I'm getting the following warnings: Missing character: There is no . in font nullfont! Missing character: There is ...
msom's user avatar
  • 43
1 vote
1 answer
45 views

Tikz graphs not aligned

I've been trying to figure the solution to no avail. I have five graphs, first four are in a 2x2 shape and last one is below them. Issue is that one of them has much higher values on y-axis which in ...
mm6643's user avatar
  • 25
0 votes
1 answer
85 views

TikZ-PGF surface edges smoothing

I have this surface I plotted using Latex but the edge is ragged. Anyone knows how to fix that? I tried increasing the number of samples but the raggedness persists and the computing time becomes too ...
frencho's user avatar
0 votes
0 answers
10 views

Using \boxplot calculated whisker values to sort outliers

I'm working on getting the \boxplot command from the 'statistics' package to calcualte the lower and upper whisker values of a data set read from a sinlge colum .txt file then use those whisker values ...
grandpapocketcandy's user avatar
0 votes
1 answer
38 views

Center Tikz pictures used as tick labels in Pgfplots

I am trying to use Tikz pictures (piecharts) as x-tick labels in a Pgfplots boxplot and while they appear, I cannot get them properly aligned horizontally, in contrast with normal text labels. \...
Filippo Bistaffa's user avatar
0 votes
1 answer
87 views

Two for loops and the second starts with i+1

I need some help with generating an image. (Disclaimer: Most of it is ChatGPT generated). It is compiling so the warning isn't too serious, but it still bothers me and I can't think of a solution to ...
Benedikt Berg's user avatar
0 votes
1 answer
33 views

Strange rendering of 3d surface with pgfplots

I'm trying to use pgfplots to plot the following 3d surface (as it comes out of mathematica) but by using the following pgfplot code which contain the exact same equation as the mathematica code \...
Davide Morgante's user avatar
1 vote
1 answer
77 views

Reproducing the lichess opening tree stat bar

Can LaTeX offer something like this or the like shapes with same info?
Wassim Saeed's user avatar
0 votes
0 answers
50 views

Two dimensional colormaps in TikZ

I have a two-dimensional data on a grid and would want to color the image according to a two-dimensional colormap. What I have in mind is something like this: https://colorstamps.readthedocs.io/en/...
Franz's user avatar
  • 175
0 votes
0 answers
24 views

arrows convergence [duplicate]

I want to make the tips of the arrow next to 𝐸𝑔 converge with each other with a little bit of space between them. Also, I would like the arrows to be thicker. These are the code lines I used: \begin{...
Yusef Hamdellah's user avatar
0 votes
0 answers
45 views

Logarithmic Projection of World Map (tikz)

I was making a little diagram for my kid of places she's been using their (manually scaled) great circle distances and bearings. It occurs to me there might be a way not only to automate the scaling, ...
commonhare's user avatar
  • 2,670
0 votes
0 answers
19 views

Use of the package 'bodeplot' giving warnings and doesn't produce the plot

I am just a beginner and am writing my first report in LaTeX, so excuse me if the solution is very obvious. I am trying to plot asymptotic approximation of bode plots using the package bodeplot as ...
caramalizedTomato's user avatar
1 vote
1 answer
37 views

modify shorten value for inner draw command

To generate a big arrow with white background inside, below code try to draw a small arrow in style define. If the outside shorten value is 0, then current logic works fine, but if define a 5pt ...
lucky1928's user avatar
  • 4,275
2 votes
2 answers
69 views

add customize line header not smooth connected

I would like to add a line and a arrow as head of line like below. it works basically but the connection between the added line and arrows not smooth. I guess I need some thing like --cycle to make ...
lucky1928's user avatar
  • 4,275
6 votes
1 answer
112 views

Naming tikz pics doesn't work on v.3.1.10

In previous versions of tikz the solution of naming pics using a local bounding box used to work. However, in the version 3.1.10, the previous code produces the error: ! Package pgf Error: No shape ...
adn's user avatar
  • 11.4k
2 votes
2 answers
104 views

I cannot get Pgfplots to display all my axis labels

I would like two axes (no graph), both with an axis break at the beginning. The horizontal axis needs to go till 195 and the vertical axis till 80. At the moment, I see the correct values but only the ...
ziadmbaroudi's user avatar
0 votes
1 answer
32 views

groupplot: width and alignment

What do I have to set so that an addplot in a groupplot is as wide as the two bottom ones; and the y-axes lie on a line. \documentclass[tikz, margin=5mm]{standalone} %\documentclass[a4paper]{article} ...
cis's user avatar
  • 8,912
2 votes
1 answer
43 views

inner xsep/ysep 0 not work as expected

I try to understand a answer from here, I modified the answer with inner xsep=0 inner ysep=0. The expected results should be the inner sep should take effect between latter B and the inner circle, but ...
lucky1928's user avatar
  • 4,275
0 votes
1 answer
45 views

Tikz: image act as transparency filter

Tikz allows us to use a blending mode, to turn the first image into the second: This is great, but now I'd like to do the same, but while being able to choose the color of the incrusted image, for ...
tobiasBora's user avatar
  • 8,964
0 votes
1 answer
37 views

draw a circle shape with white inner circle by one command [duplicate]

I would like to draw a circle with white inner circle like below: Below code can do it but I would like to use one command just like: \node[mycircle] (A) {}; Current code: \documentclass{standalone} ...
lucky1928's user avatar
  • 4,275
0 votes
1 answer
54 views

how to draw this bar chart in latex?

I am trying to replicate a plot like this one in latex. I wonder if anyone has some good example codes to share? many thanks,
Vincent's user avatar
  • 137
2 votes
2 answers
46 views

Non-label Marks at points in tikzpicture

Suppose I have a polygon $ABCD$ and I want to put numbers $1$ through $4$ at the vertices $A$ through $D$. How to do that? Thanks. \documentclass[tikz]{standalone} \usepackage{tkz-euclide} \begin{...
Haoran Chen's user avatar
1 vote
0 answers
61 views

What am I doing wrong? My diagram is not displaying as required, my tikzpicture is displaying error message

\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{3d, arrows.meta, positioning, calc} \usepackage{tikz-3dplot} % for 3D coordinate transformation \begin{document} \begin{tikzpicture}[...
Abiodun's user avatar
  • 11
0 votes
2 answers
42 views

Cannot write \Cup in tikz-qtree binary tree structure in LateX

I stumbled upon this problem while trying to create a LateX binary tree in my Overleaf project. Through online tutorials, I found out how to construct said binary tree through the tikz-qtree package ...
Rewerter Retrewer's user avatar
0 votes
0 answers
53 views

final great circle to draw triange group (2,3,4)

I have all the great circles to draw the triangle group (2,3,4) except for one. I'm missing the great circle that would intersect (1) the intersection of the green and violet arcs and (2) the ...
Amy Herron's user avatar
5 votes
1 answer
307 views

How can I get the value of the f(1/2) is 11/4 not 2.75 when I use \pgfmathprintnumber\pgfmathresult?

This is my code \documentclass[12pt,a4paper]{article} \usepackage[left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage{tikz} \usepackage{...
Thuy Nguyen's user avatar
  • 1,136
3 votes
1 answer
30 views

Beamer overlay makes tikz picture move

I am trying to use tikz and beamer overlays to reveal a graph with some nodes that contain a little amount of text node by node. However, the middle note (that is the first node that is uncovered) and ...
YukiJ's user avatar
  • 235
3 votes
1 answer
35 views

draw arc with big arrow between two point

I would like to draw a arc with big arrow like below: I have try below code with big arrow! \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,shapes.arrows} \begin{document} \begin{...
lucky1928's user avatar
  • 4,275
1 vote
1 answer
66 views

Combining `\addplot3` Commands with Separate Colors in PGFPlots

I'm trying to combine all \addplot3 commands into one while maintaining separate colors for different y domains in PGFPlots. Here is the code I have so far: \documentclass[border=3mm]{standalone} \...
mori's user avatar
  • 81
1 vote
0 answers
27 views

Inserting text in header using tikzpicture adds an a space

My MWE \documentclass{book} \usepackage{tikz,tikzpagenodes} % BEGIN_FOLD \NewDocumentCommand{\pageframeHeader}{O{0.75} O{gray} O{0pt}}{ \begin{tikzpicture}[remember picture, overlay, opacity=#1, ...
Al-Motasem Aldaoudeyeh's user avatar
2 votes
1 answer
67 views

Surface of revolution around x-axis

How is it possible to get this picture in tikz/Latex. Rightnow I have the following code. I want to rotate a function around x-axis. Her is my code. \documentclass[border=1cm]{standalone} \...
Rose White's user avatar
0 votes
1 answer
80 views

How to Recreate a Flowchart from a PDF in LaTeX? [closed]

I found a flowchart in the book "Algorithms for Optimization", specifically on page 107 (available here). I would like to recreate this flowchart in LaTeX. Below is the flowchart for ...
Abichouuu's user avatar
0 votes
2 answers
65 views

How do I draw a cone with a generatrix?

How can I draw such an image like this? Here's the code I tried, but it doesn't seem right: \documentclass[tikz,border=2mm]{standalone} \usepackage{tikz} \usepackage{tikz-3dplot} \begin{document} \...
BqBPdx's user avatar
  • 39
0 votes
1 answer
66 views

Energy band structure

I am trying to recreate a plot depicting the energy band structure of a semiconductor, and the overall outcome is great. However, I encountered a couple of issues: I'm unable to reproduce the ...
Yusef Hamdellah's user avatar
1 vote
1 answer
62 views

What is solution to this tikz error?

I am using tikz to create a plot. I get the following error: Package pgfkeys Error: I do not know the key '/pgf/decoration/\pgfkeyscurrentname ', to which you passed 'at position 1 with {\arrow [scale ...
palebluedot's user avatar
4 votes
1 answer
90 views

Making space for contents inserted by tikzpicture

As you see, the text inserted by tikzpicture overlaps with the previous text My MWE \documentclass[a4paper,twocolumn]{book} \usepackage{amsmath} \usepackage{tikz} % BEGIN_FOLD \usetikzlibrary{...
Al-Motasem Aldaoudeyeh's user avatar
1 vote
0 answers
34 views

Is there a way to automatically exclude parts of the output in the TikZ plot path where the dimensions are too large?

Is there a way to automatically exclude parts of the output in the TikZ plot path where the dimensions are too large? I want to make an animation where some points traverse over infinity. In pgfplots ...
Jasper's user avatar
  • 397
0 votes
0 answers
30 views

How to render dspsinewave from https://github.com/tgroche/tikz-dsp

I'm trying to render a sine wave node using: https://github.com/tgroche/tikz-dsp without any luck. I've used the example from https://texample.net//tikz/examples/fir-filter/ on which the code at https:...
Jeremy Reeve's user avatar
4 votes
3 answers
197 views

How to solve the intersection truncation problem of multiple \draw[thick, color=xxx] commands by color?

I was learning foreach command in TIKZ and I want to plot the style and the color shown as below. After consulting the doc of pgfplots, I achieve it by the code as below: \documentclass{ctexart} \...
Explorer's user avatar
2 votes
1 answer
36 views

can a \gategroup box have two labels?

I'm trying to place labels both above and below a single \gategroup box in my circuit, but haven't been able to figure it out, nor find examples on line. For instance: \documentclass{article} \...
gilonik's user avatar
  • 213
7 votes
2 answers
320 views

Decorate equations with arrows using TikZ

How can I draw an arrow on a equation in Tikz by defining points? Here is a starting code. \documentclass[a4paper]{book} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node at (0,0) {$93 \...
H.Gorbanzad's user avatar

1
2 3 4 5
703