Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stpyvista display blank region in browser (tested with provided examples) #7

Closed
anciaux opened this issue Mar 24, 2023 · 1 comment
Closed

Comments

@anciaux
Copy link

anciaux commented Mar 24, 2023

Dear developers,

Thanks a lot for this project.

For some reason something go broken recently, and the rendered box does not appear anymore.

The script I used is:

import streamlit as st
import pyvista as pv
from stpyvista import stpyvista

# ipythreejs does not support scalar bars :(
pv.global_theme.show_scalar_bar = False

# Initialize a plotter object
plotter = pv.Plotter(window_size=[400, 400])

# Create a mesh with a cube
mesh = pv.Cube(center=(0, 0, 0))

# Add some scalar field associated to the mesh
mesh['myscalar'] = mesh.points[:, 2]*mesh.points[:, 0]

# Add mesh to the plotter
plotter.add_mesh(mesh, scalars='myscalar', cmap='bwr', line_width=1)

# Final touches
plotter.view_isometric()

# Pass a key to avoid re-rendering at each time something changes in the page
stpyvista(plotter, key="pv_cube")

The versions of packages are

streamlit                1.20.0
pyvista                  0.38.5
stpyvista                0.0.5
stpyvista                0.0.5
pythreejs                2.3.0
ipywidgets               7.7.1
ipython                  8.4.0

I also join the log from chrome, showing some complaints about some "widgets".

localhost-1679643230547.log

Thank you very much for your help on this.

@edsaac
Copy link
Owner

edsaac commented Mar 24, 2023

Probably this same issue with pyvista deprecating the pythreejs backend.

@edsaac edsaac closed this as completed Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants