Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions matplotlib_venn/_arc.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def intersect_circle(
) -> Sequence[np.ndarray]:
"""
Given a circle, finds the intersection point(s) of the arc with the circle.
Returns a list of 2x1 numpy arrays. The list has length 0, 1 or 2, depending on how many intesection points there are.
Returns a list of 2x1 numpy arrays. The list has length 0, 1 or 2, depending on how many intersection points there are.
If the circle touches the arc, it is reported as two intersection points (which are equal).
Points are ordered along the arc.
Intersection with the same circle as the arc's own (which means infinitely many points usually) is reported as no intersection at all.
Expand Down Expand Up @@ -370,7 +370,7 @@ def intersect_circle(
def intersect_arc(self, arc: "Arc") -> Sequence[np.ndarray]:
"""
Given an arc, finds the intersection point(s) of this arc with that.
Returns a list of 2x1 numpy arrays. The list has length 0, 1 or 2, depending on how many intesection points there are.
Returns a list of 2x1 numpy arrays. The list has length 0, 1 or 2, depending on how many intersection points there are.
Points are ordered along the arc.
Intersection with the arc along the same circle (which means infinitely many points usually) is reported as no intersection at all.

Expand Down
6 changes: 3 additions & 3 deletions matplotlib_venn/_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def verify(self) -> None:
and (j - i) % len(self.arcs) > 1
):
# Two non-consecutive arcs intersect. This is in general not good, but
# may occasionally happen when all arcs inbetween have length 0.
# may occasionally happen when all arcs in between have length 0.
pass # raise VennRegionException("Non-consecutive arcs of a poly-arc-gon may not intersect")

# Verify that vertices are ordered so that at each point the direction along the polyarc changes towards the left.
Expand Down Expand Up @@ -414,7 +414,7 @@ def subtract_and_intersect_circle(
# b) Both arcs, X and Y, have one intersection point each. In this case one of the arc endpoints must be inside circle, another outside.
# call the arc that starts with the outside point X, the other arc Y.
# result_subtraction = {X start to intersection, intersection to intersection along circle (negative direction), Y from intersection to end}
# result_intersection = {X intersection to end, Y start to intersecton, intersection to intersecion along circle (positive)}
# result_intersection = {X intersection to end, Y start to intersection, intersection to intersection along circle (positive)}
center = np.asarray(center)
intersections = [a.intersect_circle(center, radius) for a in self.arcs]

Expand Down Expand Up @@ -558,7 +558,7 @@ def subtract_and_intersect_circle(
return (subtraction, intersection)

def label_position(self) -> np.ndarray:
# Position the label right inbetween the midpoints of the arcs
# Position the label right in between the midpoints of the arcs
midpoints = [a.mid_point() for a in self.arcs]
# For two-arc regions take the usual average
# For more than two arcs, use arc lengths as the weights.
Expand Down
2 changes: 1 addition & 1 deletion matplotlib_venn/_venn2.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def venn2(
subsets: one of the following:
- A tuple of two set objects.
- A dict, providing relative sizes of the three diagram regions.
The regions are identified via two-letter binary codes ('10', '01', '11'), hence a valid artgument could look like:
The regions are identified via two-letter binary codes ('10', '01', '11'), hence a valid argument could look like:
{'01': 10, '11': 20}. Unmentioned codes are considered to map to 0.
- A tuple with 3 numbers, denoting the sizes of the regions in the following order:
(10, 01, 11).
Expand Down
2 changes: 1 addition & 1 deletion matplotlib_venn/_venn3.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def venn3(
subsets: one of the following:
- A tuple of three set objects.
- A dict, providing relative sizes of the seven diagram regions.
The regions are identified via three-letter binary codes ('100', '010', etc), hence a valid artgument could look like:
The regions are identified via three-letter binary codes ('100', '010', etc), hence a valid argument could look like:
{'001': 10, '010': 20, '110':30, ...}. Unmentioned codes are considered to map to 0.
- A tuple with 7 numbers, denoting the sizes of the regions in the following order:
(100, 010, 110, 001, 101, 011, 111).
Expand Down