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

Add Mesh.imshow() and FieldContainer.imshow() #598

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

adtzlr
Copy link
Owner

@adtzlr adtzlr commented Jan 10, 2024

This method passes the image data of a screenshot taken by PyVista to a matplotlib figure.

def imshow(self, *args, **kwargs):
        import matplotlib.pyplot as plt

        fig, ax = plt.subplots()
        ax.imshow(self.screenshot(*args, filename=None, **kwargs))
        ax.set_axis_off()

        return ax

@adtzlr adtzlr added the enhancement New feature or request label Jan 10, 2024
@adtzlr adtzlr self-assigned this Jan 10, 2024
@adtzlr adtzlr merged commit 72afecf into main Jan 10, 2024
6 checks passed
@adtzlr adtzlr deleted the add-mesh-fieldcontainer-imshow branch January 10, 2024 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant