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

Fix get scalar array bug for VTK pane #372

Merged
merged 1 commit into from
Apr 8, 2019
Merged

Fix get scalar array bug for VTK pane #372

merged 1 commit into from
Apr 8, 2019

Conversation

banesullivan
Copy link
Contributor

@banesullivan banesullivan commented Apr 8, 2019

There was a bug that would prevent scalars from being shown sometimes. This fixes it.

Here's code to see the difference (running off of vtki master branch - note there are several examples here that show this happening):

import vtki
import numpy as np

vtki.set_plot_theme('doc')
sphere = vtki.Sphere(radius=3.14)

# make cool swirly pattern
vectors = np.vstack((np.sin(sphere.points[:, 0]),
np.cos(sphere.points[:, 1]),
np.cos(sphere.points[:, 2]))).T

# add and scale
sphere.vectors = vectors*0.3

# plot the arrows and the sphere
p = vtki.Plotter()
p.add_mesh(sphere.arrows, scalars='GlyphScale', color=None, lighting=False, stitle='Vector Magnitude')
p.add_mesh(sphere, color='grey', ambient=0.6, opacity=0.5, show_edges=False)
p.show()

@codecov-io
Copy link

Codecov Report

Merging #372 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #372   +/-   ##
=======================================
  Coverage   86.63%   86.63%           
=======================================
  Files          92       92           
  Lines        7884     7884           
=======================================
  Hits         6830     6830           
  Misses       1054     1054
Impacted Files Coverage Δ
panel/pane/vtk.py 30.32% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ab0749...a26901d. Read the comment docs.

@philippjfr
Copy link
Member

Thanks @banesullivan

@philippjfr philippjfr merged commit ed6bfca into holoviz:master Apr 8, 2019
@xavArtley xavArtley mentioned this pull request Apr 12, 2019
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

Successfully merging this pull request may close these issues.

3 participants