python类text()的实例源码

image_handling.py 文件源码 项目:yt 作者: yt-project 项目源码 文件源码 阅读 34 收藏 0 点赞 0 评论 0
def plot_rgb(image, name, label=None, label_color='w', label_size='large'):
    """
    This will plot the r,g,b channels of an *image* of shape (N,M,3) or
    (N,M,4).  *name* is the prefix of the file name, which will be supplemented
    with "_rgb.png."  *label*, *label_color* and *label_size* may also be
    specified.
    """
    import pylab
    Nvec = image.shape[0]
    image[np.isnan(image)] = 0.0
    if image.shape[2] >= 4:
        image = image[:,:,:3]
    pylab.clf()
    pylab.gcf().set_dpi(100)
    pylab.gcf().set_size_inches((Nvec/100.0, Nvec/100.0))
    pylab.gcf().subplots_adjust(left=0.0, right=1.0, bottom=0.0, top=1.0, wspace=0.0, hspace=0.0)
    pylab.imshow(image, interpolation='nearest')
    if label is not None:
        pylab.text(20, 20, label, color = label_color, size=label_size) 
    pylab.savefig("%s_rgb.png" % name)
    pylab.clf()
docompare.py 文件源码 项目:office-interoperability-tools 作者: milossramek 项目源码 文件源码 阅读 38 收藏 0 点赞 0 评论 0
def disp(iimg, label = "", gray=False):
    """ Display an image using pylab
    """
    try:
        import pylab
        dimage = iimg.copy()
        if iimg.ndim==3:
            dimage[...,0] = iimg[...,2]
            dimage[...,2] = iimg[...,0]

        pylab.imshow(dimage, interpolation='none')
        if gray: pylab.gray()
        #pylab.gca().format_coord = format_coord
        pylab.text(1500, -30, label)
        pylab.axis('off')
        pylab.show()
    except ImportError:
        print "Module pylab not available"
recognition.py 文件源码 项目:Captcha-recognition-TF 作者: dukn 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def view_(_pred,_lable):

    fname = ['Captcha/lv3/%i.jpg' %i for i in range(20)]
    img = []
    for fn in fname:
        img.append(Image.open(open(fn)))
        #img.append(misc.imread(fn).astype(np.float))
    for i in range(len(img)):
        pylab.subplot(4,5,i+1); pylab.axis('off')

        pylab.imshow(img[i])
        #pylab.imshow( np.dot(np.array(img[i])[...,:3],[0.299,0.587,0.114]) , cmap=plt.get_cmap("gray"))
        #pylab.text(40,60,_pred[i],color = 'b')
        if ( _pred[i] == _lable[i] ):
            pylab.text(40,65,_pred[i],color = 'b',size = 15)
        else:
            pylab.text(40,65,_pred[i],color = 'r',size = 15)

        pylab.text(40,92,_lable[i],color = 'g',size = 15)

    pylab.show()
7 code plus.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
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')
7 code plus.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
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()
7 code.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
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')
7 code.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
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()
6 code.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def show_complex(self):
        font = {'family': 'serif',
                'color':  'k',
                'weight': 'normal',
                'size': 16,
        }
        pl.title('The Trajectory of Tageted Baseball\n with air flow in adiabatic model', fontdict = font)
        pl.plot(self.x, self.y, label = '$v_0 = %.5f m/s$'%self.v0 + ', ' + '$\\theta = %.4f \degree$'%self.theta)
        pl.xlabel('x $m$')
        pl.ylabel('y $m$')
        pl.xlim(0, 300)
        pl.ylim(-100, 20)
        pl.grid()
        pl.legend(loc = 'upper right', shadow = True, fontsize = 'small')
        pl.text(15, -90, 'scan to approach the minimum velocity and corresponding launching angle', fontdict = font)
        pl.show()
5 code 1.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 34 收藏 0 点赞 0 评论 0
def show_results(self):
        font = {'family': 'serif',
                'color':  'k',
                'weight': 'normal',
                'size': 14,
        }
        pl.plot(self.x, self.y, 'c', label='firing angle = 45°')
        pl.title('The Trajectory of a Cannon Shell', fontdict = font)
        pl.xlabel('x (k$m$)')
        pl.ylabel('y ($km$)')
        pl.xlim(0, 60)
        pl.ylim(0, 20)
        pl.grid(True)
        pl.legend(loc='upper right', shadow=True, fontsize='large')
        pl.text(41, 16, 'Only with air drag', fontdict = font)
        pl.show()
5 code 2.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def show_results(self):
        font = {'family': 'serif',
                'color':  'k',
                'weight': 'normal',
                'size': 12,
        }
        pl.plot(self.x, self.y, 'c', label='firing angle = 45°')
        pl.title('The Trajectory of a Cannon Shell', fontdict = font)
        pl.xlabel('x (k$m$)')
        pl.ylabel('y ($km$)')
        pl.xlim(0, 60)
        pl.ylim(0, 20)
        pl.grid(True)
        pl.legend(loc='upper right', shadow=True, fontsize='large')
        pl.text(34, 16, '       With both air drag and \n reduced air density-isothermal', fontdict = font)
        pl.show()
5 code 4.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 35 收藏 0 点赞 0 评论 0
def show_results(self):
        font = {'family': 'serif',
                'color':  'k',
                'weight': 'normal',
                'size': 12,
        }
        pl.plot(self.x, self.y, 'c', label='firing angle = 45°')
        pl.title('The Trajectory of a Cannon Shell', fontdict = font)
        pl.xlabel('x (k$m$)')
        pl.ylabel('y ($km$)')
        pl.xlim(0, 60)
        pl.ylim(0, 20)
        pl.grid(True)
        pl.legend(loc='upper right', shadow=True, fontsize='large')
        pl.text(34.5, 16, '      With air drag and the \n dependence of g on altitude', fontdict = font)
        pl.show()
5 code 3.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def show_results(self):
        font = {'family': 'serif',
                'color':  'k',
                'weight': 'normal',
                'size': 12,
        }
        pl.plot(self.x, self.y, 'c', label='firing angle = 45°')
        pl.title('The Trajectory of a Cannon Shell', fontdict = font)
        pl.xlabel('x (k$m$)')
        pl.ylabel('y ($km$)')
        pl.xlim(0, 60)
        pl.ylim(0, 20)
        pl.grid(True)
        pl.legend(loc='upper right', shadow=True, fontsize='large')
        pl.text(34.5, 16, '       With both air drag and \n reduced air density-adiabatic', fontdict = font)
        pl.show()
plotting.py 文件源码 项目:ugali 作者: DarkEnergySurvey 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def drawSmoothCatalog(self, catalog, label=None, **kwargs):
        ax = plt.gca()
        ra,dec = catalog.ra_dec
        x, y = sphere2image(self.ra,self.dec,ra,dec)

        delta_x = self.radius/100.
        smoothing = 2*delta_x
        bins = numpy.arange(-self.radius, self.radius + 1.e-10, delta_x)
        h, xbins, ybins = numpy.histogram2d(x, y, bins=[bins, bins])
        blur = nd.filters.gaussian_filter(h.T, smoothing / delta_x)

        defaults = dict(cmap='gray_r',rasterized=True)
        kwargs = dict(defaults.items()+kwargs.items())

        xx,yy = np.meshgrid(xbins,ybins)
        im = drawProjImage(xx,yy,blur,coord='C',**kwargs)

        if label:
            plt.text(0.05, 0.95, label, fontsize=10, ha='left', va='top', 
                     color='k', transform=pylab.gca().transAxes,
                     bbox=dict(facecolor='white', alpha=1., edgecolor='none'))
pyroc.py 文件源码 项目:bokeh_roc_slider 作者: brianray 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def plot_multiple_rocs_separate(rocList,title='', labels = None, equal_aspect = True):
    """ Plot multiples ROC curves as separate at the same painting area. """
    pylab.clf()
    pylab.title(title)
    for ix, r in enumerate(rocList):
        ax = pylab.subplot(4,4,ix+1)
        pylab.ylim((0,1))
        pylab.xlim((0,1))
        ax.set_yticklabels([])
        ax.set_xticklabels([])
        if equal_aspect:
            cax = pylab.gca()
            cax.set_aspect('equal')

        if not labels:
            labels = ['' for x in rocList]

        pylab.text(0.2,0.1,labels[ix],fontsize=8)
        pylab.plot([x[0] for x in r.derived_points],[y[1] for y in r.derived_points], 'r-',linewidth=2)

    pylab.show()
docompare.py 文件源码 项目:office-interoperability-tools 作者: milossramek 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def annotateImg(img, color, size, position, text):
    cv2.putText(img, text, position, cv2.FONT_HERSHEY_PLAIN, size, color, thickness = 2)
    return img
docompare.py 文件源码 项目:office-interoperability-tools 作者: milossramek 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def genside (img1, img2, height, width, name1, name2, txt1, txt2):
    """
    create a side-by-side view
    img1, img2: images
    name1, name2: their names 
    txt1, txt2: some text
    """
        if len(img1.shape)==2:
            cimg1 = np.zeros((img1.shape[0], img1.shape[1], 3), dtype=np.uint8)
            cimg1[...,0] = img1
            cimg1[...,1] = img1
            cimg1[...,2] = img1
        else:
            cimg1 = img1
        if len(img2.shape)==2:
            cimg2 = np.zeros((img2.shape[0], img2.shape[1], 3), dtype=np.uint8)
            cimg2[...,0] = img2
            cimg2[...,1] = img2
            cimg2[...,2] = img2
        else:
            cimg2 = img2

    if annotated:
        cimg1=annotateImg(cimg1, (0,0,255), 2, (100, 70), 'Source: '+name1)
        #cimg1=annotateImg(cimg1, (0,0,255), 2, (100, 130), txt1)
        cimg2=annotateImg(cimg2, (0,0,255), 2, (100, 70), 'Target: '+name2)
        #cimg2=annotateImg(cimg2, (0,0,255), 2, (100, 130), txt2)
        cimg = mergeSide(cimg1, cimg2)
    if annotated:
        cimg=annotateImg(cimg, (0,255,0), 2, (100, 130), txt1)
        return cimg
docompare.py 文件源码 项目:office-interoperability-tools 作者: milossramek 项目源码 文件源码 阅读 35 收藏 0 点赞 0 评论 0
def genoverlay(img1, title, name1, name2, stattxt, img2=None):
    """
    create an overlayed view
    img1, img2: images
    title: kind of title to print
    name1, name2: their names 
    txt: text to print below the title
    """

    if img2 is None:
        outimg = 255*(1-img1)
    else:
            s=np.maximum(img1.shape,img2.shape)
                outimg=np.zeros((s[0], s[1], 3), dtype=np.uint8)
                #outimg[:img1.shape[0], :img1.shape[1],0] = (255*(1-img1))
                #outimg[:img2.shape[0], :img2.shape[1],1] = (255*(1-img2))
                #outimg[:img2.shape[0], :img2.shape[1],2] = (255*(1-img2))
                outimg[:img1.shape[0], :img1.shape[1],0] = img1
                outimg[:img2.shape[0], :img2.shape[1],1] = img2
                outimg[:img2.shape[0], :img2.shape[1],2] = img2
                outimg = 255*(1-outimg)
    if annotated:
            outimg = annotateImg(outimg, (0, 0, 255), 2, (100, 50), title)
        txt = "cyan: %s %s"%(sourceid,name1)
            outimg = annotateImg(outimg, (0, 255, 255), 2, (100, 80), txt)
        txt = "red: %s %s"%(targetid,name2)
            outimg = annotateImg(outimg, (255, 0, 0), 2, (100, 110), txt)
        #outimg=annotateImg(outimg, 'blue', mm2px(4), mm2px(4), txt)
            outimg = annotateImg(outimg, (0, 0, 255), 1.3, (100, 140), stattxt)
    return outimg
megafacade.py 文件源码 项目:facade-segmentation 作者: jfemiani 项目源码 文件源码 阅读 41 收藏 0 点赞 0 评论 0
def plot(self, bgimage=None):
        import pylab as pl

        self._plot_background(bgimage)
        ax = pl.gca()
        y0, y1 = pl.ylim()
        # r is the width of the thick line we use to show the facade colors
        r = 5
        patch = pl.Rectangle((self.facade_left + r, self.sky_line + r),
                             self.width - 2 * r,
                             self.door_line - self.sky_line - 2 * r,
                             color=self.color, fill=False, lw=2 * r)
        ax.add_patch(patch)

        pl.text((self.facade_right + self.facade_left) / 2.,
                (self.door_line + self.sky_line) / 2.,
                '$\sigma^2={:0.2f}$'.format(self.uncertainty_for_windows()))

        patch = pl.Rectangle((self.facade_left + r, self.door_line + r),
                             self.width - 2 * r,
                             y0 - self.door_line - 2 * r,
                             color=self.mezzanine_color, fill=False, lw=2 * r)
        ax.add_patch(patch)

        # Plot the left and right edges in yellow
        pl.vlines([self.facade_left, self.facade_right], self.sky_line, y0, colors='yellow')

        # Plot the door line and the roof line
        pl.hlines([self.door_line, self.sky_line], self.facade_left, self.facade_right, linestyles='dashed',
                  colors='yellow')

        self.window_grid.plot()
megafacade.py 文件源码 项目:facade-segmentation 作者: jfemiani 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def plot_facade_cuts(self):

        facade_sig = self.facade_edge_scores.sum(0)
        facade_cuts = find_facade_cuts(facade_sig, dilation_amount=self.facade_merge_amount)
        mu = np.mean(facade_sig)
        sigma = np.std(facade_sig)

        w = self.rectified.shape[1]
        pad=10

        gs1 = pl.GridSpec(5, 5)
        gs1.update(wspace=0.5, hspace=0.0)  # set the spacing between axes.

        pl.subplot(gs1[:3, :])
        pl.imshow(self.rectified)
        pl.vlines(facade_cuts, *pl.ylim(), lw=2, color='black')
        pl.axis('off')
        pl.xlim(-pad, w+pad)

        pl.subplot(gs1[3:, :], sharex=pl.gca())
        pl.fill_between(np.arange(w), 0, facade_sig, lw=0, color='red')
        pl.fill_between(np.arange(w), 0, np.clip(facade_sig, 0, mu+sigma), color='blue')
        pl.plot(np.arange(w), facade_sig, color='blue')

        pl.vlines(facade_cuts, facade_sig[facade_cuts], pl.xlim()[1], lw=2, color='black')
        pl.scatter(facade_cuts, facade_sig[facade_cuts])

        pl.axis('off')

        pl.hlines(mu, 0, w, linestyle='dashed', color='black')
        pl.text(0, mu, '$\mu$ ', ha='right')

        pl.hlines(mu + sigma, 0, w, linestyle='dashed', color='gray',)
        pl.text(0, mu + sigma, '$\mu+\sigma$ ', ha='right')
        pl.xlim(-pad, w+pad)
image_handling.py 文件源码 项目:yt 作者: yt-project 项目源码 文件源码 阅读 61 收藏 0 点赞 0 评论 0
def plot_channel(image, name, cmap='gist_heat', log=True, dex=3, zero_factor=1.0e-10, 
                 label=None, label_color='w', label_size='large'):
    """
    This function will plot a single channel. *image* is an array shaped like
    (N,M), *name* is the pefix for the output filename.  *cmap* is the name of
    the colormap to apply, *log* is whether or not the channel should be
    logged.  Additionally, you may optionally specify the minimum-value cutoff
    for scaling as *dex*, which is taken with respect to the minimum value of
    the image.  *zero_factor* applies a minimum value to all zero-valued
    elements.  Optionally, *label*, *label_color* and *label_size* may be
    specified.
    """
    import matplotlib
    import pylab
    Nvec = image.shape[0]
    image[np.isnan(image)] = 0.0
    ma = image[image>0.0].max()
    image[image==0.0] = ma*zero_factor
    if log:
        mynorm = matplotlib.colors.LogNorm(ma/(10.**dex), ma)

    pylab.clf()
    pylab.gcf().set_dpi(100)
    pylab.gcf().set_size_inches((Nvec/100.0, Nvec/100.0))
    pylab.gcf().subplots_adjust(left=0.0, right=1.0, bottom=0.0, top=1.0, wspace=0.0, hspace=0.0)
    mycm = pylab.cm.get_cmap(cmap)
    if log:
        pylab.imshow(image,cmap=mycm, norm=mynorm, interpolation='nearest')
    else:
        pylab.imshow(image,cmap=mycm, interpolation='nearest')
    if label is not None:
        pylab.text(20, 20,label, color = label_color, size=label_size) 
    pylab.savefig("%s_%s.png" % (name,cmap))
    pylab.clf()
utility.py 文件源码 项目:BRATS 作者: ahmedhussein622 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def show_image(img, strg = ""):
    plt.imshow(img, cmap = "Greys_r")
    plt.text(0, 0, strg, color = "r")
    plt.show()
5(improved) code.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def show_results_prepare(self):
        font = {'family': 'serif',
                'color':  'k',
                'weight': 'normal',
                'size': 13,
        }
        pl.figure(1)
        pl.title('The Trajectory of Cannon Shells', fontdict = font)
        pl.xlabel('x / $km$')
        pl.ylabel('y / $km$')
        pl.xlim(0, 60)
        pl.ylim(0, 20)
        pl.grid(True)
        pl.text(2, 16.5, 'With air drag, the reduced air density \n        and g varying with altitudes', fontdict = font)
        pl.show()
8 code1.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def show(self):
        pl.plot(self.t, self.theta, label = '$F_D =$' + str(self.F_D))
        pl.xlim(0, 100)
        pl.ylim(-4, 4)
        pl.xlabel('time ($s$)')
        pl.ylabel('$\\theta$ (radians)')
        pl.legend()
#        pl.text(32, 2, '$\\theta$ versus time $F_D =$' + str(self.F_D))

#pl.subplot(311)
#r1 = routes_to_chaos(amplitude = 1.35)
#r1.calculate()
#r1.show()
#pl.subplot(312)
#r2 = routes_to_chaos(amplitude = 1.44)
#r2.calculate()
#r2.show()
#pl.subplot(313)
#r3 = routes_to_chaos(amplitude = 1.465)
#r3.calculate()
#r3.show()
#pl.show()

#r= routes_to_chaos(amplitude = 1.465)
#r.calculate()
#r.show()
11 py1.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def plot(self):
        pl.figure(figsize = (8, 8))
        pl.plot(self.t,self.theta, 'c')
        pl.ylim(-4, 4)
        pl.xlim(0, 8)
        pl.ylabel('$\\theta$ (radians)')
        pl.xlabel('time (yr)')
        pl.title('Hyperion $\\theta$ versus time')
        pl.text(3.3, 3.5, 'Circular orbit')
11 py8.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
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')
11 py9.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def plot(self):
        pl.figure(figsize = (8, 8))
        pl.plot(self.theta,self.omega, 'k.')
#        pl.ylim(-4, 4)
#        pl.xlim(0, 8)
        pl.ylabel('$\\omega$ (radians/yr)')
        pl.xlabel('$\\theta$ (radians)')
        pl.title('Hyperion $\\omega$ versus $\\theta$')
        pl.text(-0.7, 13.3, 'Circular orbit')
11 py10.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def plot(self):
        pl.figure(figsize = (8, 8))
        pl.plot(self.theta,self.omega, 'k.')
#        pl.ylim(-4, 4)
#        pl.xlim(0, 8)
        pl.ylabel('$\\omega$ (radians/yr)')
        pl.xlabel('$\\theta$ (radians)')
        pl.title('Hyperion $\\omega$ versus $\\theta$')
        pl.text(-0.75, 56, 'Elliptical orbit')
11 py6.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
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')
11 py7.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
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')
11 py4.py 文件源码 项目:computational_physics_N2014301020117 作者: yukangnineteen 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def plot(self):
        pl.figure(figsize = (8, 8))
        pl.plot(self.t,self.omega, 'c')
        pl.ylim(-20, 60)
        pl.xlim(0, 10)
        pl.ylabel('$\\omega$ (radians/yr)')
        pl.xlabel('time (yr)')
        pl.title('Hyperion $\\omega$ versus time')
        pl.text(4.1, 55, 'Elliptical orbit')


问题


面经


文章

微信
公众号

扫码关注公众号