parabola#

Parabola shapes.

Classes

DownParabola(dataset)

Class for the down parabola shape.

LeftParabola(dataset)

Class for the left parabola shape.

RightParabola(dataset)

Class for the right parabola shape.

UpParabola(dataset)

Class for the up parabola shape.

class data_morph.shapes.points.parabola.DownParabola(dataset: Dataset)[source]#

Bases: PointCollection

Class for the down parabola shape.

../_images/data_morph-shapes-points-parabola-1.png

This shape is generated using the panda dataset.#

Parameters:

dataset (Dataset) – The starting dataset to morph into other shapes.

distance(x: Number, y: Number) float#

Calculate the minimum distance from the points of this shape to a point (x, y).

Parameters:
Returns:

The minimum distance from the points of this shape to the point (x, y).

Return type:

float

classmethod get_name() str#

Get the name of the shape.

Returns:

The name of the shape.

Return type:

str

name: str | None = 'down_parab'#

The display name for the shape, if the lowercased class name is not desired.

plot(ax: Axes | None = None) Axes#

Plot the shape.

Parameters:

ax (matplotlib.axes.Axes, optional) – An optional Axes object to plot on.

Returns:

The Axes object containing the plot.

Return type:

matplotlib.axes.Axes

points#

An array of (x, y) values representing an arrangement of points.

Type:

numpy.ndarray

class data_morph.shapes.points.parabola.LeftParabola(dataset: Dataset)[source]#

Bases: PointCollection

Class for the left parabola shape.

../_images/data_morph-shapes-points-parabola-2.png

This shape is generated using the panda dataset.#

Parameters:

dataset (Dataset) – The starting dataset to morph into other shapes.

distance(x: Number, y: Number) float#

Calculate the minimum distance from the points of this shape to a point (x, y).

Parameters:
Returns:

The minimum distance from the points of this shape to the point (x, y).

Return type:

float

classmethod get_name() str#

Get the name of the shape.

Returns:

The name of the shape.

Return type:

str

name: str | None = 'left_parab'#

The display name for the shape, if the lowercased class name is not desired.

plot(ax: Axes | None = None) Axes#

Plot the shape.

Parameters:

ax (matplotlib.axes.Axes, optional) – An optional Axes object to plot on.

Returns:

The Axes object containing the plot.

Return type:

matplotlib.axes.Axes

points#

An array of (x, y) values representing an arrangement of points.

Type:

numpy.ndarray

class data_morph.shapes.points.parabola.RightParabola(dataset: Dataset)[source]#

Bases: PointCollection

Class for the right parabola shape.

../_images/data_morph-shapes-points-parabola-3.png

This shape is generated using the panda dataset.#

Parameters:

dataset (Dataset) – The starting dataset to morph into other shapes.

distance(x: Number, y: Number) float#

Calculate the minimum distance from the points of this shape to a point (x, y).

Parameters:
Returns:

The minimum distance from the points of this shape to the point (x, y).

Return type:

float

classmethod get_name() str#

Get the name of the shape.

Returns:

The name of the shape.

Return type:

str

name: str | None = 'right_parab'#

The display name for the shape, if the lowercased class name is not desired.

plot(ax: Axes | None = None) Axes#

Plot the shape.

Parameters:

ax (matplotlib.axes.Axes, optional) – An optional Axes object to plot on.

Returns:

The Axes object containing the plot.

Return type:

matplotlib.axes.Axes

points#

An array of (x, y) values representing an arrangement of points.

Type:

numpy.ndarray

class data_morph.shapes.points.parabola.UpParabola(dataset: Dataset)[source]#

Bases: PointCollection

Class for the up parabola shape.

../_images/data_morph-shapes-points-parabola-4.png

This shape is generated using the panda dataset.#

Parameters:

dataset (Dataset) – The starting dataset to morph into other shapes.

distance(x: Number, y: Number) float#

Calculate the minimum distance from the points of this shape to a point (x, y).

Parameters:
Returns:

The minimum distance from the points of this shape to the point (x, y).

Return type:

float

classmethod get_name() str#

Get the name of the shape.

Returns:

The name of the shape.

Return type:

str

name: str | None = 'up_parab'#

The display name for the shape, if the lowercased class name is not desired.

plot(ax: Axes | None = None) Axes#

Plot the shape.

Parameters:

ax (matplotlib.axes.Axes, optional) – An optional Axes object to plot on.

Returns:

The Axes object containing the plot.

Return type:

matplotlib.axes.Axes

points#

An array of (x, y) values representing an arrangement of points.

Type:

numpy.ndarray