(self, filename=None)
Method to plot the control points. It is possible to save the resulting
        figure.

        :param str filename: if None the figure is shown, otherwise it is saved
            on the specified `filename`. Default is None.
Method to plot the control points. It is possible to save the resulting
        figure.
Method to plot the control points . It is possible to save the resulting figure .
def plot_points(self, filename=None):
        """
        Method to plot the control points. It is possible to save the resulting
        figure.

        :param str filename: if None the figure is shown, otherwise it is saved
            on the specified `filename`. Default is None.
        """
        fig = plt.figure(1)
        axes = fig.add_subplot(111, projection='3d')
        orig = axes.scatter(self.original_control_points[:, 0],
                            self.original_control_points[:, 1],
                            self.original_control_points[:, 2],
                            c='blue',
                            marker='o')
        defor = axes.scatter(self.deformed_control_points[:, 0],
                             self.deformed_control_points[:, 1],
                             self.deformed_control_points[:, 2],
                             c='red',
                             marker='x')

        axes.set_xlabel('X axis')
        axes.set_ylabel('Y axis')
        axes.set_zlabel('Z axis')

        plt.legend((orig, defor), ('Original', 'Deformed'),
                   scatterpoints=1,
                   loc='lower left',
                   ncol=2,
                   fontsize=10)

        # Show the plot to the screen
        if filename is None:
            plt.show()
        else:
            fig.savefig(filename)
def plot_points ( self , filename = None ) : fig = plt . figure ( 1 ) axes = fig . add_subplot ( 111 , projection = '3d' ) orig = axes . scatter ( self . original_control_points [ : , 0 ] , self . original_control_points [ : , 1 ] , self . original_control_points [ : , 2 ] , c = 'blue' , marker = 'o' ) defor = axes . scatter ( self . deformed_control_points [ : , 0 ] , self . deformed_control_points [ : , 1 ] , self . deformed_control_points [ : , 2 ] , c = 'red' , marker = 'x' ) axes . set_xlabel ( 'X axis' ) axes . set_ylabel ( 'Y axis' ) axes . set_zlabel ( 'Z axis' ) plt . legend ( ( orig , defor ) , ( 'Original' , 'Deformed' ) , scatterpoints = 1 , loc = 'lower left' , ncol = 2 , fontsize = 10 ) # Show the plot to the screen if filename is None : plt . show ( ) else : fig . savefig ( filename )