Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)