Skip to main content
Ctrl+K
Logo image Logo image

Site Navigation

  • Getting Started
  • User Guide
  • Examples
  • API Reference
  • Extras

Site Navigation

  • Getting Started
  • User Guide
  • Examples
  • API Reference
  • Extras

Section Navigation

API Reference

  • Core API
  • Plotting
    • Plotting
    • PyVista and PyQt
    • Themes
    • Trame
    • pyvista.Actor
    • pyvista.CameraPosition
    • pyvista.DataSetMapper
    • pyvista.LookupTable
    • pyvista.Plotter
      • add_actor
      • add_arrows
      • add_axes
      • add_axes_at_origin
      • add_background_image
      • add_blurring
      • add_bounding_box
      • add_box_widget
      • add_camera_orientation_widget
      • add_chart
      • add_checkbox_button_widget
      • add_composite
      • add_cursor
      • add_floor
      • add_key_event
      • add_legend
      • add_legend_scale
      • add_light
      • add_line_widget
      • add_lines
      • add_mesh
      • add_mesh_clip_box
      • add_mesh_clip_plane
      • add_mesh_isovalue
      • add_mesh_slice
      • add_mesh_slice_orthogonal
      • add_mesh_slice_spline
      • add_mesh_threshold
      • add_on_render_callback
      • add_orientation_widget
      • add_plane_widget
      • add_point_labels
      • add_point_scalar_labels
      • add_points
      • add_ruler
      • add_scalar_bar
      • add_silhouette
      • add_slider_widget
      • add_sphere_widget
      • add_spline_widget
      • add_text
      • add_text_slider_widget
      • add_title
      • add_volume
      • add_volume_clip_plane
      • clear
      • clear_actors
      • clear_box_widgets
      • clear_button_widgets
      • clear_camera_widgets
      • clear_events_for_key
      • clear_line_widgets
      • clear_on_render_callbacks
      • clear_plane_widgets
      • clear_slider_widgets
      • clear_sphere_widgets
      • clear_spline_widgets
      • close
      • deep_clean
      • disable
      • disable_3_lights
      • disable_anti_aliasing
      • disable_depth_of_field
      • disable_depth_peeling
      • disable_eye_dome_lighting
      • disable_hidden_line_removal
      • disable_parallel_projection
      • disable_picking
      • disable_shadows
      • disable_ssao
      • disable_stereo_render
      • enable
      • enable_3_lights
      • enable_anti_aliasing
      • enable_block_picking
      • enable_cell_picking
      • enable_depth_of_field
      • enable_depth_peeling
      • enable_eye_dome_lighting
      • enable_fly_to_right_click
      • enable_geodesic_picking
      • enable_hidden_line_removal
      • enable_horizon_picking
      • enable_image_style
      • enable_joystick_actor_style
      • enable_joystick_style
      • enable_lightkit
      • enable_mesh_picking
      • enable_parallel_projection
      • enable_path_picking
      • enable_point_picking
      • enable_rubber_band_2d_style
      • enable_rubber_band_style
      • enable_shadows
      • enable_ssao
      • enable_stereo_render
      • enable_surface_picking
      • enable_terrain_style
      • enable_trackball_actor_style
      • enable_trackball_style
      • enable_zoom_style
      • export_gltf
      • export_html
      • export_obj
      • export_vrml
      • export_vtkjs
      • fly_to
      • fly_to_mouse_position
      • generate_orbital_path
      • get_default_cam_pos
      • get_image_depth
      • get_pick_position
      • hide_axes
      • hide_axes_all
      • image_scale_context
      • import_gltf
      • import_vrml
      • increment_point_size_and_line_width
      • isometric_view
      • isometric_view_interactive
      • key_press_event
      • left_button_down
      • link_views
      • open_gif
      • open_movie
      • orbit_on_path
      • pick_click_position
      • pick_mouse_position
      • remove_actor
      • remove_all_lights
      • remove_background_image
      • remove_blurring
      • remove_bounding_box
      • remove_bounds_axes
      • remove_chart
      • remove_environment_texture
      • remove_floors
      • remove_legend
      • remove_scalar_bar
      • render
      • reset_camera
      • reset_camera_clipping_range
      • reset_key_events
      • save_graphic
      • screenshot
      • set_background
      • set_chart_interaction
      • set_color_cycler
      • set_environment_texture
      • set_focus
      • set_position
      • set_scale
      • set_viewup
      • show
      • show_axes
      • show_axes_all
      • show_bounds
      • show_grid
      • store_click_position
      • store_mouse_position
      • subplot
      • to_pythreejs
      • track_click_position
      • track_mouse_position
      • unlink_views
      • untrack_click_position
      • untrack_mouse_position
      • update
      • update_bounds_axes
      • update_coordinates
      • update_scalar_bar_range
      • update_scalars
      • view_isometric
      • view_vector
      • view_xy
      • view_xz
      • view_yx
      • view_yz
      • view_zx
      • view_zy
      • where_is
      • window_size_context
      • write_frame
      • actors
      • background_color
      • bounds
      • camera
      • camera_position
      • camera_set
      • center
      • click_position
      • image
      • image_depth
      • image_scale
      • last_update_time
      • legend
      • length
      • mouse_position
      • parallel_projection
      • parallel_scale
      • pickable_actors
      • picked_block_index
      • picked_mesh
      • picked_point
      • render_window
      • renderer
      • scalar_bar
      • scalar_bars
      • scale
      • shape
      • store_image
      • suppress_rendering
      • theme
      • update_timer_id
      • window_size
    • pyvista.Property
    • pyvista.Renderer
    • pyvista.plotting._BaseMapper
    • InterpolationType
    • pyvista.plotting.volume.Volume
    • pyvista.plotting.volume_property.VolumeProperty
    • pyvista.CompositePolyDataMapper
    • pyvista.CompositeAttributes
    • pyvista.BlockAttributes
    • Charts
    • Convenience Functions
  • Utilities
  • Readers
  • Examples

link_views#

Plotter.link_views(views=0)[source]#

Link the views’ cameras.

Parameters:
viewsint | tuple or list

If views is int, link the views to the given view index or if views is a tuple or a list, link the given views cameras.

Examples

Not linked view case.

>>> import pyvista
>>> from pyvista import demos
>>> ocube = demos.orientation_cube()
>>> pl = pyvista.Plotter(shape=(1, 2))
>>> pl.subplot(0, 0)
>>> _ = pl.add_mesh(ocube['cube'], show_edges=True)
>>> _ = pl.add_mesh(ocube['x_p'], color='blue')
>>> _ = pl.add_mesh(ocube['x_n'], color='blue')
>>> _ = pl.add_mesh(ocube['y_p'], color='green')
>>> _ = pl.add_mesh(ocube['y_n'], color='green')
>>> _ = pl.add_mesh(ocube['z_p'], color='red')
>>> _ = pl.add_mesh(ocube['z_n'], color='red')
>>> pl.camera_position = 'yz'
>>> pl.subplot(0, 1)
>>> _ = pl.add_mesh(ocube['cube'], show_edges=True)
>>> _ = pl.add_mesh(ocube['x_p'], color='blue')
>>> _ = pl.add_mesh(ocube['x_n'], color='blue')
>>> _ = pl.add_mesh(ocube['y_p'], color='green')
>>> _ = pl.add_mesh(ocube['y_n'], color='green')
>>> _ = pl.add_mesh(ocube['z_p'], color='red')
>>> _ = pl.add_mesh(ocube['z_n'], color='red')
>>> pl.show_axes()
>>> pl.show()
../../../_images/pyvista-Plotter-link_views-1_00_00.png

Linked view case.

>>> pl = pyvista.Plotter(shape=(1, 2))
>>> pl.subplot(0, 0)
>>> _ = pl.add_mesh(ocube['cube'], show_edges=True)
>>> _ = pl.add_mesh(ocube['x_p'], color='blue')
>>> _ = pl.add_mesh(ocube['x_n'], color='blue')
>>> _ = pl.add_mesh(ocube['y_p'], color='green')
>>> _ = pl.add_mesh(ocube['y_n'], color='green')
>>> _ = pl.add_mesh(ocube['z_p'], color='red')
>>> _ = pl.add_mesh(ocube['z_n'], color='red')
>>> pl.camera_position = 'yz'
>>> pl.subplot(0, 1)
>>> _ = pl.add_mesh(ocube['cube'], show_edges=True)
>>> _ = pl.add_mesh(ocube['x_p'], color='blue')
>>> _ = pl.add_mesh(ocube['x_n'], color='blue')
>>> _ = pl.add_mesh(ocube['y_p'], color='green')
>>> _ = pl.add_mesh(ocube['y_n'], color='green')
>>> _ = pl.add_mesh(ocube['z_p'], color='red')
>>> _ = pl.add_mesh(ocube['z_n'], color='red')
>>> pl.show_axes()
>>> pl.link_views()
>>> pl.show()
../../../_images/pyvista-Plotter-link_views-1_01_00.png
On this page
  • Plotter.link_views()
Edit this page

© Copyright 2017-2023, The PyVista Developers.

Built with the PyData Sphinx Theme 0.12.0.