build/lib/PyOptical/ExpData/expdata_class.py
def PlotExpData(self, ri=True, ec=True):
        """Plots the experimental data of the material.

        Arguments:
        ri -- plot the refractive index as a function of the wavelength
        ec -- plot the extinction coefficient as a function of the wavelength
        """
        if ri and not ec:
            x_ri = self.ExpData['wl_n']
            y_ri = self.ExpData['n']
            fig, ax = plt.subplots()
            ax.plot(x_ri, y_ri, label='n')
            ax.set(xlabel='wavelength (m)', ylabel='n',
                   title=f'Refractive index graph of {self.__name__}')
            ax.grid()

        if ec and not ri:
            x_ec = self.ExpData['wl_k']
            y_ec = self.ExpData['k']
            fig, ax = plt.subplots()
            ax.plot(x_ec, y_ec, label='k')
            ax.set(xlabel='wavelength (m)', ylabel='k',
                   title=f'Extinction coefficient graph of {self.__name__}')
            ax.grid()

        if ri and ec:
            x_ri = self.ExpData['wl_n']
            y_ri = self.ExpData['n']
            x_ec = self.ExpData['wl_k']
            y_ec = self.ExpData['k']
            fig, ax = plt.subplots()
            ax.plot(x_ri, y_ri, label='n')
            ax.plot(x_ec, y_ec, label='k')
            ax.set(xlabel='wavelength (m)', ylabel='n, k',
                   title='Refractive index and extinction coefficient'
                   f'graph of {self.__name__}')
            ax.grid()
        plt.legend()
        plt.show()
Plots the experimental data of the material.

        Arguments:
        ri -- plot the refractive index as a function of the wavelength
        ec -- plot the extinction coefficient as a function of the wavelength
        
Plots the experimental data of the material.
Arguments:
ri -- plot the refractive index as a function of the wavelength
ec -- plot the extinction coefficient as a function of the wavelength
Plots the experimental data of the material . Arguments : ri -- plot the refractive index as a function of the wavelength ec -- plot the extinction coefficient as a function of the wavelength
def PlotExpData(self, ri=True, ec=True):
        if ri and not ec:
            x_ri = self.ExpData['wl_n']
            y_ri = self.ExpData['n']
            fig, ax = plt.subplots()
            ax.plot(x_ri, y_ri, label='n')
            ax.set(xlabel='wavelength (m)', ylabel='n',
                   title=f'Refractive index graph of {self.__name__}')
            ax.grid()
        if ec and not ri:
            x_ec = self.ExpData['wl_k']
            y_ec = self.ExpData['k']
            fig, ax = plt.subplots()
            ax.plot(x_ec, y_ec, label='k')
            ax.set(xlabel='wavelength (m)', ylabel='k',
                   title=f'Extinction coefficient graph of {self.__name__}')
            ax.grid()
        if ri and ec:
            x_ri = self.ExpData['wl_n']
            y_ri = self.ExpData['n']
            x_ec = self.ExpData['wl_k']
            y_ec = self.ExpData['k']
            fig, ax = plt.subplots()
            ax.plot(x_ri, y_ri, label='n')
            ax.plot(x_ec, y_ec, label='k')
            ax.set(xlabel='wavelength (m)', ylabel='n, k',
                   title='Refractive index and extinction coefficient'
                   f'graph of {self.__name__}')
            ax.grid()
        plt.legend()
        plt.show()
def PlotExpData ( self , ri = True , ec = True ) : if ri and not ec : x_ri = self . ExpData [ 'wl_n' ] y_ri = self . ExpData [ 'n' ] fig , ax = plt . subplots ( ) ax . plot ( x_ri , y_ri , label = 'n' ) ax . set ( xlabel = 'wavelength (m)' , ylabel = 'n' , title = f'Refractive index graph of {self.__name__}' ) ax . grid ( ) if ec and not ri : x_ec = self . ExpData [ 'wl_k' ] y_ec = self . ExpData [ 'k' ] fig , ax = plt . subplots ( ) ax . plot ( x_ec , y_ec , label = 'k' ) ax . set ( xlabel = 'wavelength (m)' , ylabel = 'k' , title = f'Extinction coefficient graph of {self.__name__}' ) ax . grid ( ) if ri and ec : x_ri = self . ExpData [ 'wl_n' ] y_ri = self . ExpData [ 'n' ] x_ec = self . ExpData [ 'wl_k' ] y_ec = self . ExpData [ 'k' ] fig , ax = plt . subplots ( ) ax . plot ( x_ri , y_ri , label = 'n' ) ax . plot ( x_ec , y_ec , label = 'k' ) ax . set ( xlabel = 'wavelength (m)' , ylabel = 'n, k' , title = 'Refractive index and extinction coefficient' f'graph of {self.__name__}' ) ax . grid ( ) plt . legend ( ) plt . show ( )
Plots the experimental data of the material.
Plots the experimental data of the material .
"""Plots the experimental data of the material.

        Arguments:
        ri -- plot the refractive index as a function of the wavelength
        ec -- plot the extinction coefficient as a function of the wavelength
        """
self
ri
ec