Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [tikz-path]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11 votes
3 answers
2k views

How to Draw Gabriel's Horn

Consider Gabriel's Horn: which, mathematically speaking, is the curve y=1/x over the interval [1,∞] revolved about the x-axis. It is interesting because though it contains a finite volume, its ...
DDS's user avatar
  • 9,768
0 votes
0 answers
57 views

How can I define a custom TikZ path operation?

How feasible is it to define my own path operations, similar to --, to, rectangle, or parabola in TikZ? Specifically, I am looking to create custom commands that could be used in a drawing command ...
ttsc's user avatar
  • 415
2 votes
2 answers
75 views

Path overlaps nodes in TikZ

I am trying to draw a sort of 'locally complete' graph. I know my code is a little ugly, I do not need something very neat, but this appearance is a little upsetting. \documentclass[11pt,tikz]{...
Hmart's user avatar
  • 23
-1 votes
2 answers
81 views

How to add colors in boxes and arrows?

My code is complete, I just want the image to be more pretty by adding colors in boxes and arrows. here's the code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes....
Maryam's user avatar
  • 53
1 vote
1 answer
47 views

Changing the Color of a Single Interval in a Cantor Set made with the Decorate Command

I have the following TiKZ picture of a Cantor Set. \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{decorations.fractals} \begin{document} \begin{tikzpicture}[decoration=Cantor set,line ...
Sidekiq's user avatar
  • 25
1 vote
1 answer
39 views

Adding nodes or Labels to a TikZ Cantor Set made with the decorate function

I have the following TikZ picture made with the decorate command \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{decorations.fractals} \begin{document} \begin{tikzpicture}[decoration=...
Sidekiq's user avatar
  • 25
3 votes
1 answer
135 views

Create command with decoration in Tikz

I am doing a job that is simple but must be done thousands of times. I want to create a command whose inputs are two coordinates ( \coordinate (A) at (0,0); and B at \coordinate (B) at (3,6); for ...
Alejandro Munoz Ossa's user avatar
1 vote
1 answer
75 views

Unable to plot two arrows with tikzpicture, possible bug

The following code does not work: \begin{tikzpicture}[->] \node at (1.85,-1.2) (bF) {$F$}; \node at (1.27,-1.2) (bd) {$d$}; \node at (3.6,-1.2) (bW) {$W$}; ...
Felipe Dilho's user avatar
1 vote
1 answer
80 views

How to uniformly distribute pics on a curve?

I want to create a path in the form of a Bezier curve and place pic figures evenly along the path. In this example, the pics are only placed between the last two points of my curve and they are not ...
krysttof's user avatar
1 vote
1 answer
149 views

Why do lines drawn in TikZ add space equal to their width into the picture and how can this be prevented?

Related: Horizontal space before TikZ picture Consider the following MWE \documentclass{article} \usepackage{tikz} \usepackage[showframe]{geometry} \begin{document} \noindent \begin{tikzpicture} \...
cfr's user avatar
  • 208k
0 votes
1 answer
67 views

Accounting for label width in TikZ paths with control points

I have a simple custom TikZ path style, which may be reduced to the following style: \tikzset{custom/.style={ to path={ (\tikztostart) .. controls ($(\tikztostart)!.3!(\...
varkor's user avatar
  • 608
2 votes
1 answer
112 views

How can I control the path between two pins inside circuitikz

I have created my custom electric component named myIC using the circuitikz.sty library. myIC has three pins labeled PinA, PinB, PinC and a default label myIClabel. I defined this component within the ...
Marco Moldenhauer's user avatar
1 vote
1 answer
49 views

How can I shade a (decorated) path or let it fade when it crosses a node?

There's nothing but a path which crosses a node and then splits into three. When crossing the node, which has some text in it, it should either shade or, even better, fade towards the center of the ...
Alexander Wittmann's user avatar
0 votes
2 answers
57 views

Can I create nodes along the path in this case?

Take this example from the doc: \begin{tikzpicture} \node foreach \name/\angle in {a/0,b/90,c/180,d/270} (\name) at (\angle:1.5) {$\name$}; \path[->] (b) edge node[above ...
Enlico's user avatar
  • 2,612
5 votes
4 answers
492 views

TikZ, fill the space between two paths

I would like to fill the space between the central semi-circumference and the solid black lines above. \documentclass[tikz,border=1.5cm]{standalone} \usepackage{tikz} \usepackage{pgfplots} \...
BowPark's user avatar
  • 1,213
0 votes
1 answer
95 views

TikZ, draw along a path

I have two semi-circumferences with an intersection point defined as E. I want to use different line style/color along them. For this purpose, first I used path to define the semi-circumferences. Now ...
BowPark's user avatar
  • 1,213
3 votes
2 answers
1k views

How do I add text above and below an arrow using TikZ?

I am trying to add text above and below an arrow, but I can't seem to figure out a way to do this without creating two arrows on top of each other, which looks awkward. What I currently have looks a ...
Keroten's user avatar
  • 53
1 vote
0 answers
49 views

What is the relation between path's options in, out, relative, and looseness?

The following example, \documentclass{article} \usepackage{booktabs} \usepackage{tikz} \usetikzlibrary{tikzmark} \begin{document} \begin{tabular}{ll} \tikzmarknode{FooUp}{foo} & foo\\ foo & ...
Enlico's user avatar
  • 2,612
2 votes
1 answer
89 views

How to save/use named paths that are curves

Here is an example of a shape that is formed with 4 lines and 2 curves. I then use the same data to fill that shape with a color. The (correct) result looks like this: The MWE code is here: \begin{...
Aendie's user avatar
  • 265
0 votes
1 answer
104 views

Position a node along a line, without \draw

I have a line going from (0,0) to (4,4). I want to place a node along this line, 75% "away" from the (0,0) coordinate (the starting point). All methods I have seen thus far to achieve this ...
tush's user avatar
  • 1,147
3 votes
3 answers
155 views

TikZ node width depending on two nodes distance

I am trying to make a schematic, where I need to have a rectangle with the minimum width set to the distance between two other rectangle nodes. I tried to follow the solutions from Compute the x ...
Krzysztof's user avatar
  • 121
3 votes
3 answers
668 views

How to shift (or transform) a TikZ path defined by named coordinates?

I wonder if it is possible to shift (or apply any another transformation) a path that is defined by named coordinates. Here is a minimal example: \documentclass{article} \usepackage{tikz} \begin{...
Tobard's user avatar
  • 1,211
3 votes
1 answer
143 views

Is there a decoration to write segment length on a TikZ path?

I am drawing a closed path and what I want is to right each segments length either on or next to the path segment. Manually this is a tedious job, but it would work like this: \documentclass[tikz]{...
TobiBS's user avatar
  • 5,270
2 votes
2 answers
178 views

`\path` arrows pinch outward undesirably

I am trying to draw a depiction of a map that sends $1\mapsto 1/2$, $1/2\mapsto 1/3$, $1/3\mapsto 1/4$, etc. The code I have is given as follows: % page setup \documentclass[11pt]{article} \usepackage[...
Maximal Ideal's user avatar
2 votes
2 answers
331 views

Draw loops in TikZ of different sizes and shapes

I'm trying to draw a graph in TikZ with different-looking loops. In the graph below, I would like to make one loop smaller and the other larger. I would also like to be able to control the shape or ...
Lorents's user avatar
  • 171
2 votes
1 answer
155 views

Draw an arrow to the edge of a node in a tikzpicture

I have written this latex document: \documentclass[dvipsnames,aspectratio=169,10pt,fleqn]{beamer} \usetheme{Madrid} \usefonttheme{serif} \usecolortheme[named=Mahogany]{structure} \usepackage{tikz} \...
diedro's user avatar
  • 179
1 vote
3 answers
224 views

tikz picture | path from a path?

I'm trying to generate the following, which took about 60 seconds in my favourite vector-drawing too, but I'd like some advice on how to render the same thing using tikz: I've cobbled together a MWE (...
Johnny Canuck's user avatar
3 votes
2 answers
188 views

Connecting a path to the corner of a node with the rounded corners option

\documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark} \renewcommand{\thefootnote}{\fnsymbol{footnote}} \begin{document} \Large \tikzmarknode[inner sep=2pt,draw,rounded corners]{...
Lars Malmsteen's user avatar
2 votes
1 answer
61 views

Drawing a path from a tikzmarknode to a node concisely and using the plus-sign line-to operation

I'm editing a 50 pages long article in which I'd like to mark texts using tikzmarknode and then draw a path from it into a node like this: I wrote this this code. \documentclass{article} \usepackage{...
Lars Malmsteen's user avatar
1 vote
1 answer
37 views

Can I make the intersection between the vertical through an `xshift`ed or `yshift`ed node and another node?

From here In general, the meaning of (⟨p⟩ |- ⟨q⟩) is “the intersection of a vertical line through p and a horizontal line through q”. so (p |- q) makes perfectly sense in a \path or whatever. At the ...
Enlico's user avatar
  • 2,612
3 votes
1 answer
167 views

How to mark a single point on path?

I would like to include to one path both lines and points. My problem is that \draw command does not draw stroke a point while a single set of coordinates follows it. I.e. \draw (0,0); gives no ...
forrest's user avatar
  • 970
0 votes
1 answer
59 views

How to change the path of an arrow in tikz?

Basically I want the arrow which is going throught the node not going throught the node, my only solution was to shift the goal node 5mm down, but how can I achieve this without moving the node? How ...
HaDeS_Monsta's user avatar
0 votes
2 answers
62 views

Tikz text ragged left in a path

Here is my MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (11,0) -- (18,1) node [midway, sloped, align=left] (sentence) {This is a sentence}; \end{...
fauve's user avatar
  • 2,531
4 votes
1 answer
119 views

Positioning a node in the middle of a multi point path

To learn Tikz I wanted to recreate the well known reinforcement learning agent -> environment -> agent plot. This is what I currently got: \documentclass[border=0.2cm]{standalone} \usepackage{...
Ruhrpottpatriot's user avatar
3 votes
4 answers
306 views

Improve arched arrow

Can you see the curved arrow? Is there any way to make it more elegant? Right now the arrowhead covers part of the curvilinear section. One idea would be to insert two short horizontal strokes before ...
user3713179's user avatar
0 votes
1 answer
113 views

Showing dots in a path draw

I would like to modify the command \Emmet of the following post so that the consecutive dots are shown by, say, a small colored bullet (obviously I will use the command with fewer dots so that one can ...
xounamoun's user avatar
  • 221
0 votes
1 answer
191 views

How to draw three graphs on the same plane with nodes

I am relative new on latex, I therefore request somebody to assist with a code of drawing three graphs (see attached picture): Below is the MWE: \documentclass[12pt]{article} \usepackage{syntonly} \...
Happy Vilakazi's user avatar
4 votes
3 answers
284 views

Setting tikz path options with a newcommand

Note: I've just realised an answer to this question might not help me - I'd forgotten about the issue in setting 'in' but not 'out' in tikz 'to' path , which kind of makes it ...
N. Virgo's user avatar
  • 4,289
2 votes
2 answers
160 views

How to access a TikZ node's path after it have been created

I explored multiple solution to represent a graph cycle in TikZ with arbitrary nodes distributed around a circle and joined by arrows like the example below. What worked for me was to place nodes on ...
ChrisAga's user avatar
  • 205
5 votes
1 answer
103 views

How to create path that includes arc?

I'm trying to make something like this in one command: I'm doing this via this code: \begin{tikzpicture} \draw (0,0) circle (1); \fill[blue] plot[smooth, left] coordinates {(1,0) (0,0) (0,1)...
heblyx's user avatar
  • 2,591
4 votes
2 answers
253 views

Draw previously named path(s) in TikZ

I have a slightly different question from the already asked here on TeX.SE. I would like to define many paths inside a foreach statement and then use their names later on in the drawing. When having ...
GiuTeX's user avatar
  • 1,309
0 votes
2 answers
92 views

How to determine coordinates of a label?

I have the following code and try to get all H's to the right side of the left boxes since they are currently overlapping. Has anyone an idea how to do that? Thanks!! \documentclass{report} \...
xxoptionxx's user avatar
5 votes
1 answer
193 views

Small position discrepancy in tikz

I was drawing a small diagram with tikz, and I noticed there is a small discrepancy on the position of the nodes according to how you define their position. Here's the MWE: \documentclass{article} \...
Manlio's user avatar
  • 492
1 vote
1 answer
52 views

How to fill a customized shape?

in the following code I want to fill the area defined by $v_2, v_3, v_5$ with dashed lines. I know how to fill a shape if the line connecting $v2$ and $v3$ is not bend with \draw[fill = gray] (v2)--(...
samabu's user avatar
  • 257
2 votes
2 answers
189 views

Draw a line between two lines that inserts each line smoothly

Given two lines, I want to connect both of them in a way, such that the connecting line is smooth. For example consider the following picture: \documentclass{article} \usepackage{graphicx} \usepackage{...
samabu's user avatar
  • 257
0 votes
1 answer
35 views

A path below the nodes

Here is a MWE: \documentclass[a4paper,english,hebrew,numbers=noenddot]{scrartcl} \usepackage{amsmath} \usepackage{amsthm,tikz,twemojis} \begin{document} \begin{center} \begin{tikzpicture} % Nodes:...
heblyx's user avatar
  • 2,591
8 votes
1 answer
775 views

Find midpoint of path

I have two coordinates (v1) and (v2) which are connected by a bended path. Now I would like to connect a third variable (v3) to the middle point of this path, but I cannot figure out how. \coordinate (...
samabu's user avatar
  • 257
9 votes
3 answers
720 views

Drawing perpendicular lines to a curved path in tikz-pgf without decorations [duplicate]

I'm trying to make a image like this: Here's how I'm CURRENTLY doing it: \begin{tikzpicture} \draw[color=black, line width=2pt, -latex] (-3,2.5) -- (0, 2.5) +(0,\rad) coordinate (center) (0,2.5) ...
Sage M's user avatar
  • 93
10 votes
3 answers
518 views

Adding small arcs to a path in specific places

I have a path consisting of a series of straight lines and arcs, and now I would like to modify that path by replacing some segments of the line/the arc with another small arc whose centre is on the ...
Manuel Eberl's user avatar
3 votes
2 answers
134 views

drawing list of Chevron Diagrams (TIKZ)

I am currently trying to draw a list of chevron diagrams using TIKZ. The result should look something like this: preferred result Currently I am so far with my code that I am using Paths. However, ...
HW90's user avatar
  • 131