Questions tagged [tikz-path]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
124 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
73 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
72 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
137 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
  • 196k
0 votes
1 answer
60 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
  • 509
2 votes
1 answer
103 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
42 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
53 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,572
5 votes
4 answers
458 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,181
0 votes
1 answer
71 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,181
2 votes
2 answers
345 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
  • 43
1 vote
0 answers
44 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,572
2 votes
1 answer
86 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
80 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,115
3 votes
3 answers
136 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
455 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,189
3 votes
1 answer
128 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,230
2 votes
2 answers
165 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
1 vote
2 answers
219 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
  • 160
2 votes
1 answer
145 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
176 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
146 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
49 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
35 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,572
3 votes
1 answer
151 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
  • 958
0 votes
1 answer
57 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
56 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,499
4 votes
1 answer
110 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
296 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
89 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
155 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
220 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,279
2 votes
2 answers
144 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
  • 185
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,571
4 votes
2 answers
226 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,299
0 votes
2 answers
85 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
191 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
  • 480
1 vote
1 answer
50 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
159 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
34 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,571
8 votes
1 answer
647 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
8 votes
3 answers
662 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
  • 83
10 votes
3 answers
486 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
127 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
0 votes
1 answer
66 views

How to Place a Node Relatively to a Decoration Path?

I woud like to place a node below a decoration path (i.e. at something like "myDecoratePath.south") composed of a series of arrows: In order to obtain something like this: Is there a way ...
zetyty's user avatar
  • 769
1 vote
1 answer
73 views

Style the first few characters of text along a path

How can this code be modified so that the first few characters (say 3) are colored red? \documentclass[tikz]{standalone} \begin{document} \usetikzlibrary{decorations.text,calc,math} \begin{tikzpicture}...
Michael's user avatar
  • 665
1 vote
1 answer
164 views

On using circular nodes on the path using`` \draw ... to node ..." without crossing the circles

Let us assume that we have a line segment starting at (0,0) and stopping at (-2,-2). Suppose we want to add two circular nodes on the line segment, one near to start one near to end. In addition the ...
Aria's user avatar
  • 1,523
2 votes
1 answer
101 views

TikZ: coloring multiple passes over the same path between nodes

I'm drawing a lattice of nodes and I would like to highlight certain paths with different colors. When the paths overlap, I would like the colors to appear adjacent to each other. I've seen ...
A.Ellett's user avatar
  • 50.4k
3 votes
3 answers
302 views

Clipping issue with TikZ fading

Following Issue with fade-no-fill.sty, I wanted to try implementing @hpekristiansen solution. I’m giving a more complete code here because I have text nodes on the paths actually. \documentclass[tikz]{...
Archange's user avatar
  • 1,368
6 votes
4 answers
204 views

Issue with fade-no-fill.sty

I’m trying to have colour gradient on path, and discovered fade-no-fill.sty, which latest version seems to be https://tex.stackexchange.com/a/567029/56823. It works pretty well, but I have two small ...
Archange's user avatar
  • 1,368