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

Python pylab.axes函数代码示例

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

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



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

示例1: _example_matplotlib_plot

def _example_matplotlib_plot():
    import pylab
    from pylab import arange, pi, sin, cos, sqrt

    # Generate data
    x = arange(-2 * pi, 2 * pi, 0.01)
    y1 = sin(x)
    y2 = cos(x)

    # Plot data
    pylab.ioff()
    # print 'Plotting data'
    pylab.figure(1)
    pylab.clf()
    # print 'Setting axes'
    pylab.axes([0.125, 0.2, 0.95 - 0.125, 0.95 - 0.2])
    # print 'Plotting'
    pylab.plot(x, y1, "g:", label="sin(x)")
    pylab.plot(x, y2, "-b", label="cos(x)")
    # print 'Labelling'
    pylab.xlabel("x (radians)")
    pylab.ylabel("y")
    pylab.legend()
    print "Saving to fig1.eps"
    pylab.savefig("fig1.eps")
    pylab.ion()
开发者ID:JohnReid,项目名称:biopsy,代码行数:26,代码来源:_matplotlib.py


示例2: newFigLayer

 def newFigLayer():
     pylab.clf()
     pylab.figure(figsize=(8, 8))
     pylab.axes([0.15, 0.15, 0.8, 0.81])
     pylab.axis([0.6, -0.4, -0.4, 0.6])
     pylab.xlabel(r"$\Delta$\textsf{RA from Sgr A* (arcsec)}")
     pylab.ylabel(r"$\Delta$\textsf{Dec. from Sgr A* (arcsec)}")
开发者ID:AtomyChan,项目名称:JLU-python-code,代码行数:7,代码来源:central_HD.py


示例3: create_pie_chart

    def create_pie_chart(self, snapshot, filename=''):
        """
        Create a pie chart that depicts the distribution of the allocated
        memory for a given `snapshot`. The chart is saved to `filename`.
        """
        try:
            from pylab import figure, title, pie, axes, savefig
            from pylab import sum as pylab_sum
        except ImportError:
            return self.nopylab_msg % ("pie_chart")

        # Don't bother illustrating a pie without pieces.
        if not snapshot.tracked_total:
            return ''

        classlist = []
        sizelist = []
        for k, v in list(snapshot.classes.items()):
            if v['pct'] > 3.0:
                classlist.append(k)
                sizelist.append(v['sum'])
        sizelist.insert(0, snapshot.asizeof_total - pylab_sum(sizelist))
        classlist.insert(0, 'Other')
        #sizelist = [x*0.01 for x in sizelist]

        title("Snapshot (%s) Memory Distribution" % (snapshot.desc))
        figure(figsize=(8, 8))
        axes([0.1, 0.1, 0.8, 0.8])
        pie(sizelist, labels=classlist)
        savefig(filename, dpi=50)

        return self.chart_tag % (self.relative_path(filename))
开发者ID:ppizarror,项目名称:Hero-of-Antair,代码行数:32,代码来源:classtracker_stats.py


示例4: plot

def plot(filename, column, label):
    data = py.loadtxt(filename).T
    X, Y = data[0], data[column]
    mask = (X >= xmin) * (X <= xmax)
    X, Y = X[mask], corrector(Y[mask])
    aY, bY = np.min(Y), np.max(Y)
    pad = 7 if aY < 0 and -bY/aY < 10 else 0
    py.ylabel(r'$' + label + r'$', y=y_coord, labelpad=8-pad, rotation=0)
    py.plot(X, Y, '-', lw=1)
    py.xlabel(r'$\zeta$', labelpad=-5)
    py.xlim(xmin, xmax)
    ax = py.axes()
    ax.axhline(lw=.5, c='k', ls=':')
    specify_tics(np.min(Y), np.max(Y))
    if inside:
        print "Plot inside plot"
        ax = py.axes([.25, .45, .4, .4])
        mask = X <= float(sys.argv[7])
        py.plot(X[mask], Y[mask], '-', lw=1)
        ax.tick_params(axis='both', which='major', labelsize=8)
        ax.axhline(lw=.5, c='k', ls=':')
        ax.xaxis.set_major_locator(MultipleLocator(0.5))
        ax.yaxis.set_major_locator(LinearLocator(3))
        ymin, _, ymax = ax.get_yticks()
        if (ymax + ymin) < (ymax-ymin)/5:
            y = max(ymax, -ymin)
            py.ylim(-y, y)
开发者ID:olegrog,项目名称:latex,代码行数:27,代码来源:plot.py


示例5: test_varying_inclination

    def test_varying_inclination(self):
        #""" Test that the waveform is consistent for changes in inclination
        #"""
        sigmas = []
        incs = numpy.arange(0, 21, 1.0) * lal.PI / 10.0

        for inc in incs:
            # WARNING: This does not properly handle the case of SpinTaylor*
            # where the spin orientation is not relative to the inclination
            hp, hc = get_waveform(self.p, inclination=inc)
            s = sigma(hp, low_frequency_cutoff=self.p.f_lower)        
            sigmas.append(s)
         
        f = pylab.figure()
        pylab.axes([.1, .2, 0.8, 0.70])   
        pylab.plot(incs, sigmas)
        pylab.title("Vary %s inclination, $\\tilde{h}$+" % self.p.approximant)
        pylab.xlabel("Inclination (radians)")
        pylab.ylabel("sigma (flat PSD)")
        
        info = self.version_txt
        pylab.figtext(0.05, 0.05, info)
        
        if self.save_plots:
            pname = self.plot_dir + "/%s-vary-inclination.png" % self.p.approximant
            pylab.savefig(pname)

        if self.show_plots:
            pylab.show()
        else:
            pylab.close(f)

        self.assertAlmostEqual(sigmas[-1], sigmas[0], places=7)
        self.assertAlmostEqual(max(sigmas), sigmas[0], places=7)
        self.assertTrue(sigmas[0] > sigmas[5])
开发者ID:bema-ligo,项目名称:pycbc,代码行数:35,代码来源:test_lalsim.py


示例6: __init__

    def __init__(self, cut_coords, axes=None, black_bg=False):
        """ Create 3 linked axes for plotting orthogonal cuts.

            Parameters
            ----------
            cut_coords: 3 tuple of ints
                The cut position, in world space.
            axes: matplotlib axes object, optional
                The axes that will be subdivided in 3.
            black_bg: boolean, optional
                If True, the background of the figure will be put to
                black. If you whish to save figures with a black background, 
                you will need to pass "facecolor='k', edgecolor='k'" to 
                pylab's savefig.

        """
        self._cut_coords = cut_coords
        if axes is None:
            axes = pl.axes((0., 0., 1., 1.))
            axes.axis('off')
        self.frame_axes = axes
        axes.set_zorder(1)
        bb = axes.get_position()
        self.rect = (bb.x0, bb.y0, bb.x1, bb.y1)
        self._object_bounds = dict()
        self._black_bg = black_bg

        # Create our axes:
        self.axes = dict()
        for index, name in enumerate(('x', 'y', 'z')):
            ax = pl.axes([0.3*index, 0, .3, 1])
            ax.axis('off')
            self.axes[name] = ax
            ax.set_axes_locator(self._locator)
            self._object_bounds[ax] = list()
开发者ID:bergtholdt,项目名称:nipy,代码行数:35,代码来源:ortho_slicer.py


示例7: plotwithstats

def plotwithstats(t, s):

    from matplotlib.ticker import NullFormatter

    nullfmt = NullFormatter()
    figure()
    ax2 = axes([0.125 + 0.5, 0.1, 0.2, 0.8])

    ax1 = axes([0.125, 0.1, 0.5, 0.8])

    ax1.plot(t, s)
    ax1.set_xticks(ax1.get_xticks()[:-1])

    meanv = s.mean()
    mi = s.min()
    mx = s.max()
    sd = s.std()

    ax2.bar(-0.5, mx - mi, 1, mi, lw=2, color='#f0f0f0')
    ax2.bar(-0.5, sd * 2, 1, meanv - sd, lw=2, color='#c0c0c0')
    ax2.bar(-0.5, 0.2, 1, meanv - 0.1, lw=2, color='#b0b0b0')
    ax2.axis([-1, 1, ax1.axis()[2], ax1.axis()[3]])

    ax2.yaxis.set_major_formatter(nullfmt)
    ax2.set_xticks([])

    return ax1, ax2
开发者ID:Luisa-Gomes,项目名称:Codigo_EMG,代码行数:27,代码来源:figtools.py


示例8: plot_all

 def plot_all():
     pylab.axes()
     x = [x0, x1, x2, x3, x4, x5, x6, x7, x8]
     y = [y0, y1, y2, y3, y4, y5, y6, y7, y8]
     plt.title('Retroreflective Sphere')
     plt.plot(x, y)
     plt.xlim(-0.1, 0.1)
     plt.ylim(-0.13, 0.1)
     plt.xlabel(u"[m]")
     plt.ylabel(u"[m]")
     point_num = 0
     for i, j in izip(x, y):
         if withCoords:
             plt.annotate("M%s\n" % point_num + "[%2.3e," % i + "%2.3e]" % j, xy=(i, j))
         point_num += 1
     if withArrows:
         for i in xrange(len(x) - 1):
             plt.arrow(x[i],
                       y[i],
                       x[i + 1] - x[i],
                       y[i + 1] - y[i],
                       head_width=0.005,
                       head_length=0.004,
                       fc="k",
                       ec="k",
                       width=0.00003)
开发者ID:yavalvas,项目名称:yav_com,代码行数:26,代码来源:views.py


示例9: animate

def animate(self,e,draw_bottoms=True, draw_circles=False, draw_circle_events=True):
	global i
	global past_circle_events

	filename = 'tmp-{0:03}.png'.format(i)
	#print 'animate', e, type(e), isinstance(e,voronoi.SiteEvent), isinstance(e,voronoi.CircleEvent)
	plt.clf()
	fig = plt.gcf()
	# plt.axis([0,width, 0, height])
	if self.bounding_box is not None:
		plt.axis(self.bounding_box)
	#plt.axis([-5,25, -5, 25])

	_draw_beachline(e, self.T)
	_draw_hedges(e, self.edges)
	if draw_circle_events:
		_draw_circle_events(e, self.Q, past_circle_events, draw_bottoms, draw_circles, fig)

	plot_directrix(e.y)
	plot_points(self.input)
	if e.is_site:
		plot_points([e.site], color='black')
	
	plt.grid(True)
	axes().set_aspect('equal', 'datalim')
	fig.savefig(filename, bbox_inches='tight')
	print filename, 'beachline', self.T, 'Input:', self.input
	i+=1
开发者ID:felipeblassioli,项目名称:voronoi,代码行数:28,代码来源:anim.py


示例10: plot_mesh

def plot_mesh(pts, tri, *args):
    if len(args) > 0:
        tripcolor(pts[:,0], pts[:,1], tri, args[0], edgecolor='black', cmap="Blues")
    else:
        triplot(pts[:,0], pts[:,1], tri, "k-", lw=2)
    axis('tight')
    axes().set_aspect('equal')
开发者ID:ckhroulev,项目名称:py_distmesh2d,代码行数:7,代码来源:examples.py


示例11: plot_nodes

def plot_nodes(pts, mask, *args):
    boundary = pts[mask == True]
    interior = pts[mask == False]
    plot(boundary[:,0], boundary[:,1], 'o', color="red")
    plot(interior[:,0], interior[:,1], 'o', color="white")
    axis('tight')
    axes().set_aspect('equal')
开发者ID:ckhroulev,项目名称:py_distmesh2d,代码行数:7,代码来源:examples.py


示例12: plot_matplot_lib

def plot_matplot_lib(df, show=False):

    header = list(df.columns.values)

    fig = plt.figure(figsize=(df.shape[1] * 2 + 2, 12))  
    xs, ys = generateDotPlot(np.asarray(df), space=0.15, width=5)

    x = [[i*2, h] for i, h in enumerate(header)]

    plt.scatter(x=xs, y=ys, facecolors='black',marker='o', s=15)


    plt.axes().set_aspect('equal')
    plt.axes().set_autoscale_on(False)
    plt.axes().set_ybound(0,6)
    plt.axes().set_xbound(-0.9, len(header) * 2 + 0.9)
    
    plt.xticks(zip(*x)[0], zip(*x)[1] )
    plt.yticks(range(1,6))
    
    for tick in plt.axes().get_xaxis().get_major_ticks():
        tick.set_pad(15)
        tick.label1 = tick._get_text1()
        
    for tick in plt.axes().get_yaxis().get_major_ticks():
        tick.set_pad(15)
        tick.label1 = tick._get_text1()
        
    plt.setp(plt.xticks()[1], rotation=20)

    if show:
        plt.show()

    return fig
开发者ID:groakat,项目名称:dot_plot,代码行数:34,代码来源:dotPlot.py


示例13: add_colorbar

  def add_colorbar(handle,**args):
    ax=pl.gca()
    Data,err = opt.get_plconf(plconf,'AXES')
    cbpos    = Data['cbpos'][ifig]
    cbbgpos  = Data['cbbgpos'][ifig]
    cbbgc    = Data['cbbgcolor'][ifig]
    cbbga    = Data['cbbgalpha'][ifig]
    cblab    = Data['cblabel'][ifig]

    # colorbar bg axes:
    if cbbgpos:
      rec=pl.axes((cbpos[0]-cbpos[2]*cbbgpos[0],cbpos[1]-cbbgpos[2]*cbpos[3],
                      cbpos[2]*(1+cbbgpos[0]+cbbgpos[1]),cbpos[3]*(1+cbbgpos[2]+cbbgpos[3])),
                      axisbg=cbbgc,frameon=1)

      rec.patch.set_alpha(cbbga)
      rec.set_xticks([])
      rec.set_yticks([])
      for k in rec.axes.spines.keys():
        rec.axes.spines[k].set_color(cbbgc)
        rec.axes.spines[k].set_alpha(cbbga)


    # colorbar:
    if cbpos:
      cbax=fig.add_axes(cbpos)
      if cbpos[2]>cbpos[3]: orient='horizontal'
      else: orient='vertical'
      cb=pl.colorbar(handle,cax=cbax,orientation=orient,drawedges=0,**args)
      pl.axes(ax)

      # colorbar label:
      cb.set_label(r'Wind Speed [m s$^{\rm{-1}}$]')
开发者ID:martalmeida,项目名称:OOFe,代码行数:33,代码来源:op_plot.py


示例14: set_font

def set_font(font):
    pl.xlabel('String length', fontproperties=font)
    pl.tight_layout()
    for label in pl.axes().get_xticklabels():
        label.set_fontproperties(font)
    for label in pl.axes().get_yticklabels():
        label.set_fontproperties(font)
开发者ID:avlonger,项目名称:my-experiments,代码行数:7,代码来源:graph_time.py


示例15: plot_pincrdr_probs

def plot_pincrdr_probs( f = None ):
    hist, bins = np.histogram( p_inc_rdr,
                               bins = yaml_config['rdr_histbins']['bins'],
                               range = (yaml_config['rdr_histbins']['min'],
                                        yaml_config['rdr_histbins']['max']) )
    bin_width = bins[1] - bins[0]
    # Find out which bin each read belongs to.
    # Sanity check: print [ sum( bins_ind == i ) for i in xrange(len(hist)) ] => equals hist
    bins_ind = np.sum( p_inc_rdr[:,np.newaxis] > bins[:-1], axis = 1 ) - 1
    prob_read = [ sum(rssi[bins_ind == i] != -1)*1.0 / hist[i] # positive reads / total reads for bin i
                  for i in xrange(len(hist)) # same as len(bins)-1
                  if hist[i] != 0 ] # only where we have data!  (also prevents div by 0)

    if not f:
        f = pl.figure( figsize=(10,6) )
    pl.axes([0.1,0.1,0.65,0.8])
    pos_bars = pl.bar([ bins[i] for i in xrange(len(hist)) if hist[i] != 0 ], # Only plot the bars for places we have data!
                      prob_read,  # This is only defined for ones that have data!
                      width = bin_width,
                      color = 'b',
                      alpha = 0.7 )
    pl.hold( True )
    neg_bars = pl.bar([ bins[i] for i in xrange(len(hist)) if hist[i] != 0 ], # Only plot the bars for places we have data!
                      [ 1.0 - p for p in prob_read ],  # This is only defined for ones that have data!
                      width = bin_width,
                      bottom = prob_read,
                      color = 'r',
                      alpha = 0.7 )
    pl.axis([ yaml_config['rdr_axis'][0], yaml_config['rdr_axis'][1], 0.0, 1.0 ])
    pl.xlabel( '$P^{inc}_{rdr}$ (dBm)')
    pl.ylabel( 'Probability of Tag Read / No-Read')
    pl.title( 'Probability of Tag Read / No-Read vs Predicted Power at Reader ' )
    pl.legend((pos_bars[0], neg_bars[0]), ('P( read )', 'P( no read )'), loc=(1.03,0.2))

    return f
开发者ID:gt-ros-pkg,项目名称:hrl,代码行数:35,代码来源:process_friis_plots.py


示例16: ConfigCAngles

def ConfigCAngles():
    pylab.figure(figsize=(3.5, 3.5))
    pylab.axes((0.0, 0.0, 1.0, 1.0))
    geo = ps.LoadGeo()

    phi_i0 = geo.phi_i0
    phi_is = geo.phi_is
    phi_ie = geo.phi_ie

    phi_o0 = geo.phi_o0
    phi_os = geo.phi_os
    phi_oe = geo.phi_oe

    phi1 = np.linspace(phi_is, phi_ie, 1000)
    phi2 = np.linspace(phi_i0, phi_is, 1000)
    phi3 = np.linspace(phi_os, phi_oe, 1000)
    phi4 = np.linspace(phi_o0, phi_os, 1000)
    (xi1, yi1) = ps.coords_inv(phi1, geo, 0, "fi")
    (xi2, yi2) = ps.coords_inv(phi2, geo, 0, "fi")
    (xo1, yo1) = ps.coords_inv(phi3, geo, 0, "fo")
    (xo2, yo2) = ps.coords_inv(phi4, geo, 0, "fo")

    #### Inner and outer involutes
    pylab.plot(xi1, yi1, "k", lw=1)
    pylab.plot(xi2, yi2, "k:", lw=1)
    pylab.plot(xo1, yo1, "k", lw=1)
    pylab.plot(xo2, yo2, "k:", lw=1)

    ### Innver involute labels
    pylab.plot(xi2[0], yi2[0], "k.", markersize=5, mew=2)
    pylab.text(xi2[0], yi2[0] + 0.0025, "$\phi_{i0}$", size=8, ha="right", va="bottom")
    pylab.plot(xi1[0], yi1[0], "k.", markersize=5, mew=2)
    pylab.text(xi1[0] + 0.002, yi1[0], "$\phi_{is}$", size=8)
    pylab.plot(xi1[-1], yi1[-1], "k.", markersize=5, mew=2)
    pylab.text(xi1[-1] - 0.002, yi1[-1], "   $\phi_{ie}$", size=8, ha="right", va="center")

    ### Outer involute labels
    pylab.plot(xo2[0], yo2[0], "k.", markersize=5, mew=2)
    pylab.text(xo2[0] + 0.002, yo2[0], "$\phi_{o0}$", size=8, ha="left", va="top")
    pylab.plot(xo1[0], yo1[0], "k.", markersize=5, mew=2)
    pylab.text(xo1[0] + 0.002, yo1[0], "$\phi_{os}$", size=8)
    pylab.plot(xo1[-1], yo1[-1], "k.", markersize=5, mew=2)
    pylab.text(xo1[-1] - 0.002, yo1[-1], "   $\phi_{oe}$", size=8, ha="right", va="center")

    ### Base circle
    t = np.linspace(0, 2 * pi, 100)
    pylab.plot(geo.rb * np.cos(t), geo.rb * np.sin(t), "b-")
    pylab.plot(np.r_[0, geo.rb * np.cos(9 * pi / 8)], np.r_[0, geo.rb * np.sin(9 * pi / 8)], "k-")
    pylab.text(
        geo.rb * np.cos(9 * pi / 8) + 0.0005, geo.rb * np.sin(9 * pi / 8) + 0.001, "$r_b$", size=8, ha="right", va="top"
    )

    pylab.axis("equal")
    pylab.setp(pylab.gca(), "ylim", (min(yo1) - 0.005, max(yo1) + 0.005))
    pylab.axis("off")

    pylab.savefig("FixedScrollAngles.png", dpi=600)
    pylab.savefig("FixedScrollAngles.eps")
    pylab.savefig("FixedScrollAngles.pdf")
    pylab.close()
开发者ID:bo3mrh,项目名称:Test,代码行数:60,代码来源:paperIII.py


示例17: plotTiming

def plotTiming(vortex_prob, vortex_times, times, map, grid_spacing, tornado_track, title, file_name, obs=None, centers=None, min_prob=0.1):
    nx, ny = vortex_prob.shape
    gs_x, gs_y = grid_spacing

    xs, ys = np.meshgrid(gs_x * np.arange(nx), gs_y * np.arange(ny))

    time_color_map = matplotlib.cm.Accent
    time_color_map.set_under('#ffffff')

    vortex_times = np.where(vortex_prob >= min_prob, vortex_times, -1)

    track_xs, track_ys = map(*reversed(tornado_track))

    pylab.figure(figsize=(10, 8))
    pylab.axes((0.025, 0.025, 0.95, 0.925))

    pylab.pcolormesh(xs, ys, vortex_times, cmap=time_color_map, vmin=times.min(), vmax=times.max())

    tick_labels = [ (datetime(2009, 6, 5, 18, 0, 0) + timedelta(seconds=int(t))).strftime("%H%M") for t in times ]
    bar = pylab.colorbar()#orientation='horizontal', aspect=40)
    bar.locator = FixedLocator(times)
    bar.formatter = FixedFormatter(tick_labels)
    bar.update_ticks()

    pylab.plot(track_xs, track_ys, 'mv-', lw=2.5, mfc='k', ms=8)

    drawPolitical(map, scale_len=(xs[-1, -1] - xs[0, 0]) / 10.)

    pylab.title(title)
    pylab.savefig(file_name)
    pylab.close()
开发者ID:tsupinie,项目名称:research,代码行数:31,代码来源:plot_probability_swaths.py


示例18: plotSurface

def plotSurface(pt, td, winds, map, stride, title, file_name):
    pylab.figure()
    pylab.axes((0.05, 0.025, 0.9, 0.9))

    u, v = winds

    nx, ny = pt.shape
    gs_x, gs_y = goshen_3km_gs
    xs, ys = np.meshgrid(gs_x * np.arange(nx), gs_y * np.arange(ny))   

    data_thin = tuple([ slice(None, None, stride) ] * 2)

    td_cmap = matplotlib.cm.get_cmap('Greens')
    td_cmap.set_under('#ffffff')
    pylab.contourf(xs, ys, td, levels=np.arange(40, 80, 5), cmap=td_cmap)
    pylab.colorbar()
    CS = pylab.contour(xs, ys, pt, colors='r', linestyles='-', linewidths=1.5, levels=np.arange(288, 324, 4))
    pylab.clabel(CS, inline_spacing=0, fmt="%d K", fontsize='x-small')
    pylab.quiver(xs[data_thin], ys[data_thin], u[data_thin], v[data_thin])

    drawPolitical(map, scale_len=75)

    pylab.suptitle(title)
    pylab.savefig(file_name)
    pylab.close()
    return
开发者ID:tsupinie,项目名称:research,代码行数:26,代码来源:plot_surface.py


示例19: make_lexicon_pie

def make_lexicon_pie(input_dict, title):
    e = 0
    f = 0
    n = 0
    l = 0
    g = 0
    o = 0

    for word in input_dict.keys():
        label = input_dict[word]
        if label == "English":
            e += 1
        elif label == "French":
            f += 1
        elif label == "Norse":
            n += 1
        elif label == "Latin":
            l += 1
        elif label == "Greek":
            g += 1
        else:
            o += 1

    total = e + f + n + l + g + o
    fracs = [o/total, n/total, g/total, l/total, f/total, e/total]
    labels = 'Other', 'Norse', 'Greek', 'Latin', 'French', 'English'
    pl.figure(figsize=(6, 6))
    pl.axes([0.1, 0.1, 0.8, 0.8])
    pl.pie(fracs, labels=labels, autopct='%1.1f%%', shadow=True, startangle=90)
    pl.title(title)
    pl.show()
开发者ID:Trevortds,项目名称:Etymachine,代码行数:31,代码来源:Etymachine.py


示例20: __init__

    def __init__(self, cut_coords, axes=None):
        """ Create 3 linked axes for plotting orthogonal cuts.

            Parameters
            ----------
            cut_coords: 3 tuple of ints
                The cut position, in world space.
            axes: matplotlib axes object, optional
                The axes that will be subdivided in 3.
        """
        self._cut_coords = cut_coords
        if axes is None:
            axes = pl.axes((0., 0., 1., 1.))
            axes.axis('off')
        self.frame_axes = axes
        axes.set_zorder(1)
        bb = axes.get_position()
        self.rect = (bb.x0, bb.y0, bb.x1, bb.y1)
        self._object_bounds = dict()

        # Create our axes:
        self.axes = dict()
        for index, name in enumerate(('x', 'y', 'z')):
            ax = pl.axes([0.3*index, 0, .3, 1])
            ax.axis('off')
            self.axes[name] = ax
            ax.set_axes_locator(self._locator)
            self._object_bounds[ax] = list()
开发者ID:Garyfallidis,项目名称:nipy,代码行数:28,代码来源:ortho_slicer.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python pylab.axhline函数代码示例发布时间:2022-05-25
下一篇:
Python pylab.average函数代码示例发布时间: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