API#

Core#

path.Knot(path[, base_path, description, ...])

Represents a Knot and some metadata about it

display.generate_stage3(knot[, width, ...])

Draw the "Stage 3" version of the knot ready to be interleaved.

Path Generation#

path.Pt(x, y)

namedtuple for (x, y) coordinates.

path.path_from_pts(points[, scale, closed])

Convert a sequence of points and entrance angles to a Path

path.path_data_to_path(path_data[, closed])

Generate a matpotlib.path.Path object from a list of vertices and codes.

path.gen_curve3(p1, p2[, scale])

A helper to generate a sequence of quadratic Bezier segments.

path.gen_curve4(start_point, exit_angle[, scale])

A helper to generate a sequence of quadratic Bezier segments.

Display#

display.show_with_guide(knot[, lw])

Show the knot with Bezier control points.

display.make_guide(knot[, lw])

Make artists to show the knot with Bezier control points.

display.make_stage3(knot[, width, center_alpha])

Draw the "Stage 3" version of the knot ready to be interleaved.

Editor#

editor.KnotArtistManager(knot, *[, width])

editor.KnotInteractor(fig, points[, scale, ...])

A path editor.

Knot transforms#

path.as_mask(knot, width, *[, dpi, fig_width])

Generate a mask of points "in the ribbon".

path.as_outline(knot[, width, thresh])

Generate the (compound) path of the outline of the knot ribbon.

Path manipulation#

path.join(*paths[, close])

Join N paths together with LINETO.

path.reverse(path)

Reverse the given Path.

path.four_fold(path)

Generate a 4-fold symmetric pattern from a Path.

Transforms#