mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Support PDF-export from Python
This commit is contained in:
@@ -16,18 +16,20 @@ class Plot(PdmObject):
|
||||
PdmObject.__init__(self, pdm_object.pb2_object(), pdm_object.channel(), pdm_object.project())
|
||||
self.view_id = pdm_object.get_value("ViewId")
|
||||
|
||||
def export_snapshot(self, export_folder='', file_prefix='', ):
|
||||
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.view_id,
|
||||
exportFolder=export_folder))
|
||||
exportFolder=export_folder,
|
||||
plotOutputFormat=output_format))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user