Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

RGBA color support inside a Jupyter Notebook #15

@GuillaumeFavelier

Description

@GuillaumeFavelier

When I use RGBA colors inside a Jupyter Notebook, I obtain an unexpected result:

import pyvista as pv
import numpy as np

sphere = pv.Sphere()
scalars = np.ones((sphere.GetNumberOfPoints(), 4)) * 255.0
scalars = scalars.astype('ubyte')

p = pv.Plotter()
p.add_mesh(sphere, rgba=True, scalars=scalars)
p.show()

image

When I run this script natively, I get the right result of course:

image

Metadata

Metadata

Assignees

Labels

IPython/JupyterQuestions around using PyVista in IPython/JupyterplottingGeneral plotting/rendering topics

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions