SaveMixIn#

class sunkit_pyvista.SaveMixIn[source]#

Bases: object

A mixin class to add savefig used for pytest-mpl figure comparison testing.

Methods Summary

savefig(filename, **kwargs)

Save a screenshot of the current figure.

Methods Documentation

savefig(filename, **kwargs)[source]#

Save a screenshot of the current figure.

This is a wrapper around pyvista.Plotter.screenshot and was written so we use pytest-mpl’s figure comparison testing.

Parameters:
  • filename (str) – The name of the file to save the screenshot to.

  • kwargs (dict) – Keyword arguments are ignored.