Visualization

Visualization functions.

pyiga.vis.animate_field(fields, geo, vrange=None, res=(50, 50), cmap=None, interval=50, progress=False)

Animate a sequence of scalar fields over a geometry.

pyiga.vis.plot_active_cells(hspace, values, cmap=None, edgecolor=None)

Plot the mesh of active cells with colors chosen according to the given values.

pyiga.vis.plot_curve(geo, res=50, linewidth=None, color='black')

Plot a 2D curve.

pyiga.vis.plot_field(field, geo=None, res=80, physical=False, **kwargs)

Plot a scalar field, optionally over a geometry.

pyiga.vis.plot_geo(geo, grid=10, gridx=None, gridy=None, res=50, linewidth=None, color='black')

Plot a wireframe representation of a 2D geometry.

pyiga.vis.plot_hierarchical_cells(hspace, cells, color_act='steelblue', color_deact='white')

Visualize cells of a 2D hierarchical spline space.

Parameters:
  • hspace (HSpace) – the space to be plotted
  • cells – dict of sets of selected active cells
  • color_act – the color to use for the selected cells
  • color_deact – the color to use for the remaining cells
pyiga.vis.plot_hierarchical_mesh(hspace, levels='all', levelwise=False, color_act='steelblue', color_deact='lavender')

Visualize the mesh of a 2D hierarchical spline space.

Parameters:
  • hspace (HSpace) – the space to be plotted
  • levels – either ‘all’ or a list of levels to plot
  • levelwise (bool) – if True, show each level (including active and deactivated basis functions) in a separate subplot
  • color_act – the color to use for the active cells
  • color_deact – the color to use for the deactivated cells (only shown if levelwise is True)