mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Move GrpcInterface into top level
This commit is contained in:
25
GrpcInterface/Python/rips/plot.py
Normal file
25
GrpcInterface/Python/rips/plot.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
ResInsight 2d plot module
|
||||
"""
|
||||
import Commands_pb2
|
||||
|
||||
from .pdmobject import PdmObjectBase, add_method
|
||||
from resinsight_classes import PlotWindow, Plot
|
||||
|
||||
|
||||
@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=Commands_pb2.ExportSnapshotsRequest(type='PLOTS',
|
||||
prefix=file_prefix,
|
||||
viewId=self.id,
|
||||
exportFolder=export_folder,
|
||||
plotOutputFormat=output_format))
|
||||
Reference in New Issue
Block a user