Skip to content

Latest commit

 

History

History
136 lines (76 loc) · 2.19 KB

Figures.rst

File metadata and controls

136 lines (76 loc) · 2.19 KB

Figures

Figures, typically abbreviated to fig, are the window that you plot into. This section outlines:

  • Their creation.
  • General figure management.
  • Functions for controlling the camera position.
  • Screenshotting the figure contents to a frozen image (file).
  • Embedding a figure into PyQt6.

Overview

Some of this is handled automatically. There is a global current working figure. This can be get and set using gcf() and scf(fig) <scf>. If it doesn't exist then it is automatically created. Each plot command will add itself to the current working figure unless explicitly told not by setting fig=None or fig=alternative_fig in the plot command. The figure is shown using vtkplotlib.show or fig.show(). After the shown figure is closed it ceases to be the current working figure but you can use it by referencing it explicitly. Figures can be reshown indefinitely and should be exactly as you left them on close.


show

vtkplotlib.show


figure

vtkplotlib.figure


gcf

vtkplotlib.gcf


scf

vtkplotlib.scf


screenshot_fig

vtkplotlib.screenshot_fig


save_fig

vtkplotlib.save_fig


view

vtkplotlib.view


reset_camera

vtkplotlib.reset_camera


zoom_to_contents

vtkplotlib.zoom_to_contents


close

vtkplotlib.close


figure_history

vtkplotlib.figure_history


auto_figure

vtkplotlib.auto_figure


QtFigure

vtkplotlib.QtFigure


QtFigure2

vtkplotlib.QtFigure2