def plot_function_in_3d(self, *axes): """Plot 3d function on given axes""" for axis in axes: axis.plot_surface(self.x, self.y, self.z, cmap=cm.jet, rstride=2, cstride=2) axis.set_xlabel('x', fontweight='bold') axis.set_ylabel('y', fontweight='bold') axis.set_zlabel('f(x, y)', fontweight='bold') mouse_events = MousePlotEvents() mouse_events.zoom(axis) mouse_events.reset_3d(axis)