Visualization
- class gefest.core.viz.struct_vizualizer.StructVizualizer(domain: Domain | None = None)[source]
Bases:
objectThe object for mapping a
StructureorPolygon.Examples
>>> from gefest.core.structure.domain import Domain >>> from gefest.core.viz.struct_vizualizer import StructVizualizer >>> domain = Domain() >>> viz = StructVizualizer(domain)
- plot_structure(structs: list[Structure], infos=None, linestyles='-', legend=False)[source]
The method displays the given list[obj:Structure].
- Parameters:
structs – the list[obj:Structure] for displaying
infos – the list of data to plot legend for each structure
linestyles – pyplot linestyles for stuctures
Examples
>>> from gefest.core.structure.structure import get_random_structure >>> struct_1 = get_random_structure(domain) >>> struct_2 = get_random_structure(domain) >>> viz.plot_structure( [struct_1, struct_2], ['stucture_1', 'stucture_2'], [':', '-'])
- Returns:
matplotlib.pyplot.figure
- plot_poly(poly, linestyle, **kwargs)[source]
The method displays the given
Polygon.- Parameters:
poly – the
Polygonfor displayinglinestyle – pyplot linestyles for polygon
Examples
>>> from gefest.core.structure.structure import get_random_poly >>> struct = get_random_structure(domain) >>> poly = struct.polygons[0] >>> viz.plot_poly(poly, '-')
- class gefest.core.viz.struct_vizualizer.GIFMaker(domain=None)[source]
Bases:
StructVizualizerSmple API for saving a series of plots in mp4 with moviepy.