You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a legend by making the following changes to the usage example doesn't work, i.e. no legend is visible:
...
## Add mesh to the plotter
plotter.add_mesh(mesh, scalars='myscalar', cmap='bwr', line_width=1, label="cube")
plotter.add_legend()
...
No errors are being shown.
On the other hand, when calling plotter.show() before st.session_state.model = HTML_stpyvista(plotter), the legend is visible in the separate pyvista window:
The text was updated successfully, but these errors were encountered:
With the panel backend (from stpyvista>=0.0.7), colorbars and titles can be added to the plotter. They are not totally legends, but can serve as a way to annotate stuff in the plotter.
## Add mesh to the plotterplotter.add_mesh(mesh, cmap='bwr', line_width=1,)
plotter.add_scalar_bar()
plotter.add_title("My cube", color="black", font_size=14)
Adding a legend by making the following changes to the usage example doesn't work, i.e. no legend is visible:
No errors are being shown.
On the other hand, when calling
plotter.show()
beforest.session_state.model = HTML_stpyvista(plotter)
, the legend is visible in the separate pyvista window:The text was updated successfully, but these errors were encountered: