Skip to content

Plots failing Spyder #4635

Description

@mcMunich

🤓 Before submitting the issue

🔍 Description of the bug

Spyder will not produce plots (inline/auto/Tk/etc) when I use the standard prep7 plot commands.
mapdl.aplot/lplot/nplot...

This fails, for example. With or without notebook=False:
mapdl.aplot(cpos="xy", show_lines=True,notebook=False)

Image

However, the plots do appear in post1:

mapdl.post1()
### Plot displacement
result = mapdl.result
result_set = 0  # Plotting the first results
disp_fact = 1e10
result.plot_nodal_displacement(
    result_set,
    cpos="xy",
    displacement_factor=5,
    show_displacement=True,
    show_edges=True,
    notebook=False
)

But I am pretty sure the processor in apdl is not the issue, it is just weird that some work and some don't.

This was an issue earlier that could be resolved by adding notebook=False argument to the plot arguments, but that does not appear to resolve the issue.

The plots do generate if the .py (only tested w/ notebook=False) is run directly from the console in the venv.

🕵️ Steps To Reproduce

use the ansys python manager and start a new venv and use spyder.
download the bracket_example.py and run.
See if plots are generated
by default spyder might use inline plots but those are also failing now. 
Note the online version of bracket_example does not have the notebook=False arguments. Should they be added?

💻 Which Operating System are you using?

Windows

🐍 Which Python version are you using?

3.12

💾 Which MAPDL version are you using?

261

📝 PyMAPDL Report

PyMAPDL Software and Environment Report

Packages Requirements


Core packages

ansys.mapdl.core : 0.73.0
numpy : 2.4.4
platformdirs : 4.9.6
scipy : 1.17.1
grpc : Package not found
ansys.api.mapdl.v0 : Package not found
ansys.mapdl.reader : 0.55.2
google.protobuf : Package not found
ansys-math-core : 0.2.5

Optional packages

matplotlib : 3.10.9
pyvista : 0.47.3
pyiges : 0.3.3
tqdm : 4.67.3
ansys-tools-visualization_interface: 0.12.1
pandas : 3.0.3

Ansys Installation


Version Location

252 C:\Program Files\ANSYS Inc\v252
261 C:\Program Files\ANSYS Inc\v261
271 C:\Program Files\ANSYS Inc\v271

Ansys Environment Variables


ANSYS252_DIR C:\Program Files\ANSYS Inc\v252\ANSYS
ANSYS261_DIR C:\Program Files\ANSYS Inc\v261\ANSYS
ANSYS271_DIR C:\Program Files\ANSYS Inc\v271\ANSYS
ANSYSLIC_DIR C:\Program Files\ANSYS Inc\Shared Files\Licensing
AWP_LOCALE252 en-us
AWP_LOCALE261 en-us
AWP_LOCALE271 en-us
AWP_ROOT252 C:\Program Files\ANSYS Inc\v252
AWP_ROOT261 C:\Program Files\ANSYS Inc\v261
AWP_ROOT271 C:\Program Files\ANSYS Inc\v271
CADOE_LIBDIR252 C:\Program Files\ANSYS Inc\v252\CommonFiles\Language\en-us
CADOE_LIBDIR261 C:\Program Files\ANSYS Inc\v261\CommonFiles\Language\en-us
CADOE_LIBDIR271 C:\Program Files\ANSYS Inc\v271\CommonFiles\Language\en-us

📝 Installed packages

aiohappyeyeballs==2.6.1
aiohttp==3.13.5
aiosignal==1.4.0
alabaster==1.0.0
ansys-api-mapdl==0.6.0
ansys-api-mechanical==0.1.4
ansys-api-platform-instancemanagement==1.1.3
ansys-dpf-core==0.16.0
ansys-mapdl-core==0.73.0
ansys-mapdl-reader==0.55.2
ansys-math-core==0.2.5
ansys-mechanical-core==0.12.6
ansys-mechanical-stubs==0.1.10
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc6
ansys-tools-common==0.5.0
ansys-tools-visualization-interface==0.12.1
anyio==4.13.0
appdirs==1.4.4
argon2-cffi==25.1.0
argon2-cffi-bindings==25.1.0
arrow==1.4.0
astroid==4.0.4
asttokens==3.0.1
async-lru==2.3.0
asyncssh==2.22.0
atomicwrites==1.4.1
attrs==26.1.0
autopep8==2.0.4
babel==2.18.0
bcrypt==5.0.0
beautifulsoup4==4.14.3
binaryornot==0.6.0
black==26.3.1
bleach==6.3.0
cattrs==26.1.0
certifi==2026.4.22
cffi==2.0.0
chardet==7.4.3
charset-normalizer==3.4.7
click==8.3.3
cloudpickle==3.1.2
clr_loader==0.2.10
colorama==0.4.6
comm==0.2.3
contourpy==1.3.3
cookiecutter==2.7.1
cryptography==46.0.7
cycler==0.12.1
cyclopts==4.11.0
debugpy==1.8.20
decorator==5.2.1
defusedxml==0.7.1
diff-match-patch==20241021
dill==0.4.1
docstring-to-markdown==0.17
docstring_parser==0.18.0
docutils==0.22.4
executing==2.2.1
fastjsonschema==2.21.2
flake8==7.1.2
fonttools==4.62.1
fqdn==1.5.1
frozenlist==1.8.0
geomdl==5.4.0
grpcio==1.80.0
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
idna==3.13
imagesize==2.0.0
importlib_metadata==9.0.0
inflection==0.5.1
intervaltree==3.2.1
ipykernel==6.31.0
ipython==9.13.0
ipython_pygments_lexers==1.1.1
ipywidgets==8.1.8
isoduration==20.11.0
isort==8.0.1
jaraco.classes==3.4.0
jaraco.context==6.1.2
jaraco.functools==4.4.0
jedi==0.19.2
jellyfish==1.2.1
Jinja2==3.1.6
json5==0.14.0
jsonpointer==3.1.1
jsonschema==4.26.0
jsonschema-specifications==2025.9.1
jupyter-events==0.12.1
jupyter-lsp==2.3.1
jupyter_client==8.8.0
jupyter_core==5.9.1
jupyter_server==2.17.0
jupyter_server_proxy==4.5.0
jupyter_server_terminals==0.5.4
jupyterlab==4.5.6
jupyterlab_pygments==0.3.0
jupyterlab_server==2.28.0
jupyterlab_widgets==3.0.16
keyring==25.7.0
kiwisolver==1.5.0
lark==1.3.1
lsprotocol==2025.0.0
markdown-it-py==4.0.0
MarkupSafe==3.0.3
matplotlib==3.10.9
matplotlib-inline==0.2.1
mccabe==0.7.0
mdurl==0.1.2
mistune==3.2.0
more-itertools==11.0.2
msgpack==1.1.2
multidict==6.7.1
mypy_extensions==1.1.0
nbclient==0.10.4
nbconvert==7.17.1
nbformat==5.10.4
nest-asyncio==1.6.0
nest-asyncio2==1.7.2
notebook_shim==0.2.4
numpy==2.4.4
numpydoc==1.10.0
packaging==26.1
pandas==3.0.3
pandocfilters==1.5.1
parso==0.8.6
pathspec==1.1.0
pexpect==4.9.0
pickleshare==0.7.5
pillow==12.2.0
platformdirs==4.9.6
pluggy==1.6.0
pooch==1.9.0
prometheus_client==0.25.0
prompt_toolkit==3.0.52
propcache==0.4.1
protobuf==6.33.6
psutil==7.2.2
ptyprocess==0.7.0
pure_eval==0.2.3
pycodestyle==2.12.1
pycparser==3.0
pydocstyle==6.3.0
pyflakes==3.2.0
PyGithub==2.9.1
Pygments==2.20.0
pyiges==0.3.3
PyJWT==2.12.1
pylint==4.0.5
pylint-venv==3.0.4
pyls-spyder==0.4.0
PyNaCl==1.6.2
pyparsing==3.3.2
PyQt5==5.15.11
PyQt5-Qt5==5.15.2
PyQt5_sip==12.18.0
PyQtWebEngine==5.15.7
PyQtWebEngine-Qt5==5.15.2
python-dateutil==2.9.0.post0
python-json-logger==4.1.0
python-lsp-black==2.0.0
python-lsp-jsonrpc==1.1.2
python-lsp-ruff==2.3.1
python-lsp-server==1.14.0
python-slugify==8.0.4
pytokens==0.4.1
pytoolconfig==1.3.1
pyuca==1.2
pyvista==0.47.3
pywin32-ctypes==0.2.3
pywinpty==3.0.3
PyYAML==6.0.3
pyzmq==27.1.0
QDarkStyle==3.2.3
qstylizer==0.2.4
QtAwesome==1.4.2
qtconsole==5.7.2
QtPy==2.4.3
referencing==0.37.0
requests==2.33.1
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rfc3987-syntax==1.1.0
rich==15.0.0
rich-rst==1.3.2
roman-numerals==4.1.0
rope==1.14.0
rpds-py==0.30.0
rtree==1.4.1
ruff==0.15.11
scipy==1.17.1
scooby==0.11.2
Send2Trash==2.1.0
setuptools==82.0.1
simpervisor==1.0.0
six==1.17.0
snowballstemmer==3.0.1
sortedcontainers==2.4.0
soupsieve==2.8.3
Sphinx==9.1.0
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
spyder==6.1.4
spyder-kernels==3.1.4
stack-data==0.6.3
superqt==0.8.1
tabulate==0.10.0
terminado==0.18.1
text-unidecode==1.3
textdistance==4.6.3
three-merge==0.1.1
tinycss2==1.4.0
tomlkit==0.14.0
tornado==6.5.5
tqdm==4.67.3
traitlets==5.14.3
trame==3.12.0
trame-client==3.11.4
trame-common==1.1.3
trame-router==2.3.0
trame-server==3.10.0
trame-vtk==2.10.2
trame-vuetify==3.2.1
typing_extensions==4.15.0
tzdata==2026.1
ujson==5.12.0
uri-template==1.3.0
urllib3==2.6.3
vtk==9.6.1
watchdog==6.0.0
wcwidth==0.6.0
webcolors==25.10.0
webencodings==0.5.1
websocket-client==1.9.0
websockets==15.0.1
whatthepatch==1.0.7
widgetsnbextension==4.0.15
wslink==2.5.6
yapf==0.43.0
yarl==1.23.0
zipp==3.23.1

📝 Logger output file

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue, problem or error in PyMAPDL

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions