Dataset#
- class data_morph.data.dataset.Dataset(name: str, df: DataFrame, scale: Number = None)[source]#
Bases:
object
Class for representing a starting dataset and bounds.
- Parameters:
name (str) – The name to use for the dataset.
df (pandas.DataFrame) – DataFrame containing columns x and y.
scale (numbers.Number, optional) – The factor to scale the data by (can be used to speed up morphing). Values in the data’s x and y columns will be divided by this value.
See also
DataLoader
Utility for creating
Dataset
objects from CSV files.
- data_bounds: BoundingBox#
The bounds of the data.
- Type:
- morph_bounds: BoundingBox#
The limits for the morphing process.
- Type:
- plot(ax: Axes = None) Axes [source]#
Plot the dataset and its bounds.
- Parameters:
ax (matplotlib.axes.Axes, optional) – An optional
Axes
object to plot on.- Returns:
The
Axes
object containing the plot.- Return type:
- plot_bounds: BoundingBox#
The bounds to use when plotting the morphed data.
- Type: