Bullseye#

class data_morph.shapes.circles.Bullseye(dataset: Dataset)[source]#

Bases: Shape

Class representing a bullseye shape comprising two concentric circles.

../_images/data_morph-shapes-circles-Bullseye-1.png

This shape is generated using the panda dataset.#

Parameters:

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

circles: list[data_morph.shapes.circles.Circle]#

The inner and outer Circle objects.

Type:

list[Circle]

distance(x: Number, y: Number) float[source]#

Calculate the minimum absolute distance between this bullseye’s inner and outer circles’ edges and a point (x, y).

Parameters:
Returns:

The minimum absolute distance between this bullseye’s inner and outer circles’ edges and the point (x, y).

Return type:

float

See also

Circle.distance

A bullseye consists of two circles, so we use the minimum distance to one of the circles.

plot(ax: Axes = None) Axes[source]#

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