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.
35,361
questions
0
votes
1
answer
36
views
TikZ plot of square root (for example) shows breaks [duplicate]
I'm presenting some basic functions to my students, one of them being square root. When using TikZ to represent it, I always see an annoying "break" between 0 and 1, on what should be a very ...
3
votes
3
answers
288
views
Chemistry figure with TikZ
I'm trying to replicate the following figure:
.
I did (in a crude way) succeed to make the boxes, but I don't know how to make the large brackets and the various text in it. This is what I have now:
\...
0
votes
1
answer
41
views
Adding labels about boxed nodes in tikz pictures
I need something roughly along the following figure:
I managed to this in tikz:
\documentclass[border=0.2cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\tikzset{
%Define standard ...
0
votes
0
answers
28
views
Using macro \pgfgetlastxy{\XCoord}{\YCoord} to get x and y component for axis cs
In my MNWE see below, I can't imagine what I am doing wrong. Also see the attached picture. I try to extract coordinate with slightly modified macro given in the answer for tex.stackexchange.com/...
0
votes
0
answers
14
views
tikz-uml on overleaf `tikz-uml.sty' not found [duplicate]
I use overleaf but I cannot compile this code which does not contain any errors.
The error that overleaf gives me is : LaTeX Error: File `tikz-uml.sty' not found.
\documentclass[12pt,article]{memoir}
\...
0
votes
0
answers
19
views
Package pgfplots Warning: Axis range for axis y is approximately empty
I'm trying to plot these following data:
0.000000000000E+0 1.973601225684E+0
1.000000000000E+0 1.973601176100E+0
2.000000000000E+0 1.973601185980E+0
3.000000000000E+0 1.973601205420E+0
4.000000000000E+...
4
votes
1
answer
288
views
Create DevOps cycle in TikZ
My goal is to create a DevOps cycle in Tikz with the established infinity layout, like this one or the one on this page.
I started by using the wheelchart package, but I can't get the formular for ...
0
votes
1
answer
41
views
How to create a square coordinate frame with x in 0~0.72 and y in 0~50 for plotting points in it?
Like the question title, I'm trying to achieve this, like the following MWE:
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
...
3
votes
1
answer
153
views
Center a matrix in a box?
I have a matrix of integers that I would like to center in a rectangular frame; however, as you can see, there is a little extra space below the matrix. How can I equalize the space above and below? (...
0
votes
1
answer
85
views
Explore automatic paging
I'm exploring how to be able to auto-paginate.
I use tikz,
\ExplSyntaxOn
\definecolor{tocline}{RGB}{57, 77, 5}
\cs_set:Npn \ljguo_tocline_box:nn #1#2
{
\begin{tikzpicture}[every~node/.style={inner~...
2
votes
1
answer
92
views
How to properly align a scope and a node?
I am using two different approaches to draw similar looking blocks. Using first approach, I draw first block (top row) made of rectangular nodes inside a scope and name it as group 1. Similarly, ...
2
votes
2
answers
236
views
working with several tikz forest
EDIT: ultimately my problem was how to have several trees in one single tikzpicture and being able to access node positions. See the accepted answer for how to do that. My workaround caused the ...
1
vote
1
answer
57
views
Failing to align recursive tikz pictures to a baseline
\makeatletter
\newcommand{\gettikzxy}[3]{%
\tikz@scan@one@point\pgfutil@firstofone#1\relax
\edef#2{\the\pgf@x}%
\edef#3{\the\pgf@y}%
}
\makeatother
\newcommand\partFTube[2]{% fill, total; ...
6
votes
0
answers
124
views
Can I simulate colour-blindness (in Beamer / TikZ)
I'm putting together a talk on figures for publications, and one point I want to make is about them being accessible to colour-blind readers/viewers. So far I've been using ColorOracle to simulate ...
3
votes
1
answer
114
views
Use the decorate function and mark points on a curve to draw tangents
I am trying to draw tangent for simple curve (f(x) = x^2) with using of decoration={markings, mark= at position #1 with {...}}(see How to get a tangent coordinate system for the decoration of a path?)....
3
votes
1
answer
85
views
How to save coordinates from paths
I want to draw a sequence of connected line segments using separate paths, so I can add arrow tips and tails to them.
In the MWE below, how can I draw a path from the end of (O) -- (A) -- ++(B) to the ...
3
votes
2
answers
179
views
How to move the color blocks into the red frame region marked?
I'd like to use the area below the two first subfigures to place the color blocks, how can I achieve this effect?
The mwe is following
\documentclass[aspectratio=2013]{beamer}
\usepackage{tikz,...
7
votes
1
answer
106
views
Problem with add/.style in tkz-euclide
add is a style for changing the start and end points when drawing a line from one node to another.
Its definition is:
\tikzset{add/.style args={#1 and #2}{to path={%
($(\tikztostart)!-#1!(\...
0
votes
1
answer
136
views
Combined Tikz picture is not inserted
\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{tikz}
\usepackage{tikz-timing}
\...
1
vote
1
answer
59
views
Tikz: How to vertically align text across multiple nodes?
The title says it. In the example below, how can I make the text start from the top in all boxes? So node3, node1, node2 to be on the same top line, like node3 is right now? I have checked this, this, ...
1
vote
1
answer
40
views
Strange extra arrow behavior in tikz because xshift
The following code gives me a strange arrow:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{bending, arrows, arrows.meta}
\begin{document}
\tikz{
\node (P) {$(x+3)(x-5)$};
\...
1
vote
1
answer
96
views
Customizable Vertical Rule / Divider Like `\vrule` With Automatic Height
I need to create a customizable vertical rule (divider) that behaves like \vrule regarding height calculation within different environments, such as minipages, mdframes, arrays, and tcolorbox boxes.
...
1
vote
1
answer
38
views
Date format option not working on genealogytree
I have a genealogytree TeX file that was working just fine when compiling on an old Macbook. I now changed to a Debian based system, and suddenly the file no longer compiles with the required "...
0
votes
2
answers
34
views
Modification of exam `answer plot` to allow drawing partial opacity when `\printanswers` is uncommented
Following up on this question and this question regarding "answer plots" for the exam class, I am running into an issue. I have a region shading at less than 100% opacity. If I try adding ...
1
vote
2
answers
74
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 ...
3
votes
0
answers
59
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]{...
1
vote
1
answer
54
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 ...
2
votes
2
answers
89
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 ...
3
votes
2
answers
119
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 ...
5
votes
5
answers
695
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{...
1
vote
0
answers
46
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 ...
1
vote
0
answers
72
views
PGFplots, tables and multiple paths [closed]
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 ...
6
votes
1
answer
167
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{...
4
votes
1
answer
83
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 ...
1
vote
1
answer
53
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 ...
0
votes
1
answer
101
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 ...
0
votes
1
answer
30
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 ...
0
votes
1
answer
48
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.
\...
0
votes
1
answer
97
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 ...
0
votes
1
answer
40
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
\...
1
vote
1
answer
82
views
Reproducing the lichess opening tree stat bar
Can LaTeX offer something like this or the like shapes with same info?
2
votes
1
answer
130
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/...
0
votes
0
answers
27
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{...
0
votes
0
answers
53
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, ...
0
votes
0
answers
33
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 ...
1
vote
1
answer
46
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 ...
2
votes
2
answers
83
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 ...
6
votes
1
answer
149
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 ...
2
votes
2
answers
115
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 ...
0
votes
1
answer
46
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}
...