Skip to content

Plot with savefig results in an attribute error #1024

@mikerife

Description

@mikerife

Describe the bug
The plot (eplot, vplot etc) all result in an attribute error when saving the image to a file with this style:
mapdl.vplot("All", vtk=True, savefig='volplot.png')

To Reproduce
Open the attached JL notebook and run all cells.
Scroll down to end, will see plot in-line in notebook and long error messaging.

Expected behavior
No in-line image and plot saved to png file.

Screenshots
If applicable, add screenshots to help explain your problem.

System Information:

  • OS: [e.g. iOS] Win 10
  • Ansys version 2022 R1
  • PyMAPDL version 0.61.2

Additional context
Add any other context about the problem here.

Run a PyMAPDL report

Please run the following code wherever you are experiencing the bug and paste the output below. This report helps us track down bugs and it is critical to addressing your bug:

from ansys.mapdl import core as pymapdl
print(pymapdl.Report())
-------------------------------------------------------------------------------
PyMAPDL Software and Environment Report
-------------------------------------------------------------------------------
  Date: Wed Apr 06 09:05:09 2022 Mountain Daylight Time

                OS : Windows
            CPU(s) : 16
           Machine : AMD64
      Architecture : 64bit
               RAM : 63.2 GiB
       Environment : Jupyter
       File system : unknown
NVIDIA Corporation : GPU Vendor
NVIDIA RTX A2000 Laptop GPU/PCIe/SSE2 : GPU Renderer
4.5.0 NVIDIA 472.88 : GPU Version

  Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit
  (AMD64)]

        matplotlib : 3.5.1
             numpy : 1.22.0
           pyvista : 0.33.2
           appdirs : 1.4.4
              tqdm : 4.62.3
            pyiges : 0.2.1
             scipy : 1.7.3
              grpc : 1.43.0
ansys.api.mapdl.v0 : 0.4.1
ansys.mapdl.reader : 0.51.10
   google.protobuf : 3.19.3
-------------------------------------------------------------------------------

Ansys Installation
******************
Version   Location
------------------
212       C:\Program Files\ANSYS Inc\v212
221       C:\Program Files\ANSYS Inc\v221


Ansys Environment Variables
***************************
ANSYS212_DIR                   C:\Program Files\ANSYS Inc\v212\ANSYS
ANSYS221_DIR                   C:\Program Files\ANSYS Inc\v221\ANSYS
ANSYS221_PRODUCT               ' '
ANSYSCLOUDCLI_ROOT             C:\Program Files\ANSYS Inc\ANSYS Cloud\ANSYS Cloud CLI\
ANSYSELECTRON_ROOT             C:\Program Files\ANSYS Inc\ANSYS Cloud\ANSYS Electron\
ANSYSLIC_DIR                   C:\Program Files\ANSYS Inc\Shared Files\Licensing
AWP_LOCALE212                  en-us
AWP_LOCALE221                  en-us
AWP_ROOT212                    C:\Program Files\ANSYS Inc\v212
AWP_ROOT221                    C:\Program Files\ANSYS Inc\v221
CADOE_LIBDIR212                C:\Program Files\ANSYS Inc\v212\CommonFiles\Language\en-us
CADOE_LIBDIR221                C:\Program Files\ANSYS Inc\v221\CommonFiles\Language\en-us
​

Plotting-Troubleshooting.zip

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions