ansys / pydpf-post

Data Processing Framework - Post Processing Module
https://post.docs.pyansys.com
MIT License
43 stars 8 forks source link

Dynamic plots in jupyter notebook - ? #106

Open mcMunich opened 2 years ago

mcMunich commented 2 years ago

Hello, I have a success/fail story. If I create a jupyter notebook via Anaconda, I get dynamic plots (rotates, zooms, etc). In Anaconda I have a python3.8 environment. If I create a jupyter notebook with a cmd line (jupyter notebook.....) in a directory the plots I create are not dynamic (so static). (Since the (static) plots are generated, I am assuming I have an acceptable version of python behind the jupyter notebook). pyAnsys should be 'IDE agnostic' so I don't think using Anaconda is a solution.

Any ideas?

from ansys.dpf import post
import time
migData = r'D:\Models\good Examples\simpleBeamModel\SimpleBeamModel_files\dp0\SYS\MECH\file.rst'
solution = post.load_solution(migData)

t1 = time.time()
displacement = solution.displacement()
norm = displacement.norm
norm.plot_contour()
PProfizi commented 1 year ago

Hi @mcMunich, this might be due to a different back-end being used. Could you check here and especially print out the back-end in each case using pyvista.themes.DefaultTheme.jupyter_backend? Could you also pip list both of your environments? I assume when you create a jupyter notebook with a cmd line the Python interpreter used by Jupyter is not the same?