Debugging a surface built without a grid

A student wants a surface plot of z=sin⁡xcos⁡yz = \sin x \cos y over a rectangle and writes the following code before calling plot_surface.


Python
x = np.linspace(0, 1, 50)
y = np.linspace(0, 2, 30)
Z = np.sin(x) * np.cos(y)


Which of the following statements about this code and its possible fixes are true? Select all that apply.

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Creating Specialized and Three Dimensional Plots Questions: