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


Python pylab.minorticks_on函数代码示例

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


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


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