NameError: name 'interactive' is not defined


2.2k
views
0
7 months ago by
I am running Spyder 3.2.6 & Fenics 2017.2.0.

Spyder is running through an anaconda environment, which has been build using the following commands:

conda create -n fenicsproject -c conda-forge fenics
source activate fenicsproject

I am trying to fun the first tutorial ft01_poisson.py on the fenics website. A link is given below:
https://github.com/hplgit/fenics-tutorial/blob/master/pub/python/vol1/ft01_poisson.py

When I try and execute this file, i get the following error: "NameError: name 'interactive' is not defined"

Could anyone explain what I am missing / have done wrong?






Community: FEniCS Project

1 Answer


3
7 months ago by
Plotting has changed in 2017.2.0 and the tutorial hasn't yet been updated.

New style plotting is shown in the main DOLFIN demos, e.g. last lines of:

https://bitbucket.org/fenics-project/dolfin/src/593e93e79a866e56f5188abe9b89daa32f51cfad/python/demo/documented/poisson/demo_poisson.py.rst?at=master&fileviewer=file-view-default

import matplotlib.pyplot as plt
plot(u)
plt.show()
Perfect - Thank you Jack
written 7 months ago by Ryan Murphy  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »