# Questions tagged [intersections]

For questions about calculating intersections using {tikz-pgf} or {pgfplots}, including PGF's intersections library.

268 questions
Filter by
Sorted by
Tagged with
1 vote
29 views

### Feed intersection's coordinates to pgfplots' \addplot

Following examples in the manual and elsewhere, I can use Tikz to mark an intersection on a pgfplots axis and even display the coordinates (see the commented out section in the MWE below), but I would ...
• 333
198 views

### Shorter way of obtaining curved angle with intersections

Consider the following (inspired by this post): \documentclass[border=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate (a) at (0,0); \coordinate (b) at (...
• 4,580
1 vote
129 views

### How to draw a cartesian plane like this?

I read some topics but I still don't know how to draw this cartesian plane, someone could help? My difficulty is how to draw the intersection.
• 229
121 views

### Drawing intersection over union in equation

I'm new to LaTeX and I try to use tikz library to draw intersection over union in an equation like in the following image, but sadly I couldn't find any solution for it. The current state of my code: ...
• 35
1 vote
96 views

### Draw vertical line to arbitrary path or a function by giving x coordinate (pgfplots)

This is a follow-up question to this one. My goal is to draw a vertical line to any path or a function, but the main requirement is to avoid temporal paths that are used to get the intersection. Here ...
• 1,849
94 views

### Use explicit path in intersection inside axis (pgfplots)

I'm trying to achieve the following: I know I can do that with help of intersections tikz library. However, the main requirement is to avoid any temporary paths (\path[name path=t] (2,0) -- (2,\ymaxv)...
• 1,849
158 views

### Filling Grid Points Intersected by a Circle

I'm trying to make the image below. I want to fill in the grid points intersected by the circles. I'm able to make the grid and the arrows, the code for that is below. I'm completely lost on how to ...
• 45
72 views

### Simple question about drawing the real line using tikz

I have never drawn anything of LateX before, and I would like to represent intervals of the form [x,x'], with both x,x' real numbers, as I show below. I have 0 experience with tikz and altough I've ...
• 265
48 views

### Using tikz spath3 with *nodes*

I can use spath3 with paths (not nodes) in this way: \documentclass{article} \usepackage{tikz} \usetikzlibrary{spath3, intersections} \begin{document} \begin{tikzpicture} \draw[spath/save = rect, ...
• 152
205 views

### decorate or style path between nodes

I'm trying to draw two “blobs”, and a curve from one blob to the other, which is colored differently between the blobs. Here is a MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{...
233 views

### TikZ single intersection between curve and horizontal line not found

What happened The error ! Package pgf Error: No shape named intersection-1' is known. is produced when compiling the following with pdfLaTeX: \documentclass{standalone} \usepackage{tikz} \...
26 views

### How do I get this node correctly vertically and horizontally aligned, no deviation horizontally from node above?

I am trying to get the node \node[below = 3 cm of OPC] (NCM) {No match}; aligned so it is directly below the node above, and exactly on the same line as the node to the right. If I do a simple below ...
• 473
1 vote
63 views

### intersection of arc and line

I want to find intersection of arc and line. But I have an error "I do not know the path name 'curc' '' \begin{tikzpicture}[scale=1, font=\footnotesize, line join=round, line cap=round, >=...
67 views

### Filling the intersection of paths

I am aware that there is myriad of posts dealing with the intersection of objects in tikz, but I haven't found one that shows how to intersect two paths, so far. I would like to either shade or hatch ...
• 321
1 vote
83 views

### Crossing over method with xy package for one or more arrows

Related on this question, considering the original image, adding my MWE: \documentclass[a4paper,12pt]{article} \usepackage[all]{xy} \begin{document} \xymatrix@R=2pc@C=2.8pc{ & b' \ar@{~>}[ddl]|...
• 46.1k
57 views

### Dimensions too large in pgfplots graph

I exported some code from GeoGebra but I get the error "dimensions are too large." I have narrowed the error down to these two lines \draw [samples=50,domain=-0.99:0.99,rotate around={0.:(0.,...
1 vote
72 views

### TikZ package: coordinate from intersection of arc and line

I've been trying to create a handful of intersections of an arc and lines. Here's my code: \coordinate (A) at (0, 5); \coordinate[label=below:$M$] (B) at (0, 0); \coordinate (C) at (5, 0); \path[name=...
• 13
108 views

### Simple plot with TIkZ

I was wondering whether someone knows how to do the graph on the right. I just know how to do very simple graphs. Is there a way to put shaded balls and graphs in the same figure?
• 169
1 vote
98 views

### Drawing a function between two intersections with two other functions

I have three functions defined, red, blue and green. I would like to plot the red function only between the intersections with blue and green function. What is the easiest way to do that? \...
• 5,473
1 vote
93 views

### Intersection between several lines and a curve using Tikz

I have tried to calculate the intersection, and add a red dot, between a curve called "mincut" and a line called "arc-67". It doesn't work and gives an error like this: ! Package ...
1 vote
61 views

### Dimension too large for a simple tex drawing

I have relatively simple 3D drawing. It compiles fine, but I get five "Dimension too large" errors. How can I avoid it? \documentclass[10pt]{scrartcl} \usepackage{tikz} \usetikzlibrary{...
• 5,473
508 views

### Why are my TikZ intersections not exact?

In a TikZ picture, I try to intersect an arc with a cubic bezier line. However, the calculated intersection points seem off — do you know why that is? Is this some sort of rounding error? \...
• 4,371
48 views

### problems with foreach loop and intersections

I have a problem using foreach loop and intersection. My MWE looks like this: \documentclass[border=5pt,tikz]{standalone} \usepackage{pgfplots} \usepackage{tikz} \usepackage{pgfplotstable} \...
• 2,130
42 views

### Extracting a subpath from intersection

I am wondering if intersections can be used to extract a subpath from a circle/ellipse path. I have two ellipses, and I am trying to plot only the perimeter of the union. Considering the following ...
1 vote
57 views

### TikZ not detecting third intersection of curves

I want to find the intersections of a graph in a certain y-value in order to create a hybrid path between the curves. However, for some reason, TikZ is not detecting the third intersection. Here is ...
• 11
1 vote
89 views

### Find several intersections between line and curve using tikz

I want to find the intersections between the orange dashed line and the blue curve using the package tikz, see the screenshot below. As can be seen, only the first intersection is shown. However, I ...
71 views

### {genealogytree} How to draw multiple marriage without edge intersections

Could anybody give me a hint on how to draw the following situation (3 marriages) with no edge-intersection? The example is taken from the manual, p. 233.
84 views

### Detect segment intersections with tikz

I have to detect when two segments intersect in a parametric figure that need's to computes coordinates into a tikz picture, and it won't works, seem's that "intersections=... total=\t" or &...
1 vote
114 views

### how to draw n horizontal y-axis parallel lines intersect m vertical x-axis parallel lines

use \foreach command add node circle \begin{tikzpicture}[scale=0.5] \draw[->] (-10, 0) -- (10, 0) node[right] {$x$}; \draw[->] (0, -10) -- (0, 10) node[above] {$y$}; { \foreach \n in {8,7,...
1 vote
46 views

### How to fill area between several paths

I have the folling tikz code, where several paths intersect each other. I struggle to find a way to fill the six different regions of the resulting picture, each with a different pattern (not ...
• 263
67 views

### TikZ, refer to intersection with x-axis

In this code: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \usetikzlibrary{arrows.meta,babel,calc,intersections,backgrounds} \usepgfplotslibrary{fillbetween} \begin{document} \begin{...
• 1,075
49 views

### Why doesn't a code from an answer compile?

There was a good answer about naming angles here: https://tex.stackexchange.com/a/55555/227339 I try to run it on my computer, but I get these errors: As I understood, the problem is that name path=...
• 345
72 views

### Tikz trim lines at intersection

I'm trying to come up with a way to draw "parametric" right triangles, meaning that I change the length of the hypotenuse \hypo and one of the internal angles \alfa and it should draw the ...
• 413
49 views

### TikZ intersection command with strange behavior

I am trying to put some nodes at the intersection of a circle with some bissectors. However, the intersections are not behaving how I supposed they should. The text wrong should be placed at the ...
• 107
1 vote
131 views

### Is there a clever way of drawing/marking intersections of multiple paths in block diagrams automatically?

I'm trying to draw a block diagram with tikz and would like to match some kind of convention concerning the intersection of lines/paths. The convention says, that the marking/semicircle has to be at ...
• 65
64 views

### PGFPlots intersection segments wrong curve and endpoint

When trying to answer How to delete a part of a curve in Tikz? , I ran into problems with intersection segments from PGFPlots fillbetween. I tried to change the curve from to[out=280,in=175] to ...
• 21.4k
126 views

### 3d intersections

As exercise, I'm trying to draw the intersection of the prism [0,2] x [0,4] x [0,6], and the plane x + y + z = 5. My result is: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=...
• 666
1 vote
463 views

### Plane intersecting sphere with tikz and tikz-3d

I'm really surprised that I couldn't find an answer to this question, but here it goes: how can I draw a plane intersecting a sphere using tikz and tikz-3dplots? I managed to do the following, using a ...
• 107
98 views

### Filling area between 2 Plots made by coordinates with transparent

I am trying to fill the area between 2 plots with lil bit transparency. Actually i got with fill between this figure: How can I only fill the difference between the two plots. Make the actual orange ...
• 179
208 views

### tikz: draw on top of spy

I want to draw on a tikz-spy and the new line should be covering the ones copied by the spy. E.g.: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{spy,shapes} \pgfdeclarelayer{bg} % ...
• 2,817
102 views

### Draw a line flying across shapes and text content

I want to draw a line between 2 nodes which may fly across existing shape and text content. In the example below, the line connecting a and b are intersecting with the label of init node. I can ...
• 401
82 views

### TikZ does not accept intersection names other than intersection-1 and intersection-2`

Here is my MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \usetikzlibrary{intersections} \begin{document} \begin{figure} \begin{tikzpicture}[scale=3] \draw[name path=...
• 1,372
1 vote
56 views

### How to make so that the calculation of an intersection is correct during a change of scale?

I need to modify the scale of a diagram, but then the calculation of the intersection of two lines is wrong \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,intersections} \...
• 11.4k
168 views

### Draw tangent to curve at intersection

I am trying to see if there is any way to simplify the following code: I have several functions, and one line. I would like to draw the tangent of each functions where they intersect the line. ...
1 vote
56 views

### Why in the TikZ code it produces two similar side by side results where shift is set 0 cm

In this code below \documentclass[10pt]{article} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture} \clip (-0.5,-0.75) rectangle (3.25,2.25); \foreach \pathname/\...
1 vote
46 views

### How to add many point of intersection to a TikZ picture?

The following code \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \a/\text in {0/,60/,120/,180/,240/,300/} \draw[] (\a:1cm) circle (1.5cm) node[right] ...
134 views

### Drawing vertical lines from given x-axis values to frequency curve intersections, then to the y axis

I have a frequency curve as in the figure below: I need dashed lines that can help to estimate number that scored between 42 to 76. My questions are I need to draw two dashed vertical lines from 42 ...
41 views

### how to automate intersections resolution on an image?

Say I have 1000 edges. some of them intersect. Is tere a way to automate intersection representation? like they do in here for one intersection yet for all lines on an image (order does not matter for ...
• 289
79 views

### Reproducing intersection of two curves in tikz

I am looking to reproduce the figure below using tikz: The codes that I have aren't producing this figure exactly. \begin{tikzpicture}[nodes={text height=0.7em,text depth=0.25ex}, my arc/.style={...
• 775