Skip to content

[Question / Enhancement] How to do screenshot of plots? #193

@jfthuong

Description

@jfthuong

2 functions mention off_screen argument to be easier for doing a screenshot:

But the question remains: how to perform a screenshot (i.e. save to a file) a given plot?

I tried using off_screen=True and it does not seem to do anything.

With pymapdl, you could do something like:

result = pymapdl_reader.read_binary("knight data/Kight_vv.rst")
result.plot_nodal_displacement(0,  screenshot='knight.png')

But using the argument screenshot does not seem to work in pydpf: so how to do?

Ideally, it would be nice to have features like the function show of pyvista:
https://docs.pyvista.org/examples/02-plot/screenshot.html
... which also gives the possibility to do plotter.image to be able to load the picture in matplotlib.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions