"""Slant up lines shape."""from...data.datasetimportDatasetfrom..bases.line_collectionimportLineCollection
[docs]classSlantUpLines(LineCollection):""" Class for the slant up lines shape. .. plot:: :scale: 75 :caption: This shape is generated using the panda dataset. from data_morph.data.loader import DataLoader from data_morph.shapes.lines import SlantUpLines _ = SlantUpLines(DataLoader.load_dataset('panda')).plot() Parameters ---------- dataset : Dataset The starting dataset to morph into other shapes. """name='slant_up'def__init__(self,dataset:Dataset)->None:x_bounds,y_bounds=dataset.morph_boundsxmin,xmax=x_boundsxmid=xmin+x_bounds.range/2x_offset=(xmid-xmin)/2ymin,ymax=y_boundsymid=ymin+y_bounds.range/2y_offset=(ymid-ymin)/2super().__init__([[xmin,ymid],[xmid,ymax]],[[xmin,ymin+y_offset],[xmid+x_offset,ymax]],[[xmin,ymin],[xmax,ymax]],[[xmin+x_offset,ymin],[xmax,ymid+y_offset]],[[xmid,ymin],[xmax,ymid]],)