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

[Feature] #3016

Open
MarkusZimmerDLR opened this issue Feb 14, 2024 · 0 comments
Open

[Feature] #3016

MarkusZimmerDLR opened this issue Feb 14, 2024 · 0 comments
Labels
module: I/O type: feature request 💡 Desired capabilities / enhancements

Comments

@MarkusZimmerDLR
Copy link

Feature Request

Dear vtk-folks,

This issue already developed in December, yet between the year it went under my radar.

Particular aspect have been already discussed in the help channels of the pyvista repo.
Basically, it would be nice having categorical labelling also available in vtk.js.

Thanks!
Cheers,
Markus

Discussed in pyvista/pyvista#5249

Originally posted by MarkusZimmerDLR November 30, 2023
Dear pyvista folks,

I am currently struggling with the trame export of pyvista plotters.

More specifically, I am trying to mark and label specific parts of the mesh, either using labels and legends, or labelled axes and cell data.

Legends are lost after html export. Axes labels are converted to integers.
Any idea on how to generate a categorial labelling.

Thanks!

Quick example of the issue:

import pyvista as pv
import numpy as np
s = pv.Sphere()
a = np.arange(s.n_cells, dtype=object)
a[:s.n_cells//2] = 'spam'
a[s.n_cells//2:] = 'egg'
s.cell_data['test'] = a
p = pv.Plotter()
p.add_mesh(s, scalars='test')
p.export_html('test.html')
p.screenshot('test.png')

Result for the png:
test

Result for html (converted to png for upload):

grafik

Motivation and Detailed Description

Placeholder

@MarkusZimmerDLR MarkusZimmerDLR added the type: feature request 💡 Desired capabilities / enhancements label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: I/O type: feature request 💡 Desired capabilities / enhancements
Projects
None yet
Development

No branches or pull requests

2 participants