• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python pylab.minorticks_on函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pylab.minorticks_on函数的典型用法代码示例。如果您正苦于以下问题:Python minorticks_on函数的具体用法?Python minorticks_on怎么用?Python minorticks_on使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: tracePlot

def tracePlot(outpath, base_name, order_num, raw, fit, mask):

    pl.figure("Trace Plot", figsize=(6, 5), facecolor='white')
    pl.title('trace, ' + base_name + ", order " + str(order_num), fontsize=14)
    pl.xlabel('column (pixels)')
    pl.ylabel('row (pixels)')
    
#     yrange = offraw.max() - offraw.min()
 
    x = np.arange(raw.shape[0])
    
    pl.plot(x[mask], raw[mask], "ko", mfc="none", ms=1.0, linewidth=1, label="derived")
    pl.plot(x, fit, "k-", mfc="none", ms=1.0, linewidth=1, label="fit")
        
    pl.plot(x[np.logical_not(mask)], raw[np.logical_not(mask)], 
        "ro", mfc="red", mec="red", ms=2.0, linewidth=2, label="ignored")

    
    rms = np.sqrt(np.mean(np.square(raw - fit)))
    pl.annotate('RMS residual = ' + "{:.3f}".format(rms), (0.3, 0.8), xycoords="figure fraction")
    
    pl.minorticks_on()
    pl.grid(True)
    pl.legend(loc='best', prop={'size': 8})

    fn = constructFileName(outpath, base_name, order_num, 'trace.png')
    pl.savefig(fn)
    pl.close()
    log_fn(fn)
    
    return
开发者ID:2ichard,项目名称:nirspec_drp,代码行数:31,代码来源:products.py


示例2: style_plot

def style_plot( convolved = True ):
    pl.xlim( x_min, x_max )
    pl.xlabel( x_str )
    pl.ylabel( y_str )
    pl.minorticks_on()
    if convolved:
        pl.xlim( x_min_conv, x_max_conv )
开发者ID:willjbowman,项目名称:research-code,代码行数:7,代码来源:convolve_paper_data_overlay_experiment.py


示例3: view

    def view(self, show=True):
        """ View generated beam """
        
        if self.generated_beam_data is None:
            raise RuntimeError("Beam pattern not generated yet. Run generate() first.")

        plt.figure(figsize=(8,4))
        plt.subplot(121)
        tmin, tmax = self.generated_beam_theta[0], self.generated_beam_theta[-1]
        pmin, pmax = self.generated_beam_phi[0], self.generated_beam_phi[-1]
        plt.imshow(10**(self.generated_beam_data / 10), extent=(tmin, tmax, pmin, pmax), aspect='auto')
        plt.xlabel("Theta [deg]")
        plt.ylabel("Phi [deg]")
        #plt.colorbar(orientation='horizontal')
        
        plt.subplot(122)
        beam_slice = self.generated_beam_data[self.generated_beam_data.shape[0]/2]
        print self.generated_beam_phi.shape, beam_slice.shape
        plt.plot(self.generated_beam_theta, beam_slice, c='#333333')
        plt.xlabel("Theta [deg]")
        plt.ylabel("Normalized gain [dB]")
        plt.xlim(-91, 91)
        plt.ylim(-30, 3)
        plt.minorticks_on()
        
        plt.tight_layout()
        if show:
            plt.show()
开发者ID:telegraphic,项目名称:21cmSense,代码行数:28,代码来源:lwa_antenna.py


示例4: view_thetaphi

 def view_thetaphi(self, show=True):
     """ View generated beam, in theta-phi coordinates """
     
     self._check_generated()
     
     plt.figure(figsize=(8,4))
     plt.subplot(121)
     tmin, tmax = self.generated_beam_theta[0], self.generated_beam_theta[-1]
     pmin, pmax = self.generated_beam_phi[0], self.generated_beam_phi[-1]
     plt.imshow(10**(self.generated_beam_data / 10), extent=(tmin, tmax, pmin, pmax), aspect='auto')
     plt.xlabel("Theta [deg]")
     plt.ylabel("Phi [deg]")
     #plt.colorbar(orientation='horizontal')
     
     plt.subplot(122)
     beam_slice = self.generated_beam_data[self.generated_beam_data.shape[0]/2]
     print self.generated_beam_phi.shape, beam_slice.shape
     plt.plot(self.generated_beam_theta, beam_slice, c='#333333')
     plt.xlabel("Theta [deg]")
     plt.ylabel("Normalized gain [dB]")
     plt.xlim(-91, 91)
     plt.ylim(-30, 3)
     plt.minorticks_on()
     
     plt.tight_layout()
     if show:
         plt.show()
开发者ID:telegraphic,项目名称:lwa_ant,代码行数:27,代码来源:lwa_antenna.py


示例5: plothistogram

def plothistogram():
#plotting the histograms
    py.figure(2,(6.,3.5))
    ax1 = py.subplot(2,1,1)
    py.plot(xgauss,num,'k',linewidth = 2,drawstyle = 'steps-pre')
    py.plot(xgauss,ygauss,'r--',linewidth = 2)
    py.setp(ax1.get_xticklabels(),visible = False)
    py.ylim(0,40)
    py.yticks([0.0,20,40])
    py.xlim(-1.5,1.5)
    py.ylabel('N')
    py.xlabel('R$_{VI}$')
    py.minorticks_on()

    ax2 = py.subplot(2,1,2)
    py.plot(xgauss,resid,'k',linewidth = 2,drawstyle = 'steps-pre')
    py.plot(xgauss,zeroline,'k--',linewidth = 1)
    py.yticks([-10,0,10,20])
    py.xlim(-2,2)
    py.xlabel('R$_{VI}$')
    py.ylabel('$\Delta$N')
    py.minorticks_on()

    py.subplots_adjust(hspace = 0)
    
    py.show()
开发者ID:marvqin,项目名称:globclust,代码行数:26,代码来源:binFrac.py


示例6: wavelengthScalePlot

def wavelengthScalePlot(out_dir, base_name, order):

    pl.figure('wavelength scale', facecolor='white')
    pl.cla()
    pl.title('wavelength scale, ' + base_name + ', order ' + str(order.orderNum), fontsize=14)

    pl.xlabel('column (pixels)')
    pl.ylabel('wavelength ($\AA$)')
    
    pl.minorticks_on()
    pl.grid(True)
    
    pl.xlim(0, 1023)
    
    pl.plot(order.gratingEqWaveScale, "k-", mfc='none', ms=3.0, linewidth=1, 
            label='grating equation')
    if order.waveScale is not None:
        pl.plot(order.waveScale, "b-", mfc='none', ms=3.0, linewidth=1, 
            label='sky lines')
        
    pl.legend(loc='best', prop={'size': 8})
    
    fn = constructFileName(out_dir, base_name, order.orderNum, 'wavelength_scale.png')
    pl.savefig(fn)
    pl.close()

    return
开发者ID:2ichard,项目名称:nirspec_drp,代码行数:27,代码来源:dgn.py


示例7: test_decomp

def test_decomp():
    nmax = 10.; kmax = 10.
    dx = 0.1*2.**(-nmax)

    x = np.arange(-10.,10.,dx)
    f = (2./np.pi)*np.arctan(0.5*x)

    nvals = np.arange(-nmax,nmax)
    kvals = np.arange(-kmax,kmax)
    Cnk = wavelet_decomp(x,f,nvals,kvals)
    
    fig, ax = plt.subplots()
    im = ax.matshow(Cnk,origin='lower',vmin=-1,vmax=1.5,extent=(-nmax,nmax,-kmax,kmax))
    ax.xaxis.set_ticks_position('bottom')
    plt.minorticks_on()
    ax.grid(b=True, which='major', color='k', linestyle='-')
    ax.grid(b=True, which='minor', color='Grey', linestyle='--',dashes=(2,5))
    ax.set_ylabel(r"$k$",fontsize=18)
    ax.set_xlabel(r"$n$",fontsize=18)
    plt.colorbar(im)
    plt.savefig('Cnk_matrix.pdf') 
    #plt.show()

    plt.clf()
    fr = wavelet_recov(Cnk,nvals,kvals,x)
    plt.plot(x,f,label='Original')
    plt.plot(x,fr,label='Recovered')
    plt.legend(loc='lower right')
    plt.savefig('recovered_function.pdf')
开发者ID:mpresley42,项目名称:KSZ_21cm_Constraints,代码行数:29,代码来源:wavelets.py


示例8: sp1_style

def sp1_style( ax ):
    wf.ax_limits( sp1_lims )
    pl.minorticks_on()
    wf.ax_labels( sp1_ax_labs )
    # wf.major_ticks( ax, sp1_maj_loc )
    # pl.legend( sp1_entries, loc=sp1_leg_loc ) # locate legend x,y from bottom left
    ax.yaxis.set_ticklabels([]) # y tick labels off
开发者ID:willjbowman,项目名称:research-code,代码行数:7,代码来源:valence-loss-eels.py


示例9: run_setup

def run_setup():
    mpl.rcParams.update(mpl.rcParamsDefault)
    mpl.rcParams['font.size'] = 26.
    mpl.rcParams['font.family'] = 'serif'
    #mpl.rcParams['font.family'] = 'serif'
    mpl.rcParams['font.serif'] = [  'Times New Roman',
                                    'Times','Palatino',
                                    'Charter', 'serif']
    mpl.rcParams['font.sans-serif'] = ['Helvetica']
    mpl.rcParams['axes.labelsize'] = 24
    mpl.rcParams['xtick.labelsize'] = 22.
    mpl.rcParams['ytick.labelsize'] = 22.
    mpl.rcParams['xtick.major.size']= 10.
    mpl.rcParams['xtick.minor.size']= 8.
    mpl.rcParams['ytick.major.size']= 10.
    mpl.rcParams['ytick.minor.size']= 8.
    
    mpl.rc('axes',**{'labelweight':'normal', 'linewidth':1})
    mpl.rc('axes',**{'labelweight':'normal', 'linewidth':1})
    mpl.rc('ytick',**{'major.pad':5, 'color':'k'})
    mpl.rc('xtick',**{'major.pad':5, 'color':'k'})
    
    #legend parameters too
    params = {'legend.fontsize': 24,
              'legend.numpoints':1,
              'legend.handletextpad':1
    }

    plt.rcParams.update(params)   
    plt.minorticks_on()
开发者ID:fedhere,项目名称:residuals_pylab,代码行数:30,代码来源:pylabsetup.py


示例10: sp1_style

def sp1_style( ax ):
    pl.xlim( sp1_x_lim )
    pl.ylim( sp1_y_lim )
    pl.minorticks_on()
    ax.xaxis.set_major_locator( mpl.ticker.MultipleLocator( sp1_maj_loc[0] ) )
    ax.yaxis.set_major_locator( mpl.ticker.MultipleLocator( sp1_maj_loc[1] ) )
    ax.xaxis.set_ticklabels( sp1_x_tick_labs ) # x tick labels
    mpl.rc( 'legend', numpoints=1, handletextpad=0.5, borderpad=1 )
开发者ID:willjbowman,项目名称:research-code,代码行数:8,代码来源:gpdc-gb-concentration.py


示例11: axes_format

def axes_format( subplot_number ):
    ax = pl.gca()
    ax.set_xlabel( x_axis_label )
    ax.set_ylabel( y_axis_label )
    ax.xaxis.major.formatter._useMathText = True
    ax.yaxis.major.formatter._useMathText = True
    majorLocator = mpl.ticker.MultipleLocator( major_locators[ subplot_number - 1 ] )
    ax.xaxis.set_major_locator( majorLocator )
    ax.yaxis.set_major_locator( majorLocator )
    pl.minorticks_on() # minor ticks on
开发者ID:willjbowman,项目名称:research-code,代码行数:10,代码来源:Nyquist-10Ca-small-for-fig-panel.py


示例12: plot_antenna_array

def plot_antenna_array(antpos):
    """ Plot an antenna array (2D X-Y positions). """
    antpos = np.array(antpos)

    plt.plot(antpos[:,0], antpos[:, 1], 'o', c='#333333')
    plt.xlabel('x-pos [m]')
    plt.ylabel('y-pos [m]')
    #plt.xlim(np.min(antpos[:, 0]) - 2, np.max(antpos[:, 0]) + 2)
    #plt.ylim(np.min(antpos[:, 1]) - 2, np.max(antpos[:, 1]) + 2)
    plt.minorticks_on()
    plt.savefig("figures/antenna-positions.pdf")
    plt.show()
开发者ID:telegraphic,项目名称:21cmSense,代码行数:12,代码来源:generate_array.py


示例13: format_axes

def format_axes( subplot_number ):
    ax = pl.gca()
    ax.set_xlabel( x0_lab )
    ax.set_ylabel( y0_lab )
    ax.xaxis.major.formatter._useMathText = True
    ax.yaxis.major.formatter._useMathText = True
    majorLocator = mpl.ticker.MultipleLocator( major_locators[ subplot_number ] )
    ax.xaxis.set_major_locator( majorLocator )
    ax.yaxis.set_major_locator( majorLocator )
    pl.minorticks_on() # minor ticks on
    pl.xlim( x_lims[ subplot_number ] ) #define chart limits
    pl.ylim( y_lims[ subplot_number ] )
开发者ID:willjbowman,项目名称:research-code,代码行数:12,代码来源:CCO-Nyquist.py


示例14: plot_multiple_1d

def plot_multiple_1d( data, col_0, col_n, color='', style='', shift='' ):
    columns = data.shape[1]
    x = data[ :, 0 ]
    
    if len( shift ) == 2 :
        shift_value = shift[ 0 ]
        shift_center = shift[ 1 ]
        x = x + ( shift_center - shift_value )
    
    for i in range( col_0, col_n ):
        pl.plot( x, data[ :, i ], color = color, marker = style )
        pl.minorticks_on()
    pl.show()
开发者ID:willjbowman,项目名称:research-code,代码行数:13,代码来源:wills_functions.py


示例15: make_plot

 def make_plot(self):
     '''Plot the mass detection limits.'''
     # Plot BTsettl curve
     plt.plot(self.projsep, self.Spiegmasslim, 'b-', lw=2,
              label='Spiegel & Burrows')
     plt.plot(self.projsep, self.BTmasslim, 'r-', lw=2,
              label=' BT-Settl')
     
     plt.xlabel('Projected Separation (AU)')
     plt.ylabel(' Planet Mass (M$_{\mathrm{Jup}})$')
     plt.minorticks_on()
     plt.legend(loc='upper right')
     plt.savefig('plots/'+self.title+'.png')
     plt.show()
开发者ID:r-cloutier,项目名称:con2mass,代码行数:14,代码来源:con2mass.py


示例16: plotSpline

	def plotSpline(self, x, y):
		"""
		Plot the spline interpolation of the given x and y values.

		"""
		# compute fit
		yFit = []
		for v in x:
			yFit.append(self.interpolate(v))

		# plot results
		plt.plot (x, y, 'bo', label='Original')
		plt.plot (x, yFit, 'r-', label='Spline fit')
		plt.minorticks_on()
		plt.legend()
		plt.xlabel('x')
		plt.ylabel('y')
		plt.show()
开发者ID:Hansschouten,项目名称:AeroVision,代码行数:18,代码来源:interpolation.py


示例17: plot_setticks

def plot_setticks(x=True, y=True):

    pl.minorticks_on()
    ax = pl.gca()
    if x:
        ax.xaxis.set_major_locator(pl.AutoLocator())
        x_major = ax.xaxis.get_majorticklocs()
        dx_minor = (x_major[-1] - x_major[0]) / (len(x_major) - 1) / 5.0
        ax.xaxis.set_minor_locator(pl.MultipleLocator(dx_minor))
    else:
        pl.minorticks_off()

    if y:
        ax.yaxis.set_major_locator(pl.AutoLocator())
        y_major = ax.yaxis.get_majorticklocs()
        dy_minor = (y_major[-1] - y_major[0]) / (len(y_major) - 1) / 5.0
        ax.yaxis.set_minor_locator(pl.MultipleLocator(dy_minor))
    else:
        pl.minorticks_off()
开发者ID:qsnake,项目名称:gpaw,代码行数:19,代码来源:tool.py


示例18: plot_toa_reflectance

    def plot_toa_reflectance(self, roi=[400], hold="off", show=True):

        xdata = scipy.linspace(0, self.num_bands, self.num_bands)

        for i in range(len(roi)):
            pylab.errorbar(
                self.bands[self.sensor_name], self.reflectance[roi[i], :], yerr=self.reflectance_std[roi[i], :]
            )
            # pylab.scatter(self.bands[self.sensor_name], self.reflectance[roi[i], :])
            pylab.minorticks_on()
            pylab.xlabel("Wavelength (nm)")
            pylab.ylabel("TOA Reflectance (sr^{-1})")
            pylab.ylim([0, 1])
            pylab.title(self.sensor_name)
            if hold == "off" and show:
                pylab.show()

        if show:
            pylab.show()
开发者ID:amdilo,项目名称:DIMITRI,代码行数:19,代码来源:read_dimitri_sav_files.py


示例19: timestructure_dataset

def timestructure_dataset(ds, calname="p_filt_value_dc"):
    pulse_timing.choose_laser_dataset(ds, "not_laser")
    cal = ds.calibration[calname]
    # energy = ds.p_energy[ds.cuts.good()]
    # cmap = plt.get_cmap()
    # cmap = [cmap(i/float(len(cal.elements))) for i in xrange(len(cal.elements))]

    for line_name in ["CoKAlpha", "FeKAlpha", "MnKAlpha"]:
        try:
            plt.figure()
            low,high = mass.energy_calibration.STANDARD_FEATURES[line_name]*np.array([0.995, 1.005])
            use = np.logical_and(np.logical_and(ds.cuts.good(), ds.p_energy>low), ds.p_energy<high)
            plt.plot(ds.p_timestamp[use], ds.p_energy[use],'.')
            plt.xlabel("frame timestamp (s)")
            plt.ylabel("p_energy")
            pfit = np.polyfit(ds.p_timestamp[use], ds.p_energy[use],1)
            plt.title("chan %d, %s, not_laser pulses selected\nslope= %0.2f eV/hr"%(ds.channum, line_name, pfit[0]*3600))
            plt.minorticks_on()
            plt.grid("on")
            plt.grid("on", which="minor")
        except:
            pass
开发者ID:ggggggggg,项目名称:exafs_analysis_2014,代码行数:22,代码来源:exafs.py


示例20: plot_toa_reflectance

    def plot_toa_reflectance(self, roi=[2000], hold='off', show=True):
        xdata = scipy.linspace(0, self.num_bands, self.num_bands)

        for i in range(len(roi)):
            #pylab.errorbar(self.bands[self.sensor_name], self.reflectance[roi[i], :],
            #              yerr=self.reflectance_std[roi[i], :])

            xdata = self.bands[self.sensor_name]

            for j in range(0, len(self.bands[self.sensor_name])):
                xdata[j] = str(xdata[j]).strip('abcdefghijklmnopqrstuvwxyz')

            pylab.plot(xdata, self.reflectance[roi[i], :], 'o')
            pylab.minorticks_on()
            pylab.xlabel('Wavelength (nm)')
            pylab.ylabel('TOA Reflectance (sr^{-1})')
            pylab.ylim([0, 1])
            pylab.title(self.sensor_name)
            if hold == 'off' and show:
                pylab.show()

        if show:
            pylab.show()
开发者ID:MBouvet,项目名称:DIMITRI,代码行数:23,代码来源:read_dimitri_raw_data_file.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python pylab.norm函数代码示例发布时间:2022-05-25
下一篇:
Python pylab.meshgrid函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap