mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-20 11:48:35 -06:00
Several improvement and adjustments to the Python documentation - applied autopep8 - add summary example - use references to reference other classes and methods
27 lines
994 B
Python
27 lines
994 B
Python
"""
|
|
ResInsight 2d plot module
|
|
"""
|
|
import rips.generated.Commands_pb2 as Cmd
|
|
|
|
from rips.pdmobject import PdmObject
|
|
from rips.generated.pdm_objects import PlotWindow, Plot
|
|
from rips.pdmobject import add_method
|
|
|
|
|
|
@add_method(PlotWindow)
|
|
def export_snapshot(self, export_folder='', file_prefix='', output_format='PNG'):
|
|
""" Export snapshot for the current plot
|
|
|
|
Arguments:
|
|
export_folder(str): The path to export to. By default will use the global export folder
|
|
prefix (str): Exported file name prefix
|
|
output_format(str): Enum string. Can be 'PNG' or 'PDF'.
|
|
|
|
"""
|
|
return self._execute_command(
|
|
exportSnapshots=Cmd.ExportSnapshotsRequest(type='PLOTS',
|
|
prefix=file_prefix,
|
|
viewId=self.id,
|
|
exportFolder=export_folder,
|
|
plotOutputFormat=output_format))
|