Python pylab 模块,semilogy() 实例源码

我们从Python开源项目中,提取了以下8个代码示例,用于说明如何使用pylab.semilogy()

项目:computational_physics_N2014301020117    作者:yukangnineteen    | 项目源码 | 文件源码
def show(self):
#        pl.semilogy(self.theta, self.omega)
#                , label = '$L =%.1f m, $'%self.l + '$dt = %.2f s, $'%self.dt + '$\\theta_0 = %.2f radians, $'%self.theta[0] + '$q = %i, $'%self.q + '$F_D = %.2f, $'%self.F_D + '$\\Omega_D = %.1f$'%self.Omega_D)
        pl.plot(self.theta_phase ,self.omega_phase, '.', label = '$t \\approx 2\\pi n / \\Omega_D$')
        pl.xlabel('$\\theta$ (radians)')
        pl.ylabel('$\\omega$ (radians/s)')
        pl.legend()
#        pl.text(-1.4, 0.3, '$\\omega$ versus $\\theta$ $F_D = 1.2$', fontsize = 'x-large')
        pl.title('Chaotic Regime')
#        pl.show()
#        pl.semilogy(self.time_array, self.delta)
#        pl.legend(loc = 'upper center', fontsize = 'small')
#        pl.xlabel('$time (s)$')
#        pl.ylabel('$\\Delta\\theta (radians)$')
#        pl.xlim(0, self.T)
#        pl.ylim(float(input('ylim-: ')),float(input('ylim+: ')))
#        pl.ylim(1E-11, 0.01)
#        pl.text(4, -0.15, 'nonlinear pendulum - Euler-Cromer method')
#        pl.text(10, 1E-3, '$\\Delta\\theta versus time F_D = 0.5$')
#        pl.title('Simple Harmonic Motion')
        pl.title('Chaotic Regime')
项目:computational_physics_N2014301020117    作者:yukangnineteen    | 项目源码 | 文件源码
def show_log(self):
#        pl.subplot(121)
        pl.semilogy(self.time_array, self.delta, 'c')
        pl.xlabel('$time (s)$')
        pl.ylabel('$\\Delta\\theta$ (radians)')
        pl.xlim(0, self.T)
#        pl.ylim(1E-11, 0.01)
        pl.text(42, 1E-7, '$\\Delta\\theta$ versus time $F_D = 1.2$', fontsize = 'x-large')
        pl.title('Chaotic Regime')
        pl.show()

#    def show_log_sub122(self):
#        pl.subplot(122)
#        pl.semilogy(self.time_array, self.delta, 'g')
#        pl.xlabel('$time (s)$')
#        pl.ylabel('$\\Delta\\theta$ (radians)')
#        pl.xlim(0, self.T)
#        pl.ylim(1E-6, 100)
#        pl.text(20, 1E-5, '$\\Delta\\theta$ versus time $F_D = 1.2$', fontsize = 'x-large')
#        pl.title('Chaotic Regime')
#        pl.show()
项目:computational_physics_N2014301020117    作者:yukangnineteen    | 项目源码 | 文件源码
def show(self):
#        pl.semilogy(self.theta, self.omega)
#                , label = '$L =%.1f m, $'%self.l + '$dt = %.2f s, $'%self.dt + '$\\theta_0 = %.2f radians, $'%self.theta[0] + '$q = %i, $'%self.q + '$F_D = %.2f, $'%self.F_D + '$\\Omega_D = %.1f$'%self.Omega_D)
        pl.plot(self.time_array,self.delta)

#        pl.show()
#        pl.semilogy(self.time_array, self.delta)
#        pl.legend(loc = 'upper center', fontsize = 'small')
#        pl.xlabel('$time (s)$')
#        pl.ylabel('$\\Delta\\theta (radians)$')
#        pl.xlim(0, self.T)
#        pl.ylim(float(input('ylim-: ')),float(input('ylim+: ')))
#        pl.ylim(1E-11, 0.01)
#        pl.text(4, -0.15, 'nonlinear pendulum - Euler-Cromer method')
#        pl.text(10, 1E-3, '$\\Delta\\theta versus time F_D = 0.5$')
#        pl.title('Simple Harmonic Motion')
#        pl.title('Chaotic Regime')
项目:computational_physics_N2014301020117    作者:yukangnineteen    | 项目源码 | 文件源码
def show_log(self):
#        pl.subplot(121)
        pl.semilogy(self.time_array, self.delta, 'c')
        pl.xlabel('$time (s)$')
        pl.ylabel('$\\Delta\\theta$ (radians)')
        pl.xlim(0, self.T)
#        pl.ylim(1E-11, 0.01)
        pl.text(42, 1E-7, '$\\Delta\\theta$ versus time $F_D = 1.2$', fontsize = 'x-large')
        pl.title('Chaotic Regime')
        pl.show()

#    def show_log_sub122(self):
#        pl.subplot(122)
#        pl.semilogy(self.time_array, self.delta, 'g')
#        pl.xlabel('$time (s)$')
#        pl.ylabel('$\\Delta\\theta$ (radians)')
#        pl.xlim(0, self.T)
#        pl.ylim(1E-6, 100)
#        pl.text(20, 1E-5, '$\\Delta\\theta$ versus time $F_D = 1.2$', fontsize = 'x-large')
#        pl.title('Chaotic Regime')
#        pl.show()
项目:computational_physics_N2014301020117    作者:yukangnineteen    | 项目源码 | 文件源码
def plot_delta(self):
        pl.figure(figsize = (8, 8))
        pl.semilogy(self.tprime, self.deltatheta, 'r')
#        pl.ylim(0.0001, 0.1)
#        pl.ylim(0.0001, 10)
        pl.xlim(0, 100)
        pl.ylabel('$\\Delta\\theta$ (radians)')
        pl.xlabel('time (yr)')
        pl.title('Hyperion $\\theta$ versus time')
        pl.text(4.1, 3e3, 'Ellipitical orbit')
项目:computational_physics_N2014301020117    作者:yukangnineteen    | 项目源码 | 文件源码
def plot_delta(self):
        pl.figure(figsize = (8, 8))
        pl.semilogy(self.tprime, self.deltatheta, 'r.')
#        pl.ylim(0.0001, 0.1)
        pl.ylim(0.0001, 10)
        pl.xlim(0, 10)
        pl.ylabel('$\\Delta\\theta$ (radians)')
        pl.xlabel('time (yr)')
        pl.title('Hyperion $\\theta$ versus time')
        pl.text(4.1, 2e-4, 'Ellipitical orbit')
项目:computational_physics_N2014301020117    作者:yukangnineteen    | 项目源码 | 文件源码
def plot_delta(self):
        pl.figure(figsize = (8, 8))
        pl.semilogy(self.tprime, self.deltatheta, 'r')
#        pl.ylim(0.0001, 0.1)
#        pl.ylim(0.0001, 0.1)
        pl.xlim(0, 100)
        pl.ylabel('$\\Delta\\theta$ (radians)')
        pl.xlabel('time (yr)')
        pl.title('Hyperion $\\theta$ versus time')
        pl.text(4.1, 0.05, 'Circular orbit')
项目:plasma    作者:jnkh    | 项目源码 | 文件源码
def plot_losses(conf,losses_list,builder,name=''):
    unique_id = builder.get_unique_id()
    savedir = 'losses'
    if not os.path.exists(savedir):
        os.makedirs(savedir)

    save_path = os.path.join(savedir,'{}_loss_{}.png'.format(name,unique_id))
    pl.figure()
    for losses in losses_list:
        pl.semilogy(losses)
    pl.xlabel('Epoch')
    pl.ylabel('Loss')
    pl.grid()
    pl.savefig(save_path)