subplots
Subplots
Bases: RendererWindowInteractor
Class for creating multiple renderers.
shared_camera = shared_camera
instance-attribute
__init__(width=800, height=600, ncols=1, nrows=1, shared_camera=True, background_color=(26, 51, 102))
add_actors(renderer, actors=())
Add list of actors to a renderer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
renderer |
(int, list or tuple)
|
Indices of the renderer |
required |
actors |
list
|
List of actors to add to the renderer |
()
|
add_renderers(nrows=1, ncols=1, background_color=(26, 51, 102))
Create and return an array of renderers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ncols |
int
|
Number of columns. Defaults to 1. |
1
|
nrows |
int
|
Number of rows. Defaults to 1. |
1
|
background_color |
str or list
|
Name of color or RGB list. Defaults to blue. |
(26, 51, 102)
|
Returns:
| Name | Type | Description |
|---|---|---|
ndarray |
ndarray
|
Array of renderers |
add_time_operation(time_operation, dt=20)
Add time dependend operation to the scene.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_operation |
_type_
|
function for updating the scene |
required |
dt |
int
|
time interval operation. Defaults to 20 ms. |
20
|
export_html(filename)
Export render to html file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename |
str
|
Filename of the resulting html file. |
required |
make_screenshot(screenshot_name='screenshot.png', transparent=False)
reset_cameras(pad=0.8)
set_camera_vector(vector, angle=0)
Set camera position for all renderers in the subplot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vector |
tuple
|
Camera position. |
required |
angle |
int
|
Defaults to 0. |
0
|
start()
Start every renderer window in the array of renderers.