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

Fixed plotting of QuadMesh with nan coordinates #2691

Merged
merged 2 commits into from May 21, 2018
Merged

Conversation

philippjfr
Copy link
Member

Ensure that curvilinear coordinate meshes are all valid before plotting. Useful when plotting projected QuadMesh with some invalid values.

bokeh_plot

@philippjfr philippjfr added type: bug Something isn't correct or isn't working tag: backend: bokeh labels May 17, 2018
@philippjfr
Copy link
Member Author

Ready to merge.

else:
mask.append(False)

data = {'xs': XS, 'ys': YS, z.name: zvals[np.array(mask)]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am misunderstanding, but why can't you just compute the mask and apply that to xs and ys instead of defining XS and YS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XS and YS are lists of arrays and not arrays themselves.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be perfectly accurate they are lists of lists since the overhead for serializing and deserializing a bunch of tiny arrays is much larger than any benefit gained.

@jlstevens
Copy link
Contributor

Looks fine. Merging.

@jlstevens jlstevens merged commit 18ca8a4 into master May 21, 2018
@philippjfr philippjfr deleted the qmesh_nan_fix branch July 4, 2018 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: backend: bokeh type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants