Skip to content

Commit

Permalink
Add simple web export example (#319)
Browse files Browse the repository at this point in the history
* Add simple web export example

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update examples/web_export.py

Co-authored-by: Igor Tatarnikov <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Igor Tatarnikov <[email protected]>
  • Loading branch information
3 people authored Jan 15, 2024
1 parent 740398f commit 7f305f0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/web_export.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from pathlib import Path

from myterial import orange
from rich import print

from brainrender import Scene

print(f"[{orange}]Running example: {Path(__file__).name}")

# Create a brainrender scene
scene = Scene(title="brainrender web export")

# Add brain regions
scene.add_brain_region(
"MOs", "CA1", alpha=0.2, color="green", hemisphere="right"
)

# Render!
scene.render()

# Export to web
scene.export("brain_regions.html")

0 comments on commit 7f305f0

Please sign in to comment.