当前位置: 首页>>代码示例>>Python>>正文


Python Frame.t方法代码示例

本文整理汇总了Python中frame.Frame.t方法的典型用法代码示例。如果您正苦于以下问题:Python Frame.t方法的具体用法?Python Frame.t怎么用?Python Frame.t使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在frame.Frame的用法示例。


在下文中一共展示了Frame.t方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Frame

# 需要导入模块: from frame import Frame [as 别名]
# 或者: from frame.Frame import t [as 别名]
                                          'overplot':0*np.arange(ny/8-1)})

gamma_th = Frame(np.array(soln['gammamax'][1:ny/10]),meta={'dx':dky,'x0':dky,'stationary':True,'nt':gamma_exp.nt,'yscale':'linear','title':r'$\gamma_{linear}$','fontsz':28,'ylabel':r'$\frac{\gamma}{ \omega_{ci}}$','xlabel':r'$k_y \rho_s$','ticksize':28,'style':'--','linewidth':15})

#let's create single frame
import matplotlib.ticker as ticker
from matplotlib.ticker import FormatStrFormatter
lin_formatter = ticker.ScalarFormatter()
from pylab import legend
lin_formatter.set_powerlimits((1, 1))
#plt.autoscale(axis='x',tight=True)
#self.ax.axis('tight')
#pp = PdfPages('gamma.pdf')
fig = plt.figure()
gamma_exp.ax = None
gamma_exp.t = 100
gamma_th.ax = None
gamma_exp.render(fig,111)
gamma_th.render(fig,111)
plt.tick_params(axis='both',direction='in',which='both',labelsize=20)
print dir( gamma_th.ax.yaxis.get_offset_text())
gamma_th.ax.yaxis.get_offset_text().set_size(20)
#exit()

gamma_exp.ax.yaxis.set_major_formatter(lin_formatter) 
plt.setp(gamma_th.img, color='b', linewidth=5.0,alpha=.7)
plt.setp(gamma_exp.img, color='r', linewidth=5.0,alpha=.7)
gamma_exp.ax.xaxis.set_label_coords(.65, -0.05)
plt.autoscale(axis='x',tight=True)
print 'gamma.img: ',gamma_exp.img
leg = plt.legend([gamma_exp.img,gamma_th.img],
开发者ID:meyerson,项目名称:BOUT_sims,代码行数:33,代码来源:quickmov.py

示例2: fit_lambda2

# 需要导入模块: from frame import Frame [as 别名]
# 或者: from frame.Frame import t [as 别名]
     #           pmin = popt
     # print pmin
     
     #print pmin
     # popt, pcov= fit_lambda2(nave[0:xstop],pos[0][0:xstop,5],
     #                         p0=[nave[np.int(nx/2.0)],est_lam,np.int(nx/2.0)])
     # #print 'min parameters: ',popt,res[0]
     # n_fit = popt[0]*np.exp(-pos[0][xstart:xstop,5]/popt[1])
     # n_fit = Frame(n_fit,meta={'dx':dx,'x0':pos[0][xstart,5],'stationary':True})

     frames= [frm_data1D,[frm_n_AC,a_contour],blobs_data1D,[frm_blob,dw_contour]]
     #frames= [frm_data1D,[frm_data,phi_contour],frm_log_data1D,frm_log_data]

     
      
     frm_n.t = 0
     # frm_Ak.t = 0
     # frm_Ak.reset()
     # frm_data.reset()
     # alpha_contour.reset()
     #FrameMovie([[frm_blob_AC,dw_contour]],fast=True,moviename=save_path+'/'+key+str(t2),fps = 10,encoder='ffmpeg')
     
     frm_n.t = 0
     frm_Ak.t = 0
     frm_Ak.reset()
     frm_n.reset()
     a_contour.reset()
     FrameMovie(frames,fast=True,moviename=save_path+'/'+key+str(t2),fps = 10,encoder='ffmpeg')
     #print time, n_fit.shape,popt,pcov,nave[0:40],popt
     
     frm_n.t = 0
开发者ID:meyerson,项目名称:BOUT_sims,代码行数:33,代码来源:makemovie2.py

示例3: PdfPages

# 需要导入模块: from frame import Frame [as 别名]
# 或者: from frame.Frame import t [as 别名]


import matplotlib.ticker as ticker
from matplotlib.ticker import FormatStrFormatter
lin_formatter = ticker.ScalarFormatter()
from pylab import legend
lin_formatter.set_powerlimits((1, 1))
#plt.autoscale(axis='x',tight=True)
#self.ax.axis('tight')

#let's create single frame
pp = PdfPages('gamma.pdf')
fg = plt.figure()
gamma.ax = None
gamma.t = nt-2
gamma_th.ax = None
gamma.render(fig,111)
gamma_th.render(fig,111)

gamma.ax.yaxis.set_major_formatter(lin_formatter) 
plt.setp(gamma_th.img, color='b', linewidth=3.0,alpha=.7)
plt.setp(gamma.img, color='r', linewidth=2.0,alpha=.7)
plt.autoscale(axis='x',tight=True)
print 'gamma.img: ',gamma.img
leg = plt.legend([gamma.img,gamma_th.img],('BOUT++', 'analytic'),
                 'best', shadow=False, fancybox=True)
leg.get_frame().set_alpha(0.6)
fig.savefig(pp,format='pdf')
plt.close(fig)
pp.close()
开发者ID:meyerson,项目名称:BOUT_sims,代码行数:32,代码来源:summary.py

示例4: gamma_theory

# 需要导入模块: from frame import Frame [as 别名]
# 或者: from frame.Frame import t [as 别名]
gamma_ave = np.mean(gamma_num[-80:-20,:,:],axis=0)

analytic_soln =  gamma_theory(ny,dky)
gamma_th = Frame(np.array(analytic_soln['gammamax'][1:ny/3]),
                 meta={'dx':dky,'x0':dky,'stationary':True,'yscale':'linear',
                       'title':r'$\gamma$','fontsz':20,
                       'ylabel':r'$\frac{\omega}{\omega_{ci}}$',
                       'xlabel':r'$k_y$','ticksize':14})


gamma_num = Frame(gamma_num[:,1:ny/3,0],meta={'dx':dky,'xlabel':r'$k_y$',
                          'title':r'$\gamma$',
                          'ylabel':r'$\frac{\omega}{\omega_{ci}}$',
                          'x0':dky,'shareax':False,'style':'ro', 
                                       'stationary':False,'ticksize':14,'fontsz':20})
gamma_num.t = nt -.7*nt
gamma_num.render(fig,223) 
gamma_th.render(fig,223)

print data.shape
namp = abs(data).max(1).max(1) 
namp =  Frame(namp,meta={'ticksize':14})
namp.render(fig,224)

fig.savefig(pp,format='pdf')
plt.close(fig)
pp.close()


pp = PdfPages('gamma.pdf')
fig = plt.figure()
开发者ID:foci,项目名称:ArcOn-r2,代码行数:33,代码来源:arcon_view2.py

示例5: PdfPages

# 需要导入模块: from frame import Frame [as 别名]
# 或者: from frame.Frame import t [as 别名]
#self.ax.axis('tight')

#let's create single frame
pp = PdfPages('lamda.pdf')
fig = plt.figure() 
lam_history = Frame(lam,meta={'stationary':False,'title':'','fontsz':18,'ylabel':'','xlabel':r'$t$','ticksize':14}) 
lam_history.render(fig,111)
fig.savefig(pp,format='pdf')
plt.close(fig)
pp.close()


pp = PdfPages('gamma.pdf')
fig = plt.figure()
gamma.ax = None
gamma.t = 1
gamma_th.ax = None
gamma.render(fig,111)
gamma_th.render(fig,111)

gamma.ax.yaxis.set_major_formatter(lin_formatter) 
plt.setp(gamma_th.img, color='b', linewidth=3.0,alpha=.7)
plt.setp(gamma.img, color='r', linewidth=2.0,alpha=.7)
plt.autoscale(axis='x',tight=True)
print 'gamma.img: ',gamma.img
leg = plt.legend([gamma.img,gamma_th.img],('BOUT++', 'analytic'),
                 'best', shadow=False, fancybox=True)
leg.get_frame().set_alpha(0.6)
fig.savefig(pp,format='pdf')
plt.close(fig)
pp.close()
开发者ID:meyerson,项目名称:BOUT_sims,代码行数:33,代码来源:lamda_pdf.py


注:本文中的frame.Frame.t方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。