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

option to use PyVista for 3D plotting? #171

Open
banesullivan opened this issue May 24, 2019 · 11 comments
Open

option to use PyVista for 3D plotting? #171

banesullivan opened this issue May 24, 2019 · 11 comments
Labels
viz Anything about visualization

Comments

@banesullivan
Copy link
Member

banesullivan commented May 24, 2019

I'm thinking about adding changes to discretize that would leverage PyVista for 3D plotting if it is available. For example, I'm thinking about adding a condition for mesh.plotGrid that would call .to_vtk() and set up a PyVista figure rather than a Matplotlib figure:

Here's a current implementation (from this example):

ezgif com-video-to-gif-3

That same mesh can be plotted with PyVista:

ezgif com-video-to-gif-3

What are folks thoughts on this?

@banesullivan banesullivan added the viz Anything about visualization label May 24, 2019
@prisae
Copy link
Member

prisae commented May 25, 2019

I would be all in for this! Thumbs up from me.

@lheagy
Copy link
Member

lheagy commented May 25, 2019

👍 from me on this @banesullivan!! This would be great :)

@lheagy
Copy link
Member

lheagy commented May 25, 2019

In terms of implementation, I think it would be nice to have a plotting_backend property (or similar) that can be set to pyvista, matplotlib (and potentially others), so that the user can switch between in the case that they want a matplotlib figure even if they have pyvista available. For the default though, 👍 on having pyvista be the default if available.

@fourndo
Copy link
Member

fourndo commented May 25, 2019

Sounds great to able to spin it around.
I personally never use this call cause it's not very useful to look at a spaghetti of lines.
I would prefer seeing maybe three orthogonal sections in the middle?
Just a thought

@banesullivan
Copy link
Member Author

banesullivan commented May 25, 2019

Thanks for the input everybody!

I would prefer seeing maybe three orthogonal sections in the middle?

That's an excellent idea - perhaps something like PyVista's .slice_orthogonal method (or the IPython slicer tool) that would perform the slicing and set up a render window?

@thast
Copy link
Member

thast commented May 25, 2019

@micmitch experimented a lot on 3D visualization. Maybe worth to get his inputs too.

@RichardScottOZ
Copy link

I would like to have it, anyway

@dccowan
Copy link
Member

dccowan commented Apr 7, 2021

We did something similar in SimPEG recently with plotly. If the user has pyvista, they would have access to functionality that would call pyvista. If they don't have the package, no worries.

@banesullivan
Copy link
Member Author

I certainly dropped the ball on this one.

It should be fairly low-hanging fruit to implement this.

@RichardScottOZ
Copy link

Might be a good Transform-2021 thing?

@domfournier
Copy link
Contributor

domfournier commented Apr 7, 2021

Well that's exactly right @RichardScottOZ . My thought was to communicate through subsurface objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
viz Anything about visualization
Projects
None yet
Development

No branches or pull requests

8 participants