This program draws a 3D plot. The function to plot is defined in f_to_plot(x,y). The matplotlib version on the calculator only has 2D capability. This program also has to function within memory which is allocated to Python on the calculator. Tested on the calculator using software version 23.2.6.
import matplotlib.pyplot as plt import numpy as np def f_to_plot(x,y): r = np.sqrt(x**2 + y**2) y = np.sin(r) / r return y Nx = 25 Ny = 20 xrange = (-9, 9) yrange = (-9, 9) xshift = 0.1 yshift = 0.05 x_array = np.linspace(xrange[0], xrange[1], Nx) for i in range(Ny): y = yrange[0] + (yrange[1] - yrange[0]) * i / (Ny - 1) z = f_to_plot(x_array, y) dx = i * xshift dy = i * yshift plt.plot(x_array + dx, z + dy, color="red") plt.show()