The error message -
Error:runfile('C:/Users/HSIPL/Desktop/New f/a i/Homework 5 6 Solution draft.py', wdir='C:/Users/HSIPL/Desktop/New f/a i')
C:/Users/HSIPL/Desktop/New f/a i/Homework 5 6 Solution draft.py:13: RuntimeWarning: divide by zero encountered in double_scalars
h = (x_max / x_min)/100
C:\Users\HSIPL\Anaconda3\lib\site-packages\matplotlib\cbook\deprecation.py:107: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
warnings.warn(message, mplDeprecation, stacklevel=1)
Traceback (most recent call last):
File "<ipython-input-2-9e53960ad79d>", line 1, in <module>
runfile('C:/Users/HSIPL/Desktop/New f/a i/Homework 5 6 Solution draft.py', wdir='C:/Users/HSIPL/Desktop/New f/a i')
File "C:\Users\HSIPL\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile
execfile(filename, namespace)
File "C:\Users\HSIPL\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/HSIPL/Desktop/New f/a i/Homework 5 6 Solution draft.py", line 24, in <module>
plt.contourf(xx, yy, Z, cmap=plt.cm.Paired, alpha=0.8)
NameError: name 'xx' is not defined
How to write the new coding for correct programming ?