vedo icon indicating copy to clipboard operation
vedo copied to clipboard

Scalar bar is not showing while exporting vedo plots as x3d or html

Open YuvarajParimalam opened this issue 2 years ago • 5 comments

I have created a mesh plot with scalar bar and it is showing fine on vedo default window, but When i try to export it using default export method, scalar bar is missing in the html and x3d output. Could you please help me on this

YuvarajParimalam avatar Jan 25 '23 07:01 YuvarajParimalam

Hi, sorry - the 2D scalarbar is not expertable to x3d i'm afraid.. Have you tried the 3D version? mesh.add_scalarbar3d(...) that should work..

marcomusy avatar Jan 26 '23 00:01 marcomusy

Hi Marco, I have tried the above mentioned lines. But didn't work. Still the scalar bar is not shown in the output.

YuvarajParimalam avatar Jan 26 '23 05:01 YuvarajParimalam

I made a quick fix but it's still a bit buggy... can you reproduce this?

pip install -U git+https://github.com/marcomusy/vedo.git

from vedo import *

s = Sphere()
pts = s.points()
s.cmap("viridis", pts[:,2]).add_scalarbar3d("test scalarbar")

show(s.alpha(0.2), s.scalarbar, axes=1)
exit()

Screenshot from 2023-01-27 22-11-02

marcomusy avatar Jan 27 '23 21:01 marcomusy

Hi Marco, Thanks for the quick fix. I just noticed the grid lines are not showing in the html output.

YuvarajParimalam avatar Jan 31 '23 05:01 YuvarajParimalam

if you refer to the cell edges -yes unfortunately x3d doesn't seem be be rendering them... I´m afraid it's a limitation...

marcomusy avatar Feb 02 '23 13:02 marcomusy