I am trying to plot a function z= sinx cosy over -pi to pi
This is what I'm hoping to get
This is the code I have written in an attempt to do the same:
import plotly.graph_objs as go
from scipy.linalg import toeplitz
x=np.linspace(-np.pi,np.pi,30)
z = [(np.sin(i)*np.cos(i)) for i in x]
fig = go.Figure(data=[go.Surface(x=x, y=x, z=toeplitz(z))])
fig.show()
plotly output that I'm getting
I have not been able to understand what 'grid' or '2d array' format I have to convert my z co-ordinate column data into for getting the right graph. Toeplitz was an attempt to do the same, but it seems symmetric unlike the required graph. Please help