pvplot module
Create plots using ParaView.
- sapphireppplot.pvplot.plot_line_chart_view(solution, layout, x_label='$x$', y_label='', x_array_name='Points_X', visible_lines=None, x_range=None, value_range=None, log_x_scale=False, log_y_scale=False, line_chart_view=None, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Create and configure line chart view in ParaView.
- Parameters:
solution (
SourceProxy) – The data source to visualize, typically a ParaView data object.layout (
ViewLayoutProxy) – ParaView layout to use for the plot.x_label (
str) – Label for the bottom axis of the chart.y_label (
str) – Label for the left axis of the chart.x_array_name (
str) – Name of the array ot use as x-axes.visible_lines (
Optional[list[str]]) – List of series names to display in the chart.x_range (
Optional[tuple[float,float]]) – Minimal (x_range[0]) and maximal (x_range[1]) value for the x-axes.value_range (
Optional[tuple[float,float]]) – Minimal (value_range[0]) and maximal (value_range[1]) value for the y-axes.log_x_scale (
bool) – Use a logarithmic x-scale?log_y_scale (
bool) – Use a logarithmic y-scale?line_chart_view (
Optional[Proxy]) – If a line chart view is given, add the plot to it. Otherwise create a new one.plot_properties (
PlotProperties) – Properties for plotting like the labels.
- Return type:
Proxy- Returns:
line_chart_view (XYChartViewProxy) – The configured XY chart view.
- sapphireppplot.pvplot.plot_render_view_2d(solution, layout, quantity, value_range=None, log_scale=False, camera_direction=None, render_view=None, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Create and configure 2D render view in ParaView.
- Parameters:
solution (
SourceProxy) – The data source to visualize, typically a ParaView data object.layout (
ViewLayoutProxy) – ParaView layout to use for the plot.quantity (
str) – Name of the quantity to plot. For vector quantities, the shown component can be selected by the suffix_X/Y/Zor_Magnitude. Note, in the interactive session, ParaView will switch all other render views of this quantity to the same component.value_range (
Optional[tuple[float,float]]) – Minimal (value_range[0]) and maximal (value_range[1]) value for the color bar.log_scale (
bool) – Use a logarithmic color scale?camera_direction (
Optional[list[float]]) – Direction of the camera.render_view (
Optional[Proxy]) – If a render view is given, add the plot to it. Otherwise create a new one.plot_properties (
PlotProperties) – Properties for plotting like the labels.
- Return type:
Proxy- Returns:
render_view (RenderViewProxy) – The configured 2D render view.
See also
- paraview.simple.ResetCameraToDirection :
ParaView method to set camera direction.
- sapphireppplot.pvplot.plot_render_view_3d(solution, layout, quantity, value_range=None, log_scale=False, camera_direction=None, render_view=None, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Create and configure 3D render view in ParaView.
- Parameters:
solution (
SourceProxy) – The data source to visualize, typically a ParaView data object.layout (
ViewLayoutProxy) – ParaView layout to use for the plot.quantity (
str) – Name of the quantity to plot. For vector quantities, the shown component can be selected by the suffix_X/Y/Zor_Magnitude. Note, in the interactive session, ParaView will switch all other render views of this quantity to the same component.value_range (
Optional[tuple[float,float]]) – Minimal (value_range[0]) and maximal (value_range[1]) value for the color bar.log_scale (
bool) – Use a logarithmic color scale?camera_direction (
Optional[list[float]]) – Direction of the camera. Uses isometric view by default.render_view (
Optional[Proxy]) – If a render view is given, add the plot to it. Otherwise create a new one.plot_properties (
PlotProperties) – Properties for plotting like the labels.
- Return type:
Proxy- Returns:
render_view (RenderViewProxy) – The configured 3D render view.
See also
- paraview.simple.ResetCameraToDirection :
ParaView method to set camera direction.
- sapphireppplot.pvplot.show_overlay_2d(source, render_view, quantity=None, color_bar_visible=False, value_range=None, log_scale=False, line_width=None, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Show a contour lines or stream tracer overlay in a 2D render view.
- Parameters:
source (
SourceProxy) – The contour lines or stream tracer to visualize.render_view (
Proxy) – ParaView 2D render view in which to show the overlay.quantity (
str|None) – Name of the quantity to plot. UseNoneto displaySolid Colorlines.color_bar_visible (
bool) – Should the color bar be shown?value_range (
Optional[tuple[float,float]]) – Minimal (value_range[0]) and maximal (value_range[1]) value for the color bar.log_scale (
bool) – Use a logarithmic color scale?line_width (
Optional[float]) – Line width for the outline. Defaults to half the default line width.plot_properties (
PlotProperties) – Properties for plotting like the labels.
- Return type:
Proxy- Returns:
render_view (RenderViewProxy) – The configured 2D render view.
See also
sapphireppplot.transform.contour_linesCreate contour lines.
sapphireppplot.transform.stream_tracerCreate stream tracer.
sapphireppplot.plot_properties.PlotProperties.default_line_widthDefault line width.
- sapphireppplot.pvplot.show_outline(source, render_view, color=None, line_width=None, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Show outlines of the solution a 2D/3D render view.
This can be used to highlight the grid axes more.
- Parameters:
source (
SourceProxy) – The source that should be outlined.render_view (
Proxy) – ParaView 2D render view in which to show the outline.color (
Union[tuple[float,float,float],str,tuple[float,float,float,float],tuple[tuple[float,float,float] |str,float],tuple[tuple[float,float,float,float],float],None]) – Color for the outline. Defaults to the grid color.line_width (
Optional[float]) – Line width for the outline. Defaults to the default line width.plot_properties (
PlotProperties) – Properties for plotting like grid color.
- Return type:
SourceProxy- Returns:
outline (SourceProxy) – The configured outline.
See also
sapphireppplot.plot_properties.PlotProperties.grid_colorColor for grid.
sapphireppplot.plot_properties.PlotProperties.default_line_widthDefault line width.
- sapphireppplot.pvplot.display_text(view, text, location='Upper Center', plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Display text on a view.
- Parameters:
view (
Proxy) – ParaView view to display the text.text (
str) – Text to display.location (
Union[Literal['Upper Left Corner','Upper Center','Upper Right Corner','Lower Left Corner','Lower Center','Lower Right Corner'],tuple[float,float]]) – Text position. Either descriptive string or coordinates.plot_properties (
PlotProperties) – Properties for plotting like the color.
- Return type:
Proxy- Returns:
text_proxy (Proxy) – The text proxy.
- sapphireppplot.pvplot.display_time(view, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Display the animation time.
- Parameters:
view (
Proxy) – ParaView view to display the text.plot_properties (
PlotProperties) – Properties for plotting like the color.
- Return type:
Proxy- Returns:
annotate_time (Proxy) – The text proxy.
- sapphireppplot.pvplot.show_spread_sheet(solution, layout, visible_columns=None, sort_by_column=None, invert_sort_order=False, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Create and configure spread sheet view in ParaView.
Note that it is not possible to save screenshots of the spread sheet view.
- Parameters:
solution (
SourceProxy) – The data source to visualize, typically a ParaView data object.layout (
ViewLayoutProxy) – ParaView layout to use for the spread sheet view.visible_columns (
Optional[list[str]]) – List of columns to display in the chart.sort_by_column (
Optional[str]) – Column name to sort by.invert_sort_order (
bool) – Invert sort order to show largest values first?plot_properties (
PlotProperties) – Properties for plotting like the labels.
- Return type:
Proxy- Returns:
spread_sheet_view (SpreadSheetView) – The configured spread sheet view.
- sapphireppplot.pvplot.save_screenshot(view_or_layout, results_folder, filename, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Save screenshot of the given line chart view as
png.- Parameters:
view_or_layout (
ViewLayoutProxy|Proxy) – The ParaView view or layout object to capture in the screenshot.results_folder (
str) – The directory path where the screenshot will be saved.filename (
str) – The base name for the screenshot file (without extension).plot_properties (
PlotProperties) – Additional properties like background transparency.
- Return type:
None
- sapphireppplot.pvplot.save_animation(view_or_layout, results_folder, filename, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Save animation of the given line chart view as series of
.pngfiles.- Parameters:
view_or_layout (
ViewLayoutProxy|Proxy) – The ParaView view or layout object to capture in the screenshot.results_folder (
str) – The directory path where the screenshot will be saved.filename (
str) – The base name for the screenshot file (without extension).plot_properties (
PlotProperties) – Additional properties like background transparency.
- Return type:
None
See also
sapphireppplot.plot_properties.PlotProperties.animation_frame_strideAnimation frame stride, skip if
-1.
- sapphireppplot.pvplot.save_view(view, results_folder, filename, save_format='svg', fix_axes_titles=False, plot_properties=PlotProperties(series_names=[], labels={}, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=(1280, 720), preview_size_2d=(1024, 1024), camera_view_2d=(False, 0.9), preview_size_3d=(1024, 1024), camera_view_3d=(False, 0.9), background_color=(1.0, 1.0, 1.0), screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=(0.5, 0.5, 0.5), label_size=18, text_size=24, title_size=30, line_colors={}, line_styles={}, line_widths={}, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels={}, bottom_axis_labels={}, show_grid=False, grid_labels=('$x$', '$y$', '$z$'), grid_color=(0.5, 0.5, 0.5), color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=(1.0, 1.0, 1.0), axes_stretch=(1.0, 1.0, 1.0), axes_ticks=(None, None, None), time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5))
Save ParaView view as vector graphic or table.
- Parameters:
view (
Proxy) – The ParaView view object to capture in the screenshot.results_folder (
str) – The directory path where the screenshot will be saved.filename (
str) – The base name for the screenshot file (without extension).save_format (
Union[Literal['svg','eps','pdf','csv'],str]) – Save format, e.g.svgorpdf for vector graphics and ``csvfor table.fix_axes_titles (
bool) – In RenderView plots the axes titles often overlap with the axes labels because trailing whitespaces in the title are removed. To avoid this overlap this option appends a small dot to the axes titles. Only use this option for RenderView plots!plot_properties (
PlotProperties) – Additional properties like background transparency.
- Return type:
None
Warning
This feature is unstable and can lead to crashes. One known issue is that it does not work together with custom axes ticks,
sapphireppplot.plot_properties.PlotProperties.axes_ticks.See also
- paraview.simple.ExportView :
ParaView export view function.
sapphireppplot.plot_properties.PlotProperties.set_style():Set style to ensure consistent
dpi.