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

How to build cylinders similar to this, but in reverse?

How to build cylinder in tikz like shown in this example The example above builds a set of ever-larger cylinders on top of each other with texts on the side, starting at the bottom. The example output ...
TCR's user avatar
  • 1
2 votes
1 answer
105 views

Can anyone help me to draw this BPMN in latex?

I am unable to draw the pool and message in BPMN. Can anyone please provide the latex code on this BPMN? I provided the code which I had done. \documentclass{article} \usepackage{tikz-bpmn} \...
user3064366's user avatar
1 vote
1 answer
78 views

Function to take two points and return distance for use in node text

This code draws a triangle and labels each side with its length. Currently it uses a let-in expression to calculate the distance of each side. I'm unsatisfied with this as it would be better as a ...
Idr's user avatar
  • 157
1 vote
2 answers
36 views

Rendering area between const plot and lines

I am encountering a bizarre rendering issue for this plot where the filled area appears to leave the area that it is bounded by. Just wondering if anyone else is able to reproduce this error/suggest ...
Richard Rutherford's user avatar
1 vote
1 answer
41 views

format number in tikz plot

The following is an attempt to label an edge with the distance between two coordinates. If I exclude \pgfmathprintnumber from the node text, then I get a value of "120.57292pt", where as I ...
Idr's user avatar
  • 157
0 votes
2 answers
91 views

Drawing Edges that are Rounded Rectangles

I would like to represent a 3-dimensional matching using tikz. I'd like to represent it using something like what appears in the Wiki here. In particular - this is the image from the Wiki: I have ...
Spark's user avatar
  • 155
2 votes
1 answer
48 views

draw brace on tabular table without remember overlay

I have found this great post enter lAdd a curved arrow and a bracket to a table, But I want I want is put the tabular into the same tizkpicture environment and remove the remember overly, which need ...
lucky1928's user avatar
  • 4,179
2 votes
1 answer
57 views

Annotate Equations package behaves weirdly in LaTeXit

I was using the annotate-equations package https://github.com/st--/annotate-equations to create annotated equations. The position of annotations seems to be wrong while rendering it in LaTeXit. The ...
Checco LI's user avatar
0 votes
1 answer
39 views

remove tabularray first row sep lines

Whats proper way to remove first row col sep lines of tabularray table? For below example the vertical lines around A,B should be removed. \documentclass[border=1cm]{standalone} \usepackage{tabularray}...
beetlej's user avatar
  • 1,013
2 votes
1 answer
50 views

Adding annotations on images in minipage

I am trying to add a visual annotation (a rectangle) on an eps file directly using LaTex. I have attached the desired outcome below : For that, this is my code : \documentclass{article} \usepackage{...
Waxler's user avatar
  • 776
0 votes
1 answer
44 views

TikZ: Fix dimensions / fontsizes for simple poker playing cards

The typically sizes of a poker-card are 6 x 9 = width x height, so I choose values \pgfmathsetlengthmacro\w{<card width>}% card width \pgfmathsetlengthmacro\h{9*\w/6}% card height for a "...
cis's user avatar
  • 8,276
1 vote
0 answers
53 views

3D plotting with equations containing equal signs?

I have a few problems with 3D plotting, namely equations with equal signs in it. For example, x^2 + y^2 = 1 yields Package PGF Math Error: Unknown operator '=' or '=1'. Is there anyway around this ...
ItsAtom's user avatar
  • 11
-1 votes
1 answer
78 views

Creating a Disjoint Sets Data Structure Diagram in TikZ

I'm currently studying the CLRS textbook on algorithms and I've come across a figure representing disjoint sets as a collection of trees, where each tree represents a set. I'm looking to recreate a ...
neo's user avatar
  • 13
1 vote
1 answer
32 views

Add row split line between cells right on multirow cell

I would like to add horizontal split line between D,E,F,G cells. I have try add \hline at the end, but it will split the whole line. The multrow cell C should not be splited. \documentclass{standalone}...
lucky1928's user avatar
  • 4,179
2 votes
2 answers
88 views

Trying to build a binomial tree with a node that shows default

I am looking to create a defaultable binomial tree in latex that is similar to the image uploaded. At each node it is possible for the stock to default (the stock price goes to zero). I have looked ...
Jonas Woychick's user avatar
9 votes
3 answers
1k views

Draw a car with TikZ

Original question I have drawn a simple car with this code: \begin{document} \begin{tikzpicture} \shade[top color=red, bottom color=white, shading angle={135}] [draw=black,fill=red!20,...
mzn's user avatar
  • 325
2 votes
2 answers
58 views

Evaluation inside StrGobbleRight

I'm running into a problem with a list of IfSubStr that will be separated by commas and spaces. I don't want the final substring to have that comma and space, so I thought StrGobbleRight(2) would be ...
Rolling Seduction's user avatar
4 votes
1 answer
69 views

Plot is being drawn on layer below gridlines

I'm having an issue with the order of layers in the second figure. In it, the lines and patterns for the plots are drawn on a lawyer below the gridlines. Whereas the first figure's line and markers ...
Mearman's user avatar
  • 43
3 votes
4 answers
148 views

Indexing array of colors and numbers

I tried to draw radial lines of different angles and colors from origin using arrays. \documentclass[tikz, border=0.2cm]{standalone} \usepackage{listofitems} \def \angleArray {0,30,60,90,120,150,180} ...
Leon Chang's user avatar
1 vote
0 answers
48 views

Make all lines same length in Slope Field

In the following slope field, how do you get all the lines to be the same length? \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{tikzpicture} \begin{axis}[ ...
Dan P.'s user avatar
  • 321
0 votes
0 answers
33 views

How can I get TeXstudio to Center a Tikz Picture in its Internal Previewer?

I am using TeXstudio for the first time to draw pictures using the Tikz package. I have previously been using Qtikz. I have also tried using Texmaker to do the same. I'm considering switching to ...
HOO's user avatar
  • 1
2 votes
1 answer
51 views

Line thickness in circuitikz looks bad when rasterized

Is there any way to make the line thickness uniform? \documentclass[border=2mm]{standalone} \usepackage{circuitikz} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ every node/.style={font=\...
Jason S's user avatar
  • 2,838
1 vote
0 answers
37 views

Tikz: Transform an image to change perspective

In Gimp/Krita/… you can apply a "perspective" transformation on an image by setting a different position for each corner, like: Is it possible to do that in TikZ? I tried \pgftransformcm ...
tobiasBora's user avatar
  • 8,814
0 votes
1 answer
34 views

How to use NewExpandableDocumentCommand with a foreach inside a TikZ-matrix

Follow-up question to https://tex.stackexchange.com/a/714853/46023 I have the command \NewExpandableDocumentCommand{\test}{O{} m}{% \foreach[count=\no from 0] \No in {1,...,#2}{%% \node[draw, yshift=-...
cis's user avatar
  • 8,276
1 vote
2 answers
48 views

rotate axis of tikzpicture to show bars in horizontal direction

Example: \documentclass[10pt,border=3mm,tikz]{standalone} \usepackage{pgfplots} \definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}% % \begin{document} \begin{tikzpicture} \begin{...
Simon's user avatar
  • 325
3 votes
2 answers
226 views

Conceptual diagram in LaTeX

How can I write the following conceptual diagram in LaTeX? I am not sure whether it is common to use TikZ for this purpose or if there are other methods available. In the box □, I want to write some ...
BrauerManinobstruction's user avatar
1 vote
1 answer
41 views

newcommand with node into a tikzpicture-environment and into a TikZ-matrix

Why does this not work in common? \newcommand{\test}[2][]{ \node[draw, #1] {#2}; } Only if I say \newcommand{\test}[2][]{ \begin{tikzpicture} \node[draw, #1] {#2}; \end{tikzpicture} } it works ...
cis's user avatar
  • 8,276
0 votes
1 answer
36 views

Using a TikZ created shape within a \caption{} environment

I have the following command \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}\usetikzlibrary{arrows} I want to use this within ...
KZ-Spectra's user avatar
4 votes
1 answer
96 views

Tikz matrix with color nodes (traffic light)

I am trying to adjust a command for traffic light (found from some answer for previos question) such that the border of nodes (circles) will be black (line draw = black!100 inside nodes), but it seems ...
kissmemiau's user avatar
0 votes
0 answers
27 views

Howto enable font embedding with tikzfadingfrompicture? (Use case: Text color gradient)

I want to display a (very big) partially transparent emoji in the background of a document with a color gradient on the emoji). So far, the only successful way for doing so seemed the following tikz ...
branleb's user avatar
2 votes
1 answer
65 views

How to clip a rectangle on a QR Code with TikZ?

I'd like to clip a rectangle at the center of a QR Code, however it can't satisfy my request. The first one clips reversed, then I switch the order of node and clip commands, the second one couldn't ...
Axia's user avatar
  • 514
1 vote
0 answers
21 views

tikz multipartite graph node arrangement

I am very new to tikz (and posting on stackexchange). I am trying to draw a graph with 27 vertices, consisting of 9 independent sets of 3 vertices each. All other edges are included. With the code ...
m42's user avatar
  • 11
2 votes
1 answer
79 views

standalone.cls maximum tikz picture size is 575?

I am trying to create an eps/pdf includeable graphics, and rather than working with fractions, I thought I would simply use large integers. However, somehow the standalone class and tikz don't like ...
ivo Welch's user avatar
  • 3,788
1 vote
1 answer
23 views

TikZ node inside `msccomment` throws `doesn't match its definition` error

I have a protocol in msc where each message has the step (1, 2, 3, etc) next to it. This is done using a \msccomment command. Example: \msccomment[draw=none, msccomment distance=0cm, side=left]{12}{a}....
Daniel's user avatar
  • 429
0 votes
0 answers
24 views

Tikz baseline for multilines nodes

The anchor base is really nice to have… but when we use multiline text, I'd like to be able to refer to, e.g. base 1 for the base of the first line, base 2 for the base of the second line, base last ...
tobiasBora's user avatar
  • 8,814
0 votes
0 answers
18 views

Prevent connection of ends of a partial circle in a 3D tikz picture

I want to draw a 3-dimensional parabola (i.e. plot $z=x^2 + y^2$) with maximal value of z=1 and then mark the part of the parabola where $x^2 + y^2 =1$, $x\leq 0$ and $y \leq 0$, which is part of a ...
Melissa's user avatar
1 vote
1 answer
31 views

Rotating text along the z axis

I am trying to plot this diagram and I want to place text in each of the cells in the grids so that the orientation is the same as the grid. Is this possible? Here is my code: \documentclass{article} ...
Tatzz's user avatar
  • 13
1 vote
1 answer
33 views

Hiding all tick-marks except for ones with custom labels

I've looked at many similar questions but none describe quite what I'm trying to do. I would like to hide all the tick-marks on my axis except for one, under which I have a custom label. Here's a MWE: ...
Giacomo Amaducci's user avatar
0 votes
1 answer
80 views

I would like to make a Fancy Chapter like given template below

I would like to make a Fancy Chapter like given template below % Here is what I tried \documentclass[a4paper, 11pt,oneside]{book} \usepackage{tikz} \usepackage{xcolor} \usepackage{titlesec} \...
Esaias Abera's user avatar
1 vote
1 answer
52 views

LaTeX tikz plot command, Missing number, treated as zero. <to be read again>, with complicated function

I would like to plot some physichs diagram with the plot command in LaTeX. However i ran into multiple issues during my journey, and im currently stuck. Maybe i am pushing the limits on tikz's ...
Döme Kálmán Sarus's user avatar
0 votes
0 answers
58 views

Trouble with plot graphs

I try to compile this example for plotting graphs: https://texample.net/tikz/examples/drawing-graphs/ But, if I compile in TexWorks (pdfLatex or Overleaf) % Drawing a graph using the PG 3.0 ...
Alex 's user avatar
  • 215
0 votes
0 answers
38 views

Instead of repeatedly writing the year I would like the year to appear only once

I cant just delete the year part, would like to know how I have to adjust it s.t. it only shows the year once. %% Code by Claudio: %% https://tex.stackexchange.com/a/197447/221452 %% Uses code by ...
user21161308's user avatar
2 votes
1 answer
39 views

matrix cell name not available

I try to use multipart nodes in matrix and draw lines with cell name. Below code report error:(use pure text works fine) Package pgf Error: No shape named `m-1-1' is known. See the pgf package ...
beetlej's user avatar
  • 1,013
4 votes
2 answers
127 views

Center TikZ path decoration

I would like to draw a spring with the TikZ coil decoration, but I'm unable to center it on the path without fine adjustment by hand. Example: \documentclass{article} \usepackage{tikz} \...
jlab's user avatar
  • 3,257
0 votes
1 answer
133 views

Manually formatting date tick labels using pgfplots

I want to make the plots in PGF/TikZ for my publications. I need to format the date ticks manually (see example from Matplotlib documentation). I define a start date (xmin) and an end date (xmax); in ...
lastdigitalfish's user avatar
3 votes
3 answers
192 views

Node in unwanted position using tikzpicture

I am trying to adjust the position of a node in a tikz figure but for some reason the dot that I create doesn't show in the appropriate coordinate (0,8/3) that is imposed. @codeR suggested me to put ...
Waxler's user avatar
  • 776
1 vote
1 answer
43 views

Image doesn't show in Tikzposter

I'm using Tikzposter and when I've tried to add an image it doesn't show in the pdf, after compilation. I have used this code : \block{A figure} { \begin{tikzfigure} \...
Ourida Chaigne's user avatar
9 votes
4 answers
680 views

Drawing a set partition

I want to reproduce this diagram What I tried : \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) ellipse (3cm and 2cm); \foreach \i in {1,...,5} ...
Dots's user avatar
  • 429
2 votes
0 answers
56 views

pgfplots: find the intersection point of two curves and determine the y value of the intersection point

Thank you for reading my question! Introduction Now I want to draw a picture, in which I need to calculate the intersection point of the two curves and determine whether the y value of the ...
BqBPdx's user avatar
  • 21
5 votes
3 answers
915 views

recreate a figure with TikZ from an entrance exam

Could anyone help me recreate this image on tikz? I don't really know where to start
Willian's user avatar
  • 59

1
3 4
5
6 7
699