pyBrowzarr

Export & Animation

Static image export, video export, and scripted walkthrough keyframes with pyBrowzarr.

The export() method configures a static image or animated export of the current plot. Unlike the other plot methods, export() immediately calls .plot() for you, so a single chained call both configures the export and launches the view.

Browzarr(dataset="gs://store", variable="temp").volume().export(main_title="My Map")

export() signature

def export(open_browser: bool = True, **kwargs) -> Browzarr
ArgumentDefaultDescription
open_browserTrueOpen the browser/iframe after configuring the export. Pass False to configure only.
**kwargs—Any option listed below.
All options are optional — only the keys you pass are included in the export config. Keys are snake_case in Python and delivered camel-cased to the frontend.

Image options

OptionTypeDescription
include_backgroundboolInclude the background. If false then transparent
main_titlestrMain title drawn on the export.
custom_restuple[float, float]Custom export resolution (width, height) in pixels.
include_axisboolDraw the axes in the export.
include_colorbarboolDraw a colorbar in the export.
Colorbar Options
cbar_locstrColorbar position ("left", "right", "top", "bottom").
cbar_numintNumber of tick marks on the colorbar.
cbar_labelstrText label shown on the colorbar.
cbar_unitsstrUnits shown alongside the colorbar label.
.export(
    include_background=True,
    include_colorbar=True,
    include_axis=False,
    cbar_loc="right",
    cbar_num=8,
    cbar_label="Temperature",
    cbar_units="K",
    main_title="July Mean Temperature",
    custom_res=(1920, 1080),
)

Animation options

Enable animate=True to produce a video/animation. The following options control how the animation is driven.

OptionTypeDescription
animateboolExport as animation
framesintTotal number of frames to render.
frame_rateintFrames per second (FPS) of the output.
orbitboolAnimate a camera orbit around the globe.
orbit_degfloatTotal degrees of orbit to sweep during the animation duration.
use_timeboolAnimate the time/Z-axis along with the animation.
time_rateintTime playback rate (FPS) to play slower or faster than camera FPS.
loop_timeboolLoop the time axis back to the start when it reaches the end.
.export(
    animate=True,
    frames=120,
    frame_rate=30,
    use_time=True,
    time_rate=1.0,
    loop_time=True,
)

Camera orbit example

.export(
    animate=True,
    frames=180,
    frame_rate=30,
    orbit=True,
    orbit_deg=360.0,
)

Keyframes

For a fully scripted camera/visual walkthrough, pass keyframes as a dict (or point to a file with keyframes_path). Each keyframe maps a frame number to a visual and camera state, and an optional time.

OptionTypeDescription
keyframesobjectA dict of keyframes. When provided, it is written to a keyframes.json file and that path is passed to the frontend.
keyframes_pathstrPath to an existing keyframes JSON file to use instead of passing keyframes inline.
from browzarr import Browzarr

keyframes = {
    "0": {
        "visual": {"transparency": 0.0, "valueRange": [0, 1], "nanTransparency": 1},
        "camera": {
            "position": {"x": -4.5, "y": 2.4, "z": 4.8},
            "rotation": {"isEuler": True, "_x": -0.46, "_y": -0.70, "_z": -0.31, "_order": "XYZ"},
        },
        "time": 0,
    },
    "31": {
        "visual": {"transparency": 0.0, "valueRange": [0, 1], "nanTransparency": 1},
        "camera": {
            "position": {"x": 2.2, "y": 2.9, "z": 6.0},
            "rotation": {"isEuler": True, "_x": -0.44, "_y": 0.32, "_z": 0.15, "_order": "XYZ"},
        },
        "time": 0,
    },
}

Browzarr(dataset="gs://store", variable="temperature").volume().export(
    animate=True,
    frames=60,
    frame_rate=30,
    keyframes=keyframes,
)

Or reference a file on disk:

Browzarr(dataset="gs://store", variable="temperature").volume().export(
    animate=True,
    frames=60,
    frame_rate=30,
    keyframes_path=r"C:\path\to\keyframes.json",
)
The keyframes/keyframes_path options are mutually exclusive — provide one or the other, not both.
Copyright © 2026