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)
def plot_function_in_color_mesh(self, *axes): """Plot mesh grid on given axes""" for axis in axes: self.colormap = axis.pcolormesh(self.x, self.y, self.z, cmap=cm.jet) axis.set_xlabel('x', fontweight='bold') axis.set_ylabel('y', fontweight='bold') axis.yaxis.set_label_position('right') mouse_events = MousePlotEvents() mouse_events.zoom(axis) mouse_events.move(axis) mouse_events.reset_2d(axis)