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
2 votes
1 answer
52 views

Define coordinate for multiple tikzpicture

I have multiple similar tikzpicture (used with beamer overlays). Is it possible have a single coordinate definition that would be usable within each tikzpicture ? This would avoid duplication in the ...
Jav's user avatar
  • 309
0 votes
1 answer
43 views

Formatting table with plots

Can someone help me format this table: I would like a little bit of space between the plots and the upper and lower margin of their respective cells. I dont know how to make the weaky relu function to ...
juan19.99's user avatar
2 votes
2 answers
58 views

Is decorations.text not properly compatible with the tikzmark library?

I've tried getting this strange error message across 2 different documents so far (that I've tested), and it only happens when I combine the usage of tikzmark with decorations.text, both of which are ...
Atex's user avatar
  • 210
1 vote
0 answers
52 views

Tikz strange behaviour [closed]

I use the following code in Tikz : \begin{tikzpicture} \foreach \a/\n in { 0/i, 60/s, 120/t, 180/3, 240/5, 300/7 } { \node[circle, draw] at(\a:2cm) (v\n) {$v_{\n}$}; } \draw (vi) --...
Hugues Cassé's user avatar
1 vote
1 answer
80 views

Graph hardly readable - pgfplots options difficult

I am trying to create a plot representing the number of articles about resilience over a period of time. The data comes from a txt file, looking like this: Publication Years Record Count % of 141519 ...
Orsu's user avatar
  • 113
1 vote
2 answers
105 views

Measurement elements [closed]

Do you know how I can draw this and implement it in an electrical circuit?
Jose G Lopez's user avatar
-1 votes
1 answer
88 views

Existence and uniqueness [closed]

Sorry, I am new to LaTeX. How can I make this figure or something similar from Nagle's Differential Equations book in a TikZ code?
Carlos Eduardo Velez Cantos's user avatar
2 votes
1 answer
80 views

Print macro in \addplot node label

I use a foreach loop to plot multiple curves via the \addplot command. The values that are necessary to define the relevant curve in each iteration are defined through some macros with the command \...
Laura Roich's user avatar
1 vote
0 answers
31 views

MacOS Preview redaction tool breaks PGFPlots graphics

Using MacOS's built in file viewer Preview, I am attempting to redact information in a document built with LaTeX, containing graphs from PGFPlots. However, saving the file after using the redaction ...
Mingus's user avatar
  • 23
2 votes
1 answer
56 views

Rough edges on pgfplots contour

I am trying to make some filled contour plots using tikz and pgfplots. I am following the examples on the manual https://tikz.dev/pgfplots/reference-3dplots#sec-4.6.9. The manual shows the contour ...
durounseki's user avatar
5 votes
3 answers
487 views

How to anchor between "X.north" and "X.north west"?

How can I get the dash-dotted line to appear between the other two? Currently, both lines are anchored to "A.north west" (and the regular dashed line is effectively at "A.north"). ...
Andrew's user avatar
  • 51
2 votes
2 answers
244 views

Is it possible to reduce the number of loops?

Below is a graph I drew using TikZ, which achieves the purpose. However, I feel that my code is still not concise enough because it uses four for-loops. Is there a more concise method? \documentclass{...
licheng's user avatar
  • 795
3 votes
1 answer
338 views

How to draw this diagram using latex?

How to draw this diagram using latex? Here is my code: \usepackage{tikz} \usetikzlibrary{shapes, arrows.meta, positioning, fit} \begin{document} \begin{figure} \centering \begin{tikzpicture}[ ...
Bruce xing's user avatar
0 votes
1 answer
49 views

How include graphics image at origin in TikZ picture?

In a drawing program (Linearity Curve) I drew a closed curve southeast of the upper-left corner of the canvas and exported the result as shape.png. That canvas has coordinates (0,0) fixed at its upper-...
murray's user avatar
  • 8,640
0 votes
0 answers
50 views

draw a Rectangular cuboid ABCDEFGH [duplicate]

I need draw a Rectangular cuboid so I have this code \documentclass[a4paper,12pt]{article} \usepackage{tikz} \tikzset{every picture/.style={line width=1.5pt}} \begin{document} \begin{...
Ellen Ellen's user avatar
2 votes
2 answers
153 views

How to control the start and end of arrows

I would like to fix the following plot: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning,calc} \usepackage{pgfmath} \begin{document} \begin{tikzpicture}[ reader/.style = {...
pablo's user avatar
  • 515
2 votes
1 answer
105 views

TikZ vs. pgf syntax

In the following LaTeX source taken from https://tex.stackexchange.com/a/435766/13492, do I correctly understand the syntax that the \draw let ... on line 7 continues through to the semicolon ...
murray's user avatar
  • 8,640
0 votes
1 answer
41 views

How to indent items inside a `tikzpicture` and `minipage` package?

I have a tikzpicture and minipage environment below, and I would like there to be a slight indent in the sub-categories a, b, c, etc. For example below: a. Sub-second \\ and a. again sub. How can I do ...
user321627's user avatar
3 votes
2 answers
136 views

CPU Register concept sketch using TikZ

I want to draw a CPU register set as shown at my hand-made concept draw: My LaTeX source so far is: \documentclass[tikz,border=0pt]{standalone} \usepackage{xstring} \StrLen{Register Rx}[\RegStrLen] ...
olStckEx's user avatar
  • 449
0 votes
0 answers
24 views

pgfpages layout "two screens with optional second" with "second top" do not show shading picture correctly

In the following code, a shading colour is created firstly, and then used in pgfpicture to show it in the top of the second logical page. When using option "second right" for the layout &...
xyz's user avatar
  • 156
2 votes
2 answers
183 views

To draw a tetrahedron with its center

I need a tetrahedron with a its center and I would like to label all of them, but I do not know how to find a way for the center. I saw this To draw a labeled tetrahedron. For my case I need a ...
user118746's user avatar
1 vote
1 answer
43 views

LuaLatex, Tikz and Strings in Plot

Before I start my real plot, I try smaller things I consider to use. Finally, I want to draw CPU register mapping similar as shown before here at StackExchange. Anyway, here is my latex source: \...
olStckEx's user avatar
  • 449
1 vote
1 answer
37 views

How to rotate nodes around their center without displacing the location

I would like to rotate with a different angle the rectangle nodes A,B, C, D and E of this plot: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{pgfmath} \begin{...
pablo's user avatar
  • 515
1 vote
2 answers
78 views

Draw a coordinate line [closed]

I want to draw numerical intervals like in this picture. If it is possible, the arrow style should be the same as in the picture.
Stitz's user avatar
  • 13
0 votes
1 answer
27 views

Update bib reference in tikz image pdf

I have a tikz image that I can't import directly using the standalone package because the text would come out weird and the alignments are all off. But within this image I need to include a few ...
albusSimba's user avatar
0 votes
1 answer
34 views

align image at the top right corner

I would like to align image at the top right corner. The align right works fine, how can I align it vertically to the top? \documentclass[border=5mm]{standalone} \usepackage{graphicx} \usepackage{tikz}...
lucky1928's user avatar
  • 4,179
0 votes
2 answers
55 views

Fill Between Polar Graph Part 2

I have been looking for about 30 minutes and can't figure out how to shade the where area S is (both sides). I can fill the entire plot, but can't figure out how to use a soft clip to highlight the ...
Nick B's user avatar
  • 903
-2 votes
1 answer
57 views

jpg diagram to latex [closed]

I want to obtain this jpg diagram as a latex code to modify the parameters
Sayed Sayari's user avatar
3 votes
1 answer
185 views

Tikz: Grouped Plot with Secondary y-axis

I have been working quite some time on a grouped error bar plot, but I've hit a wall: one of the variables (Variable 2) comes from a logistic regression, so its value/coefficient isn't directly ...
John's user avatar
  • 625
1 vote
1 answer
47 views

Empty nodes with vertical edges in forest?

I have a tree preamble that generates trees with fixed angles, empty nodes, and centered middle nodes in ternary branching environments. I'd like to modify it to always give empty nodes vertical edges,...
argo's user avatar
  • 63
1 vote
2 answers
88 views

Separate nodes in tikz latex

I want to draw this tree in Latex. It is a graph of a structural proof for some code. I have tried \node [draw, circle] {1} child { node [draw, circle] {2} child{ node [draw,circle]...
baristocrona's user avatar
0 votes
0 answers
44 views

Pandoc, equations and OpenOffice writer

I found an elegant way to convert .tex files to .docx format. The text rendering is really good, but some things are missing: The equations are not displayed: I think it is a problem with OO Writer, ...
user3204810's user avatar
  • 1,509
2 votes
1 answer
65 views

Fill Between on Polar Plot

I am trying to recreate a graph from the 2024 AP Daily Practice Session. I need to fill in the area of R and directly below it. I have tried FillBetween Command and Soft Clip, but I am just not able ...
Nick B's user avatar
  • 903
2 votes
2 answers
58 views

Write a macro to draw a double line with different color for each single line by tikzpicture

I am trying to draw a double line with different color by tikzpicture like this: \begin{tikzpicture} \draw[red] (0, 0 + .01) -- (1, 0 + .01); \draw[blue] (0, 0 - .01) -- (1, 0 - .01); \end{...
Chenqi Meng's user avatar
0 votes
3 answers
59 views

Adding angles to triangle and labelling them inside?

I'm trying to draw an equilateral triangle in tikz and want to include the angles inside and label them within the angle showing they are 60 degrees each but am now sure how to do this... here is my ...
Duncan Chrystal's user avatar
4 votes
1 answer
69 views

Strange behaviour with tikz[babel] with pdfLaTeX

I noticed a strange behaviour of label processing in tikz when used with the tikzlibrary babel and with pdfLaTeX. Here is the code \documentclass[frenchb]{article} \usepackage{tikz} \usepackage{babel} ...
paulbou's user avatar
  • 103
0 votes
0 answers
40 views

How to use ZurichBT-Roman/Univers/bun font with pdflatex (or lualatex) for text inside a Tikz node

As the title says, I'd liek to use ZurichBT-Roman/Univers/bun fonts with pdflatex (or lualatex) for text inside a Tikz node. How can we achieve this?
Dr Krishnakumar Gopalakrishnan's user avatar
5 votes
2 answers
469 views

Calling TikZ code (speedometer) several time to plot the same graph multiple time

I wonder if there is a way to encapsulate the following tikz code in a function so that I can repeat that diagram several times on the same page. I wanted to be able to redraw the following chart ...
Kernel's user avatar
  • 165
1 vote
2 answers
76 views

Draw two arrows between nodes in tikzpicture

I'm looking how to draw two arrows between nodes such as the red ones my image (the black one doesn't matter). I tried with south,east etc unfortunately I cannot have something like on the picture ...
needhelp's user avatar
9 votes
2 answers
379 views

Curved beam on tikz

I am trying to reproduce the image below : I am not sure how to implement the « curvature » of the beam and adding the axis as a consequence of that is difficult. Can you help me? Thank you \...
Mario Topez's user avatar
3 votes
1 answer
45 views

Adjusting size of operations in quantikz

I am trying to adjust the relative size between gate boxes and simpler gate operations (e.g. CNOTs), but am having some trouble. The main motivation is to draw a large circuit, in which case the CNOT ...
shixian105's user avatar
2 votes
2 answers
78 views

How to align TikZ nodes in different environments to the dimensions of the current line?

What I'm trying to do I'm trying to typeset what is shown in the following graphic using LaTeX. The graphic was created using Inkscape. Note that ... all texts (including the numbers inside the ...
Rodrigo Morales's user avatar
1 vote
1 answer
49 views

How to horizontally center a genealogy tree using the genealogytree package in LaTeX?

I'm using the genealogytree package in LaTeX to create a family tree, but I'm having trouble horizontally centering the tree within the document. No matter what I try, the tree seems to align to the ...
elconde's user avatar
  • 11
5 votes
1 answer
195 views

Shorten both ends of TikZ arrow

The following code shortens both ends of the arrow so as to move them away from the nodes. Is there show way to shorten both ends with a single option (instead of the two shorten options I show)? \...
murray's user avatar
  • 8,640
1 vote
1 answer
47 views

Struggling to Position TikZ Picture at Bottom of Page with IEEEtran Class

I'm creating my block diagram with tikzpicture, but I'm facing an issue where, despite my attempts to position it to span two columns and place it to the bottom of the page, LaTeX consistently places ...
Diana's user avatar
  • 1,289
2 votes
1 answer
90 views

Why does \tikz add vertical space between textparts

I want to add a little logo at the right upper corner of a page. As recommended in some other threads, I want to use the tikz package. But no matter, where I add my \tikz command, it adds some ...
woelfchen42's user avatar
4 votes
3 answers
154 views

Compare via \ifnum in TikZ to determine node content

In the following source, I'd like the test with \ifnum to display n instead of 4.75 corresponding to the value 4.75 of \x. How should this be done? \documentclass[tikz,border=2pt]{standalone} \...
murray's user avatar
  • 8,640
5 votes
1 answer
285 views

How to draw cool 19th-century-style 3d plots?

I like making 3d parametric plots in tikzpicture, e.g. the one below. My question: is it possible to, instead of decorating the plot with a colour, decorate it with a pattern supported by tikzpicture ...
Pulcinella's user avatar
2 votes
1 answer
115 views

Drawing surfaces with TikZ

As a complete TikZ novice, I want to create surfaces like the following handdrawn one with TikZ: Ideally, this should be coded bottom-up: First you draw the bident with xy-plane at height 0. Then you ...
Max Demirdilek's user avatar
0 votes
0 answers
75 views

completely in red instead of shattered style

i want to mark the area under my graph. I want to have it hatched, but it is completely red. does anybody know how to fix it? thanks! \begin{tikzpicture} \begin{axis}[ width=\figurewidth, ...
Andre's user avatar
  • 11